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

MP4 file missing all meta info

Open aviramroi opened this issue 1 year ago • 6 comments

Im downloading file from the blobUrl and I missing some meta info Screen Shot 2022-10-19 at 16 00 34 on the left the file downloaded using the media recorder, in the right some mp4 file.

usage:

  const handleStop = (blobUrl: any, blob: any) => {
    var a = window.document.createElement("a");
    a.href = blobUrl;
    a.download = "vide.mp4";
    document.body.appendChild(a);
    a.click();
    document.body.removeChild(a);
}


  const {
    status,
    startRecording,
    pauseRecording,
    resumeRecording,
    stopRecording,
    mediaBlobUrl,
    muteAudio,
    isAudioMuted,
  } = useReactMediaRecorder({
    blobPropertyBag: {
      type: "video/mp4",
    },
    audio: router.query.m === "true",
    video: false,
    screen: true,
    onStop: handleStop,
  });

aviramroi avatar Oct 19 '22 15:10 aviramroi

+1 I can confirm this issue, somehow the mp4 file cannot be played on iPhone nor mac QuickTime, Only VLC is able to play it.

RNZ01 avatar Oct 25 '22 22:10 RNZ01

I faced that too. Safari is the only browser (at least that I know) that records using MP4 format, all other browsers (like Chrome) records using WebM format.

My solution was implementing a video converter on the serve for all videos not recorded by safari.

marviobezerra avatar Nov 01 '22 02:11 marviobezerra

Hello everyone, I've run into this issue too

veewoo avatar Nov 03 '23 03:11 veewoo

Hi everyone, I am running into the same issue. It seems like the encoder is not properly storing metadata. Attached is the output of ffprobe -i Screenshot 2024-03-27 at 2 54 39 PM

shomerj avatar Mar 27 '24 20:03 shomerj

same issue, the problem is that if i want to get the duration into the code i got Infinity by the missing metadata, you found some fix?

flexingCode avatar Apr 25 '24 23:04 flexingCode

Same issue here, I can't get neither frame size or duration of the video. Hey all, any suggestions? Therefore I can't even start re-scaling the video.

codingforpleasure avatar Aug 19 '24 20:08 codingforpleasure