I'm using ffmpeg to cut slices from a flac audio file then concatenate them together. I'm able to do this and the output file plays in VLC media player and appears to have the correct duration; however, I get several errors of the form:

"Application provided invalid, non monotonically increasing dts to muxer in stream 0"

I have two questions:

  • Do these errors matter?
  • Which of the three concat commands that I use is preferable?

I create the slices with these commands:

  • ffmpeg -ss 00:00:00.200 -to 00:00:03.100 -i "input.flac" -c:a copy "slice_1.flac"
  • ffmpeg -ss 00:00:04.400 -to 00:00:07.200 -i "input.flac" -c:a copy "slice_2.flac"

These are the three different ways I've tried to concat the files:

  • ffmpeg -i "concat:slice_1.flac|slice_2.flac" -codec copy -c:a flac -ignore_unknown merged_1.flac
  • ffmpeg -i "concat:slice_1.flac|slice_2.flac" -c:a copy merged_2.flac
  • ffmpeg -i "concat:slice_1.flac|slice_2.flac" -safe 0 -c copy merged_3.flac
  • For some reason it looks like when using copy for FLAC ffmpeg just copies the DTS timestamps as-is, refusing to regenerate them even if the flags are set to do so. I'm not sure if this is by design or a bug, but I ran into the same issue with concatenating FLAC files. I ended up using sox for now, but that's hardly ideal since it ends up re-encoding the FLAC - not a problem in the sense of transcoding losses, but takes a lot of unnecessary time. I'll probably be posting about this to the FFMPEG devs to see if this is by design or if it can be worked around.
    – fdmillion
    Jul 5 at 0:24


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.