[FFmpeg-trac] #7257(undetermined:new): concatenating MP4 files reads all of them twice

FFmpeg trac at avcodec.org
Wed Jun 13 15:16:15 EEST 2018


#7257: concatenating MP4 files reads all of them twice
-------------------------------------+-------------------------------------
             Reporter:  AyrA         |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:  git-
  undetermined                       |  master
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 == Summary of the bug ==

 When concatenating multiple mp4 files using {{{-f concat}}} each input
 file is read twice but only on the second pass the file is actually
 processed. This problem does not seem to be present for other formats like
 AVI or MKV.

 The generated output file looks as expected and works.

 == How to reproduce ==

 Command: {{{ffmpeg -f concat -safe 0 -i list.txt -c copy -strict
 experimental output.mp4}}}

 list.txt: File with at least one mp4 file in it

 == Other Info ==

 * My device runs Microsoft Windows 7 x64 (6.1.7601)
 * The first seemingly useless pass is slower than the second actual pass
 but CPU utilization stays almost at 0 during the entire time of the first
 pass (Unbuffered IO or seeking weirdly?)
 * First pass is performed after 51 frames have been written to the output
 according to the console status line
 * This behavior is only present when using {{{-f concat}}} and not when
 processing a single file
 * Each mp4 input file is processed twice
 * The concat text file can contain different container (mixed mkv and mp4
 for example) and only the MP4 files are processed twice
 * The issue is present regardless of file location (Tested: local disk and
 SMB share)
 * This issue almost doubles encoding time

 == Version Info ==

 {{{
 ffmpeg version N-91266-g8c20ea8ee0 Copyright (c) 2000-2018 the FFmpeg
 developers
 built with gcc 7.3.0 (GCC)
 configuration: --disable-static --enable-shared --enable-gpl --enable-
 version3
 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-
 iconv
 --enable-libass --enable-libbluray --enable-libfreetype --enable-
 libmp3lame
 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
 --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr
 --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack
 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2
 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-
 libvidstab
 --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-
 libspeex
 --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-
 ffnvcodec
 --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-
 dxva2
 --enable-avisynth
 libavutil      56. 18.102 / 56. 18.102
 libavcodec     58. 20.101 / 58. 20.101
 libavformat    58. 17.100 / 58. 17.100
 libavdevice    58.  4.100 / 58.  4.100
 libavfilter     7. 25.100 /  7. 25.100
 libswscale      5.  2.100 /  5.  2.100
 libswresample   3.  2.100 /  3.  2.100
 libpostproc    55.  2.100 / 55.  2.100
 }}}

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


More information about the FFmpeg-trac mailing list