Opened 9 years ago

Last modified 8 years ago

#5236 new defect

concat demuxer isn't working

Reported by: ib Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: concat
Cc: ibcoverity@discardmail.de Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

I have a file 1.mp4 (video: h264, audio: mp3) that has a duration of 100 mins and a file second.mp4 (same video and audio). Both files play fine.

I'm trying to cut a piece from second.mp4 by

ffmpeg -ss 0:10:41.75 -i second.mp4 -filter:v scale=704x352 -c:v libx264 -c:a libmp3lame -b:a 128k -ac 2 2.mp4

(which adjusts video and audio to the 1.mp4 file as well) and then to concatenate both with

ffmpeg -f concat -i <(printf "file '$PWD/%s'\n" ./{1,2}.mp4) -c copy new.mp4

(The log for this is at www.datafilehost.com/d/98c2f0aa.)

The problem is that new.mp4 only plays until the end of former 1.mp4. The following 2.mp4-part is either still picture or kinda slow motion. I think it's because of wrong timestamps because ffmpeg tells about DTS being non-monotonous or out of order.

I've figured out that splitting up everything into video and audio and rejoining it did the trick, but I doubt that is how it is supposed to work:

ffmpeg -i 1.mp4 -vn -c:a copy a1.mp3
ffmpeg -i 1.mp4 -an -c:v copy v1.mp4
ffmpeg -i 2.mp4 -vn -c:a copy a2.mp3
ffmpeg -i 2.mp4 -an -c:v copy v2.mp4
ffmpeg -f concat -i <(printf "file '$PWD/%s'\n" ./a{1,2}.mp3) -c copy a12.mp3
ffmpeg -f concat -i <(printf "file '$PWD/%s'\n" ./v{1,2}.mp4) -c copy v12.mp4
ffmpeg -i a12.mp3 -i v12.mp4 -codec copy new.mp4

I was expecting the concat filter to achive the same result.

Change History (4)

comment:1 by ib, 9 years ago

Cc: ibcoverity@discardmail.de added

comment:2 by Carl Eugen Hoyos, 9 years ago

Keywords: concat added

Do you want to report an issue with the concat filter or the concat demuxer?
Please provide an actual command line (without shell magic) together with the complete, uncut console output and input files that allow to reproduce the issue to make this a valid ticket.

comment:3 by ib, 9 years ago

Summary: concat filter isn't workingconcat demuxer isn't working

Sorry, I've mixed up 'filter' and 'demuxer'. I'm talking about the demuxer.

The shell magic just creates

file '/tmp/./1.mp4'
file '/tmp/./2.mp4'

comment:4 by Elon Musk, 8 years ago

Component: undeterminedavformat
Note: See TracTickets for help on using tickets.