[FFmpeg-user] Problem concatenating .mp4 files - dimensions not set

David Favor david at davidfavor.com
Tue Sep 6 16:22:22 CEST 2011


Trying to concatenate a set of .mp4 files together
with no intermediate disk space and having no luck.

Looks like something simple is missing.

Suggestions welcome. Thanks.

Version of ffmpeg is...

David-Favor-iMac> ffmpeg -version 2>&1 | grep version
ffmpeg version 0.7.3, Copyright (c) 2000-2011 the FFmpeg developers

Files are...

David-Favor-iMac> for file in 00*.mp4 ; do ffmpeg -i $file 2>&1 | grep Video ; done
     Stream #0.0(und): Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 22698 kb/s, 59.94 fps, 59.94 tbr, 30k 
tbn, 59.94 tbc
     Stream #0.0(und): Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 22699 kb/s, 59.94 fps, 59.94 tbr, 30k 
tbn, 59.94 tbc
     Stream #0.0(und): Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 22699 kb/s, 59.94 fps, 59.94 tbr, 30k 
tbn, 59.94 tbc
     Stream #0.0(und): Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 22700 kb/s, 59.94 fps, 59.94 tbr, 30k 
tbn, 59.94 tbc
     Stream #0.0(und): Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 22695 kb/s, 59.94 fps, 59.94 tbr, 30k 
tbn, 59.94 tbc

Command (one of many attempted) is...

cat 00*.mp4 | ffmpeg -benchmark -y -f mp4 -s 1920x1080 -i - -vcodec copy -acodec copy -f mp4 -s 1920x1080 test.mp4

Errors are...

David-Favor-iMac> cat 00*.mp4 | ffmpeg -benchmark -y -f mp4 -s 1920x1080 -i - -vcodec copy -acodec copy -f mp4 -s 
1920x1080 test.mp4
ffmpeg version 0.7.3, Copyright (c) 2000-2011 the FFmpeg developers
   built on Aug 23 2011 08:57:36 with gcc 4.2.1 (Apple Inc. build 5666) (dot 3)
   configuration: --prefix=/opt/local --enable-gpl --enable-postproc --enable-swscale --enable-avfilter 
--enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libdirac --enable-libschroedinger --enable-libxvid 
--enable-libx264 --enable-libvpx --enable-libspeex --mandir=/opt/local/share/man --enable-shared --enable-pthreads 
--disable-indevs --cc=/usr/bin/gcc-4.2 --arch=x86_64 --enable-yasm
   libavutil    50. 43. 0 / 50. 43. 0
   libavcodec   52.122. 0 / 52.122. 0
   libavformat  52.110. 0 / 52.110. 0
   libavdevice  52.  5. 0 / 52.  5. 0
   libavfilter   1. 80. 0 /  1. 80. 0
   libswscale    0. 14. 1 /  0. 14. 1
   libpostproc  51.  2. 0 / 51.  2. 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x102054400] multiple edit list entries, a/v desync might occur, patch welcome
     Last message repeated 1 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x102054400] stream 0, offset 0x30: partial file
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x102054400] Could not find codec parameters (Video: h264, 22698 kb/s)

Seems stream 0 codec frame rate differs from container frame rate: 60000.00 (60000/1) -> 30000.00 (60000/2)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'pipe:':
   Metadata:
     major_brand     : isom
     minor_version   : 512
     compatible_brands: isomiso2avc1mp41
     creation_time   : 1970-01-01 00:00:00
     encoder         : Lavf52.110.0
   Duration: 00:11:20.70, bitrate: N/A
     Stream #0.0(und): Video: h264, 22698 kb/s, 59.94 fps, 30k tbr, 30k tbn, 60k tbc
     Metadata:
       creation_time   : 1970-01-01 00:00:00
     Stream #0.1(und): Audio: ac3, 48000 Hz, 2 channels, s16, 256 kb/s
     Metadata:
       creation_time   : 1970-01-01 00:00:00
[mp4 @ 0x102047600] dimensions not set
Output #0, mp4, to 'test.mp4':
   Metadata:
     major_brand     : isom
     minor_version   : 512
     compatible_brands: isomiso2avc1mp41
     creation_time   : 1970-01-01 00:00:00
     encoder         : Lavf52.110.0
     Stream #0.0(und): Video: libx264, q=2-31, 22698 kb/s, 90k tbn, 30k tbc
     Metadata:
       creation_time   : 1970-01-01 00:00:00
     Stream #0.1(und): Audio: ac3, 48000 Hz, 2 channels, 256 kb/s
     Metadata:
       creation_time   : 1970-01-01 00:00:00
Stream mapping:
   Stream #0.0 -> #0.0
   Stream #0.1 -> #0.1
Could not write header for output file #0 (incorrect codec parameters ?)


-- 
Love feeling your best ever, all day, every day?
Click http://RadicalHealth.com for the easy way!


More information about the ffmpeg-user mailing list