Bad video after audio shift + concat

Any other question that don't fit into the other support categorizes.
Post Reply
gyorokpeter
Posts: 1
Joined: Thu Feb 26, 2015 7:47 pm

Bad video after audio shift + concat

Post by gyorokpeter » Thu Feb 26, 2015 8:12 pm

I have multiple videos from which I would like to pick out sections and concatenate them into a single video.
I'm extracting the secions with commands like this:

Code: Select all

ffmpeg -i 0223201332DVB-TTV2.mp4 -ss 00:00:17.160 -to 00:00:19.000 ajberovid.mp4
I have the names of all the parts in mylist.txt, and I concatenate them with:

Code: Select all

ffmpeg -y -f concat -i mylist.txt -c copy joined.mp4
This seem to work fine, but then I noticed that in one section the audio is off by a bit, so I need to shift it. I tried using this command:
set INPUT=0223201624DVB-TTV2.mp4

Code: Select all

ffmpeg -itsoffset 00:00:00.100 -i %INPUT% -i %INPUT% -map 0:0 -map 1:1 -ss 00:00:06.600 -to 00:00:07.000 rekelv.mp4
When just playing "rekelv.mp4" it looks fine, however when I run the concat command it's printing lots of "Non-monotonous DTS in output stream 0:0" messages that it didn't print before, and the resulting "joined.mp4" only plays correctly until the part where "rekelv.mp4" should come, at which point the video freezes and only the audio from the remaining videos can be heard (i.e. I can't hear the audio from "rekelv.mp4").
I also tried the following:

Code: Select all

ffmpeg -ss 00:00:06.500 -t 00:00:00.600 -i %INPUT% -ss 00:00:06.600 -t 00:00:00.600 -i %INPUT% -map 0:0 -map 1:1 rekelv.mp4
but this has the same result.

Any idea what I'm doing wrong?
Last edited by Zeranoe on Mon Mar 02, 2015 3:45 am, edited 1 time in total.
Reason: Added code backets

Post Reply
'