I want to record user webcam stream using web's MediaRecorder
and generate a file which has:
- correctly set duration (which can be seen and used by browsers e.g. html5 video player shows correct duration when video is in
preload
state) - correctly set codecs for both audio and video tracks
Here you can see a fully working example (Chrome: 54.0.2840.71, Firefox: 49.0.2 -> PLEASE USE RELATIVELY NEW BROWSERS SINCE APIS USED IN THE DEMO ARE QUITE RECENT): https://jsfiddle.net/2vr7vL2p/12/ where all works perfectly besides:
- in chrome the duration returns
Infinity
(in firefox it works fine) - in both firefox and chrome resulting file has broken codecs (for instance VLC media player returns:
VLC does not support the audio or video format "undf". Unfortunately there is no way for you to fix this.
)
How can one solve those issues?