fbaiodias / react-video-recorder

https://react-video-recorder.vercel.app/
MIT License
188 stars 155 forks source link

How to change Video type mp4 #56

Open prakash50166 opened 4 years ago

prakash50166 commented 4 years ago

Hi i have configure react-video-recorder in my project but i can't play recording video in safari browser can you please give me the solution or how to change from video file webm to mp4 in react-video-recorder npm package

VapiSoft commented 4 years ago

Hi prakash50166, I am facing the same problem, because webm cann't be displayed on iPhone. I can do the conversion on to mp4 on my server (using ffmpeg) but it takes a lot of time. So if you find a solution in the client, let me know. Thanks.

GiancarloZ commented 4 years ago

Hi, I'm encountering the same issue, Has anyone found a solution?

jayna456 commented 3 years ago

@prakash50166, any solution for this? Did you found something?

LeonidIvanov commented 3 years ago

Same thing. We can't play recorded video.

asadrazashah commented 3 years ago

Most browsers support webm for recording , so it is not possible to convert into mp4 on frontend you have to use a tool ffmpeg to convert it into mp4 using backend server . But its a time taking task even for videos with small size

kamal-choudhary commented 2 years ago

facing same problem

Tamozhnii commented 2 years ago

Hello, could you make it possible to change the desired mime type (MIME_TYPES) through props? And the ability to set the default mime type in the mimeType? image image

kamal-choudhary commented 2 years ago

I am converting the RECORDED video to mp4 like this on frontend:

 onRecordingComplete={(videoBlob) => {
            const newFile = new File([videoBlob], 'video-title.mp4', {
              type: 'video/mp4'
            })
}}

working for me in Chrome.

najathi commented 1 year ago

@kamal-choudhary

The methods you mentioned are creating a new File or Blob object and setting the MIME type to 'video/mp4'. However, this doesn't convert the video from WebM to MP4 format, it just changes the file type. If you try to play this 'mp4' file, most likely it won't work because the internal data is still WebM, not MP4.

LetMeDream commented 10 months ago

@kamal-choudhary

Yep, that solution of yours still wouldn't work on Safari, which is the issue I am currently facing.