[FFmpeg-trac] #5236(undetermined:new): concat filter isn't working

FFmpeg trac at avcodec.org
Sun Feb 14 13:21:44 CET 2016


#5236: concat filter isn't working
-------------------------------------+-------------------------------------
             Reporter:  ib           |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:  git-
  undetermined                       |  master
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 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.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/5236>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list