The metadata was packed in nal-units with nal_type=31, fixed with 907fbb59435b96e5c77a90894f1206ec1058f8d7.
Additionally ffmpeg3.4+ failed to decode some mp4a samples, because internal decoder state was not reset after 'gaps' in the audio-stream. These gaps may be caused by network transmission errors. This got fixed with 56aee28f1edf686abaefd31f295130bebd2c9cf1.
Tip
When using ffmpeg you can avoid corrupt files by using -f mpegts.
This will create .ts instead of .mp4.
It also allows you to watch the stream while downloading.
Later you can use ffmpeg -i file.ts -c copy file.mp4.
The metadata was packed in nal-units with nal_type=31, fixed with 907fbb59435b96e5c77a90894f1206ec1058f8d7.
Additionally ffmpeg3.4+ failed to decode some mp4a samples, because internal decoder state was not reset after 'gaps' in the audio-stream. These gaps may be caused by network transmission errors. This got fixed with 56aee28f1edf686abaefd31f295130bebd2c9cf1.
Tip When using ffmpeg you can avoid corrupt files by using
-f mpegts
. This will create.ts
instead of.mp4
. It also allows you to watch the stream while downloading. Later you can useffmpeg -i file.ts -c copy file.mp4
.Originally posted by @anthwlock in https://github.com/anthwlock/untrunc/issues/51#issuecomment-640083042