FFmpeg error resilience (like FFplay)

I have a wonky raw HEVC video file extracted from a no-name DVR. If I attempt to remux this file to, let’s say mp4, using ffmpeg -f hevc -i infile -c copy outfile.mp4 I get a result that plays for a few seconds and then occasionally a keyframe might get decoded. If I instead give the original file to FFplay it is able to play through it (although seeking or pausing breaks it).

Is it possible to enable the error resilience that FFplay has for FFmpeg demuxing?


This particular file has this NAL unit sequence:

  • VPS_NUT
  • SPS_NUT
  • PPS_NUT
  • PREFIX_SEI_NUT
  • IDR_W_RADL
  • TRAIL_R (48 times)

And it repeats again. It would appear that FFmpeg directly cannot handle such “restarts”.

PS: I’ve omitted proprietary units, because filtering them out does not help.

Read more here: Source link