Missing recorded Video metadata in Chrome - javascript

I am using javascript media recorder api and recording a video. There is missing some video's metadata (duration, bitRate, frameRate) in chrome but it works in Safari. How can I add metadata to recorded video?
Here is the screenshot for recorded video metadata (in Safari):
Here is the screenshot for recorded video metadata (in Chrome):
I try with ffmpeg library and it's not working.

Related

Record webRTC stream in mp4 using kurento media server

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

How to display arraybuffer video stream data with out using Media Source Extensions?

We are working on video player. We area receiving video stream through web sockets as a arraybuffer. We can able to play video by using MSE. But we had a probelm in IOS browsers which they dont support MSE and we dont want to use HLS. Any other way we can play video using arraybuffer data with out unsing MSE?

How to record HTML5 video in Safari?

I have to develop video recording in Safari 11. I have used getUserMedia() to play video in Safari and It is working but It is not recording the video.
I have developed video recording in Chrome and Mozilla using Media Recorder.
Media Recorder is not supporting in Safari 11 for recording video.How will i record the video in Safari 11?
MediaRecorder API is not supported on Safari 11. They enabled MediaRecorder API on version 12.2, but it is experimental and you should enable it manually.
Here is good article describing supported properties and methods.
https://blog.addpipe.com/safari-technology-preview-73-adds-limited-mediastream-recorder-api-support/
I am developing same type of app and solved recording problem, however there is other problems too. For example playback recorded video before uploading to the server. You can't do that too, because of known bug
Safari: unable to dynamically load video from blob url
Let's hope webkit team will fix in the near future.
Both recording and playback of video seem to work fine in latest Safari after enabling MediaRecorder from Develop menu.
Try with this Cam Recorder HTML5 demo.

Web MediaRecorder - Infinity duration and broken codecs

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?

HTML5 Video element not playing an .mp4 with no audio codec

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.

Categories