I want to concatenate many files using concat demuxer. Problem is a portion of those files have different tbn from the others.

So, I followed an answer by @sr9yar at:https://stackoverflow.com/questions/31691943/ffmpeg-concat-poduces-dts-out-of-order-errors

Change the tbn values, then concatenate them.

If I have to change only a file, then it's ok. But there are many files that have to be adjusted, It's too much hassle.

The command I've just used looks like

ffmpeg -i "S5M7\S5M7_24 to 9.mp4" -i "S5M7\S5M7_29 to 11_2.mp4" -i "S5M7\S5M7_211_2 to 14.mp4" -i "S5M7\S5M7_2after 1.mp4" -video_track_timescale 1000 -c copy -map 0 "S5M7\S5M7_24 to 9.mp4" -video_track_timescale 1000 -c copy -map 1 "S5M7\S5M7_29 to 11_2.mp4" -video_track_timescale 1000 -c copy -map 2 "S5M7\S5M7_211_2 to 14.mp4" -video_track_timescale 1000 -c copy -map 3 "S5M7\S5M7_2after 1.mp4"

It's daily tasks, so I have to go through this again and again and again.

So I wonder

  • If I can tell concat demuxer to change tbn value before concatenate them
  • Or If FFmpeg accept regular expression as an input or output arguments
  • Or any other suggestion to make it done more efficiently
  • Give me a few days to get this fixed in ffmpeg. – Gyan Jan 14 at 8:08
  • All right. I'll look forward to hearing from you. – helming Jan 14 at 9:56

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.