I'm trying to batch remux files to mp4, copying audio, video and subtitles streams.
ffmpeg -i "$file" -map 0:a:m:language:por\? -map 0:a:m:language:eng\? -map 0:s:m:language:por\? -map 0:s:m:language:eng\? -map 0:v -c:v copy -c:s mov_text -c:a copy -movflags faststart -f mp4 "${file%.*}"-remux.mp4
But I get lots of errors sometimes about timestamps and non-monotous DTS streams.
Searching online I found those 2 flags here:
-fflags "+genpts" -avoid_negative_ts "make_zero"
But they don't fix my issue. What is the best way to fix this issues and make sure audio, subtitles and video are still in sync? Looking for something safe to apply to any input file in batch processing scripts, without re-encoding
+igndts
? – Freedo May 21 '20 at 7:53