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

<p>So, I followed an answer by @sr9yar at:<a href="https://stackoverflow.com/questions/31691943/ffmpeg-concat-poduces-dts-out-of-order-errors">https://stackoverflow.com/questions/31691943/ffmpeg-concat-poduces-dts-out-of-order-errors</a></p>

<p>Change the tbn values, then concatenate them.</p>

<p>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.</p>

<p>The command I've just used looks like</p>

<pre><code>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"
</code></pre>

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

<p>So I wonder</p>

<ul>
<li>If I can tell concat demuxer to change tbn value before concatenate them</li>
<li>Or If FFmpeg accept regular expression as an input or output arguments</li>
<li>Or any other suggestion to make it done more efficiently</li>
</ul>

CC BY-SA 4.0
2020-01-14T08:08:18.597Z
Give me a few days to get this fixed in ffmpeg.
Gyan
CC BY-SA 4.0
2020-01-14T09:56:11.177Z
All right. I'll look forward to hearing from you.
helming
<ffmpeg>
I wanna speed things up while concatenating many media files
helming
# I wanna speed things up while concatenating many media files

(Asked by: username_0 on 2020-01-14)

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

**Tags:** ffmpeg

> **Comments:**
> **username_1**: Give me a few days to get this fixed in ffmpeg.  
> **username_0**: All right. I'll look forward to hearing from you.  

---

## 0 answers

