I'm trying to use ffmpeg to download a DASH stream. It works OK but it seems like in the output file there are some frames that are out-of-order (e.g. for some frames the pts value is lower than the frame that came before it) and this manifests in video players as either pauses or visual glitches.
For testing purposes I'm just trying to save a 2-minute segment, the command line I'm using looks similar to:
ffmpeg -v quiet -stats -i "https://example.com/path/to/stream/index.mpd" -t 00:02:00 -c copy "test.mp4"
I don't want to introduce quality loss by transcoding the stream, are there either any parameters I can use when downloading the stream to automatically discard anomalous frames, or an ffmpeg command I could use after the download is complete to fix up the file?
I'm going to be using this in a script so it would be useful also to know if there's a way to use ffprobe to check a file for this kind of occurrence (so the script can then pass it to be fixed up, if necessary).