I am working on recording the video stream using WebRTC and Kurento Media server. The recording is working fine, but I am facing an issue.
The browser is storing the media in Webm format, which does not keep the metadata information. If I am recording a mobile webRTC stream in portrait mode, then the Kurento is recording that stream, but when I am playing that video, it's being played in landscape mode everywhere.
I have done some R&D on it and found the Webm does not keep the metadata information, so I have record the video in mp4 format.
I have read the documentation of the Kurento media server but didn't found anywhere that how to record the video in mp4 format.
Can anybody tell me how we can do that?
I have tried the following things
- Changed the file extension to mp4
Please try mentioning the recorder end-point profile spec (webm, MP4, MKV)
You can post your code as well so that corrections can be suggested.
You can also follow this code https://github.com/Kurento/kurento-tutorial-js/blob/master/kurento-recorder/js/index.js
At line number 112 you can include profile based on the specs used in kurento-utils.js
Related
I have webcam C920 that can output h264 (constrained baseline).
I want to stream this C920s h264 video to browser.
I use h264_live_player for streaming video.
h264_live_player is javascript library for h264 streaming to browser, but it can only decode baseline profile.
so I want to know how to change C920s output h264 profile.
if i can't change C920s output profile, please tell me how to streaming to browser from C920 no reencoding.
Try using motion. Look at this tutorial. If you do not need to stream to a web browser then VLC will also work and VLC is also cross platform. Look at this thread for instructions to use VLC.
I want to show a stream of an IP camera in html website.IP camera send data with RTSP protocol. I used some codes like html5 RTSP && Google WebRTC. But I feeled these codes can't receive and show RTSP streams and not worked for me. I tested some methods that uses VLC but I wan't to show stream without using VLC and I want to implement this program as client side program.
There is no simple and good way to play RTSP directly in browser. It is possible to do it on old Android devices, on some STB or with VLC plugin which is not a good way to go.
You will have to install media server that will convert your RTSP to something for browser.
It is possible to take ffmpeg that will convert your rtsp to hls and have a live video translation from camera, but if you want more feature like stream management or recording you can look at commercial options like Flussonic (I'm working on it) or Wowza.
You can also google something like "streaming server" and look for RTSP and HLS/RTMP protocols in specification.
There has media source extensions(MSE) can support live h264 with very low latency(Chrome Firefox Safari below 1s). but there need a gateway to convert RTSP to fragmented MP4.
I'm trying to upload a video to a Angular app using ng-file-upload. All works fine until I try and upload a .mp4 video with no audio codec. The video element shows, it shows the correct duration in the control panel, it just doesn't play. Clicking play does nothing, the first frame is not shown.
If I upload any other .mp4 that contains audio the video plays without error.
Below is the information I can see about the file that is failing, as you can see only the video codec is listed for this file.
Here is the 'more info' for another .mp4 file that has audio, this one uploads perfectly fine and plays in the HTML5 video element with no errors.
As you can see, the video that works states the audio codec as AAC, which is expected for .mp4, and shows Audio Channels "2", i'm unsure of the purpose of 'Audio Channels' is in all honesty.
I've been debugging this thing all day and the only difference in files that I can see is in the above images.
Should HTML5 video player play a .mp4 video without any audio codec listed?
What leads me to think the audio has a role to play in this is w3schools description of an Mpeg-4 file:
MP4 = MPEG 4 files with H264 video codec and AAC audio codec
Has anyone had this issue before?
Edit
After adding a listener to the error event on the video I can see that I get a MediaError object with code 3 as a value, so this is a decoding issue I can see.
Screenshot below
Further edit
I've now debugged this as far as going into Chromes 'media-internals' logs. The error Chrome is encountering is now confirmed to be because of the missing audio, see the screenshot below:
Unsure why an error isn't clearly thrown because of this. Is this the end of the line, it's weird because if I upload the video to Facebook it uploads just fine.
I'd advice you to check if the .mp4 file is properly converted. I've already checked it on my computer and it should be normally played - just video with no audio (Ubuntu 14.04, Chrome 51.0.2704.106).
Use ffmpeg to check the available media tracks:
ffmpeg -i input_file.mp4
Then try to use the source with audio track and convert it to one without an audio. This command will remove all audio tracks:
ffmpeg -i input_file.mp4 -vcodec copy -an output_file.mp4
HTML5 specification doesn't tell what should happen when we don't have a proper codec for one of the media tracks. Just for reference - HTML5
It's always a good idea to check the playback on any other player, VLC is a good one for reference.
I have an rtsp stream with MP4 video codec and G711 audio codec. I need to get it work without FlashPlugins.
Video stream in WEB is a frustrating thing.
Is there a possibilty to convert in browser with javascript my Mp4 video and G711 audio in a webm or a h264 codec on fly to use it as a stream for video html5 element or any player!
The problem is, flowplayer does not support rtsp stream, vlc does not work in chrome and flash does not support into android.
so there are many many problems to get it work.
So if there is a possbility to transocde the rtsp stream on the client perhapse there is a possibility to resolve this problems.
thx
Firstly - MP4 is not a video codec but a container. So the question is the RTSP server really streaming MP4 (which I doubt but it might) or maybe you have confused MP4 with H.264.
Chrome and Firefox both accept live video streams in the fragmented MP4 and WebM (which is irrelevant in this case) video containers. So if you really already have MP4 payload you can simply unpack it from the RTSP stream and forward to the browser. If you have H.264 you will have to perform muxing of the raw H.264 video stream into an MP4 container together with the audio (I am not sure if G711 is supported by browsers, I doubt it so audio might need to be transcoded). The free option is to setup FFmpeg to transcode rtsp to fragmented MP4 (there are lots of examples for this, just Google) or if you are looking for a commercial product our company has just released an video surveillance product that can offer HTML5 compatible live streaming from RTSP cameras. If you have any interest in the commercial product leave a comment.
I want to be able to record videos with audio using HTML and Javascript.
After some research i can get video streaming with getUserMedia. Also There is WebRTC for recording but as far as i understood its not yet implemented in desktop browsers (only mobile browsers support it). So now i can just capture video, but i cant save it to server or record it.
What other options do i have ?. Does anyone knows a good flash alternative or HTML5 alternative that allows me to capture and save video to server with audio and also has maximum time of recording
Full disclosure: I work for Ziggeo.
When it comes to WebRTC, here is the rundown for browsers supporting it:
on Chrome and Opera, you have to record audio and video separately and encode them yourself in JS; then, send them to your servers and transcode them using e.g. ffmpeg to mp4s and other target formats
on Firefox, you can get a webm object for video and audio combined and send it to your servers.
For all other browsers and older versions of the ones mentioned you'd need to fall back to Flash recording which usually is based on RTMP and flv.