Why .flv doesn't require the file to be finalized while .mp4 does?

denerdTV

New Member
I'm REALLY not sure if this is appropriate for this forum, but since the original question sparked from OBS usage and kinda relates to it, I might give it a shot.

Also, I really didn't know OBS Remuxed recordings, so I used FLV Extract to use my recordings in Premiere.

Yesterday I had a 12h stream, changed record settings and the result was a 230GB FLV file. Used FLV Extract, no problem. But once I tried importing it to Premiere, it hang up using memory until everything stopped responding. My first thought was split the file and join them in Premiere, since I just wanted a small portion of the 230GB file. Found MP4Box to be able to mux files together, but noticed it didn't use the timecode .txt file FLV Extract produced. I was unhappy that I couldn't find any information on timecodes and their use.

So my questions are: (feel free to give a more technical explanation)
  1. (figured out*) Why .flv files have timecodes? What they mean/do?
  2. Do .mp4 files have timecodes? Are they the same as .flv ones? (and why it's hard-ish to find software that extract them?)
  3. What makes .flv able to work without finalizing? And why .mp4 require you to finalize them? (kinda figured at **)

I hope this is appropriate enough for this forum, I'm sorry if it isn't, I'm just annoyed I can't find the answers for the questions.

* After searching for TIMESTAMPS I managed to find information about them in the spec file from Adobe. Feel kinda dumb I had such a hard time finding this lul

** Well I think I know now why .mp4 needs to me finished, they need to write the moov atom to the file, which seems to be the information that tells how to read the mdat atom. So if you don't have moov, you don't know how to read mdat, where each part starts, ends, the amount of frames and stuff.. Seems something along these lines. After inspecting files with MediaInfo I'm trying to understand why .mp4 seems to have ALOT more information about the frames themselves. I imagine both .flv and .mp4 carry the "same" information (I know h264 and aac "files" are in them, and you can demux/mux them but the metadata) since if .mp4 has x information and it's essential, the flv version must have something equivalent. I also imagine flv write this info in every frame/packet/somethinglikethat and thats why you can recover if they're not finished. Still wanna know what are the differences in metadata (if this is the correct term)
 
Last edited:

Lain

Forum Admin
Lain
Forum Moderator
Developer
I'm not sure what you're talking about with timecodes, but FLV doesn't have to finalize because it's the way the container is designed -- it's a container designed around live streaming, where as MP4 is designed around recordings. The reason why MP4 finalizes and FLV does not is because MP4s are designed for optimal seeking capability. When the file is finished, it has to write seeking information and packet offsets, or the file will not be complete and will not be able to play back properly. It does not easily know where the packets are without that seeking information. The MP4 file format is designed to operate around that seeking data.
 
Top