Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recorded video need in .mp4 format #92

Closed
Banwari1990 opened this issue Sep 28, 2016 · 7 comments
Closed

Recorded video need in .mp4 format #92

Banwari1990 opened this issue Sep 28, 2016 · 7 comments

Comments

@Banwari1990
Copy link

Hi,

Is it possible to get the recorded video in to .mp4 format instead of .webm format.

Thanks.

@thijstriemstra
Copy link
Member

thijstriemstra commented Sep 28, 2016

There's this solution using ffmpeg.js but that isn't optimal. But it also looks like, at least Firefox, can record as mp4, according to this example. I just tested this in Firefox 49 on Ubuntu and it did create a mp4 file:

started recording video stream
Using recorderType: MediaStreamRecorder
Passing following config over MediaRecorder API. Object { type: "video", mimeType: "video/mp4", initCallback: null }
Initialized recorderType: MediaStreamRecorder for output-type: video
Stopped recording video stream
video/mp4 -> 5.25 MB

I'll add an option to change the mimeType.

Edit: after checking the downloaded file it seems it's still a webm file 👎

@thijstriemstra
Copy link
Member

thijstriemstra commented Sep 28, 2016

Also tested on Chrome 54 / Ubuntu 16.04 and unfortunately it produced a webm vp8 file with mime type video/mp4. ffprobe details:

Input #0, matroska,webm, from 'recordrtc-chrome54.mp4':
  Metadata:
    encoder         : Chrome
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0(eng): Audio: opus, 48000 Hz, mono, fltp (default)
    Stream #0:1(eng): Video: vp8, yuv420p, 640x480, SAR 1:1 DAR 4:3, 30 fps, 30 tbr, 1k tbn, 1k tbc (default)

@thijstriemstra
Copy link
Member

This is probably on hold until muaz-khan/RecordRTC#97 is resolved.

@thijstriemstra
Copy link
Member

A full list of supported mime-types in Chrome is listed here. Just tested the mime type video/webm;codecs=H264 and it created a H264 clip. Output of ffprobe:

Input #0, matroska,webm, from 'index.mp4':
  Metadata:
    encoder         : Chrome
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0(eng): Video: h264 (Constrained Baseline), yuv420p, 640x480, SAR 1:1 DAR 4:3, 30 fps, 30 tbr, 1k tbn, 2k tbc (default)

@thijstriemstra
Copy link
Member

Added audioMimeType and videoMimeType settings for H264 support in next release.

@smakinson
Copy link

I've added:

videoMimeType: 'video/webm;codecs=H264'

under plugins.record. Is that all that is required? I haven't installed ffprobe, but should quicktime play the file I get from:

player.record().saveAs({'video': 'my-video-file-name.mp4'})

@thijstriemstra
Copy link
Member

@smakinson should be enough, please open a new ticket if you see any issues.

@collab-project collab-project locked as resolved and limited conversation to collaborators May 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants