[FFmpeg-trac] #6376(undetermined:new): Concatenating files which have different pix_fmt results in corrupted file

FFmpeg trac at avcodec.org
Sat May 6 08:09:44 EEST 2017


#6376: Concatenating files which have different pix_fmt results in corrupted file
-------------------------------------+-------------------------------------
             Reporter:  guest123     |                     Type:  defect
               Status:  new          |                 Priority:  important
            Component:               |                  Version:  git-
  undetermined                       |  master
             Keywords:  concat,      |               Blocked By:
  video, pix_fmt                     |  Reproduced by developer:  0
             Blocking:               |
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 **Summary of the bug:** If input format is "concat" and files which are
 being concatenated differ in pixel format, the output file is corrupted.

 **How to reproduce:**
 {{{
 ffmpeg -f concat -i 1.txt -y -quality best -pix_fmt yuv420p 3.mp4
 }}}

 {{{
 # 1.txt
 file '1.mp4'
 file '2.mp4'
 }}}

 **Output of ffprobe:**

 {{{
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1.mp4':
   Metadata:
     major_brand     : isom
     minor_version   : 512
     compatible_brands: isomiso2avc1mp41
     encoder         : Lavf57.57.100
   Duration: 00:00:12.00, start: 0.000000, bitrate: 12922 kb/s
     Stream #0:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 /
 0x31637661), y
 uv444p, 640x480, 12918 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
     Metadata:
       handler_name    : VideoHandler
 }}}

 {{{
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '2.mp4':
   Metadata:
     major_brand     : isom
     minor_version   : 512
     compatible_brands: isomiso2avc1mp41
     encoder         : Lavf57.57.100
   Duration: 00:00:12.00, start: 0.000000, bitrate: 11004 kb/s
     Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
 640x480,
 11001 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
     Metadata:
       handler_name    : VideoHandler
 }}}

 As you can see, 1.mp4 has pixel format of type yuv444p and 2.mp4 has
 yuv420p. I solved the problem by firstly converting 1.mp4 to yuv420p and
 then concatenating. But, I read the whole documentation and I didn't find
 anything saying that files must be of the same pixel format in order to be
 concatenated.

 If needed, I can upload test files.

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


More information about the FFmpeg-trac mailing list