Field notes · 2026-10-24

FFmpeg AVI to MP4 freezes: NAL errors, unset timestamps

Remuxing an NVR AVI to MP4 with stream copy produces a file that will not play. FFmpeg reports NAL unit splitting errors and unset timestamps on the video stream.

Answer

Answered by the Tracewind engineering team.

Security-recorder “AVI” is often not a standards-clean H.264-in-AVI file. MP4 needs coherent timestamps and NAL framing, so ffmpeg -c:v copy can finish yet yield a freeze-frame or unplayable output. Run ffprobe -show_streams on the source and note the real codec before choosing remux versus re-encode.

Try rebuilding timestamps on remux: ffmpeg -fflags +genpts -i input.avi -c:v copy -c:a copy -avoid_negative_ts make_zero output.mp4. If NAL splitting errors continue, stream copy cannot repair the bitstream — re-encode with libx264 (and AAC for audio) and -movflags +faststart. Some exports also behave better if you remux to MPEG-TS first, then to MP4. Test the original in VLC; failure there points to a proprietary or damaged export, not only a container mismatch.

Tracewind Player targets proprietary DVR/NVR exports and files that look like normal video but will not play on Windows. It explains many failures instead of showing garbled frames and can export a standard MP4 clip when the recording is readable. See https://tracewind.world/formats/mp4-wont-play/

If the file still will not open or convert cleanly, send a sample through https://tracewind.world/demo/ so the team can help analyse it.

Where this question came from

The question is paraphrased from a public post on Super User (2026-10); the person who asked it has no link to us. Read the original thread

Got a file like this that won’t play? We’ll help analyse it.

Send us a sample