0

I am currently using videos encoded in MPEG4 (h264). This makes the content of the frames rely on the content of other frames.

In my case this is undesirable as I often need to quickly split video files without re-compressing or altering the content and seek many times trough the video.

The video format that I need needs to be reliable and the frames need to be independent from each other.

Any idea on which video format might be best for these requirements?

Maybe there is a sub-type of MPEG4 encoding that allows to reach this result?

fstab
  • 4,801
  • 8
  • 34
  • 66

1 Answers1

1

H.264 with the intra flag will encode to a video stream where each frame can be independently decoded.

ffmpeg -i in.mp4 -c:v libx264 -g 1 -c:a copy out.mp4

-g 1 sets GOP size to 1 frame, hence each frame is intra-coded. Of course, the video bitrate will increase - in some cases, quite a bit - relative to omitting this flag.

Gyan
  • 85,394
  • 9
  • 169
  • 201
  • Assuming the requirement of 'reliable' means surviving a level or corruption, I would recommend agains mp4. Corruption of the `moov` could make the file very difficult to parse later. If audio is not needed, annex B would work well, otherwise something like ts would be good – szatmary Jun 02 '17 at 20:39
  • Agreed. OP hasn't been specific on what reliable mean here. – Gyan Jun 03 '17 at 04:51