2

I'm building an application that requires playback of a video on disk while being encoded by FFMPEG (in other words, psuedostreaming to disk - playback trails just behind of the encode like in a live stream). So the MOOV atom essentially needs to be generated as its being processed (or interleaved into the stream in chunks), and I've tried using empty_moov with no luck (especially since quicktime doesn't support it).

I'm not sure if this is possible with the MP4 format, looking for ideas or solutions.

Michael Brown
  • 1,585
  • 1
  • 22
  • 36

1 Answers1

0

Fragmented MP4 is the way to do it, but it uses the empty_moov. Regular MP4 files have their header at the end (and not the beginning like fMP4), when everything is already known. It isn't meant for streaming.

You could try writing small MP4 files (even one GOP) and use the fast_start (or something similar) to move the header to the beginning of the file. I don't know what the overhead of playing several files consecutively will be and it could be that you will get a not very smooth playback.

If you already transcode the video and discard the data after it is being read (or space isn't an issue) you can output MJPEG.