react-video-recorder icon indicating copy to clipboard operation
react-video-recorder copied to clipboard

How to change Video type mp4

Open prakash50166 opened this issue 4 years ago • 10 comments

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

prakash50166 avatar Jun 25 '20 07:06 prakash50166

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.

VapiSoft avatar Jun 28 '20 06:06 VapiSoft

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

GiancarloZ avatar Aug 02 '20 16:08 GiancarloZ

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

jayna456 avatar Dec 15 '20 05:12 jayna456

Same thing. We can't play recorded video.

LeonidIvanov avatar Jan 14 '21 07:01 LeonidIvanov

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

asadrazashah avatar Mar 16 '21 17:03 asadrazashah

facing same problem

kamal-choudhary avatar May 13 '22 10:05 kamal-choudhary

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

Tamozhnii avatar May 25 '22 08:05 Tamozhnii

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.

kamal-choudhary avatar May 25 '22 11:05 kamal-choudhary

@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.

najathi avatar Jun 07 '23 11:06 najathi

@kamal-choudhary

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

LetMeDream avatar Jan 05 '24 15:01 LetMeDream