I am trying to use multiple files with ffmpeg and I am having a problem with the duration of the files created through iOS devices.
I am recording the videos through the webcam of the device with:
mediaRecorder.current = new MediaRecorder(videoPlayer.current.srcObject);
mediaRecorder.current.start();
mediaRecorder.current.ondataavailable = (e) => {
setVideoCreatedData(e.data);
};
Then I am downloading the file to my computer and testing the metadata through https://www.metadata2go.com/ and this is the output:

As you can see, the duration is 0s.
I want to then use this file with ffmpeg, however, it does not detect the duration and therefore I am experiencing problems.
How should I record the video in order to get a proper duration on the file's metadata?