On Thu, 29 Mar 2007 12:06:22 +0200, Baptiste Coudurier <baptiste.coudurier at smartjog.com> wrote:
Hi
Andrea Barbieri wrote:
Hello,
NJ:=Nicolas Jauffret
NJ> Hello, NJ> NJ> I would like to simply convert from an ".avi" file to a ".mov" file. NJ> The input file is "from_jpg.avi" (it has been generated from a jpeg sequence NJ> and a wav file NJ> with this command : ffmpeg -i foo.%d.jpg -i bar.wav -vcodec mpeg4 -acodec NJ> mp3 from_jpg.avi) NJ> NJ> $ ffmpeg -i from_jpg.avi NJ> FFmpeg version SVN-r8540, Copyright (c) 2000-2007 Fabrice Bellard, et al. NJ> configuration: --enable-gpl --enable-static --enable-swscaler NJ> --enable-pthreads --enable-libmp3lame --enable-libogg --enable-xvid NJ> --disable-ffserver --extra-ldflags=-static --enable-memalign-hack NJ> libavutil version: 49.4.0 NJ> libavcodec version: 51.40.2 NJ> libavformat version: 51.11.0 NJ> built on Mar 29 2007 11:04:31, gcc: 3.3.1 NJ> Input #0, avi, from 'from_jpg.avi': NJ> Duration: 00:00:08.5, start: 0.000000, bitrate: 2881 kb/s NJ> Stream #0.0: Video: mpeg4, yuv420p, 640x352, 25.00 fps(r) NJ> Stream #0.1: Audio: mp3, 48000 Hz, stereo, 64 kb/s NJ> Must supply at least one output file NJ> NJ> $ ffmpeg -i from_jpg.avi -vcodec copy -acodec copy from_avi.mov ; echo $? NJ> FFmpeg version SVN-r8540, Copyright (c) 2000-2007 Fabrice Bellard, et al. NJ> configuration: --enable-gpl --enable-static --enable-swscaler NJ> --enable-pthreads --enable-libmp3lame --enable-libogg --enable-xvid NJ> --disable-ffserver --extra-ldflags=-static --enable-memalign-hack NJ> libavutil version: 49.4.0 NJ> libavcodec version: 51.40.2 NJ> libavformat version: 51.11.0 NJ> built on Mar 29 2007 11:04:31, gcc: 3.3.1 NJ> Input #0, avi, from 'from_jpg.avi': NJ> Duration: 00:00:08.5, start: 0.000000, bitrate: 2881 kb/s NJ> Stream #0.0: Video: mpeg4, yuv420p, 640x352, 25.00 fps(r) NJ> Stream #0.1: Audio: mp3, 48000 Hz, stereo, 64 kb/s NJ> Output #0, mov, to 'from_avi.mov': NJ> Stream #0.0: Video: mpeg4, yuv420p, 640x352, q=2-31, 25.00 fps(c) NJ> Stream #0.1: Audio: mp3, 48000 Hz, stereo, 64 kb/s NJ> Stream mapping: NJ> Stream #0.0 -> #0.0 NJ> Stream #0.1 -> #0.1 NJ> [mov @ 0x84f4340]track 1: codec frame size is not set NJ> Could not write header for output file #0 (incorrect codec parameters ?) NJ> 0 NJ> NJ> Would you know what is wrong ? As nothing seems special in my ffmpeg NJ> command line...
I believe that this is a long standing issue when using the 'copy' codec and the 'mov' output format (and 'mp4' as well)...
In my experience any valid input file (and media essence) when asked to be simply rewrapped in quicktime file format it leads to this error.
The same command line with one simple change to 'avi' format completes without any problems...
If my memory serves well I've been noticing this issue since I started using ffmpeg around r6000
Yes, mov muxer needs frame_size, since all timestamps in mov/mp4/3gp are based on frame duration.
Problem here is that avi and/or parsers do not set frame_size, therefore muxer is complaining.
And if I try to recompress the audio stream, mplayer can only play its sound if "-demuxer lavf" is given in parameter. Does ffmpeg write correctly the stream headers in the mov file ? # with the same input file "from_jpg.avi" as described above $ ffmpeg -y -i from_jpg.avi -vcodec copy -acodec mp3 from_avi.mov FFmpeg version SVN-r8540, Copyright (c) 2000-2007 Fabrice Bellard, et al. configuration: --enable-gpl --enable-static --enable-swscaler --enable-pthreads --enable-libmp3lame --enable-libogg --enable-xvid --disable-ffserver --extra-ldflags=-static --enable-memalign-hack libavutil version: 49.4.0 libavcodec version: 51.40.2 libavformat version: 51.11.0 built on Mar 29 2007 11:04:31, gcc: 3.3.1 Input #0, avi, from 'from_jpg.avi': Duration: 00:00:08.5, start: 0.000000, bitrate: 439 kb/s Stream #0.0: Video: mpeg4, yuv420p, 640x352, 25.00 fps(r) Stream #0.1: Audio: mp3, 48000 Hz, stereo, 64 kb/s Output #0, mov, to 'from_avi.mov': Stream #0.0: Video: mpeg4, yuv420p, 640x352, q=2-31, 25.00 fps(c) Stream #0.1: Audio: mp3, 48000 Hz, stereo, 64 kb/s Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 Press [q] to stop encoding frame= 200 fps= 0 q=3824.9 Lsize= 441kB time=8.0 bitrate= 451.3kbits/s video:370kB audio:67kB global headers:0kB muxing overhead 0.739459% $ ffmpeg -i from_avi.mov FFmpeg version SVN-r8540, Copyright (c) 2000-2007 Fabrice Bellard, et al. configuration: --enable-gpl --enable-static --enable-swscaler --enable-pthreads --enable-libmp3lame --enable-libogg --enable-xvid --disable-ffserver --extra-ldflags=-static --enable-memalign-hack libavutil version: 49.4.0 libavcodec version: 51.40.2 libavformat version: 51.11.0 built on Mar 29 2007 11:04:31, gcc: 3.3.1 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'from_avi.mov': Duration: 00:00:08.6, start: 0.000000, bitrate: 419 kb/s Stream #0.0(eng): Video: mpeg4, yuv420p, 640x352, 25.00 fps(r) Stream #0.1(eng): Audio: mp3, 48000 Hz, stereo Must supply at least one output file
NJ> And, how come it does not return an error code to the shell ?
another bug?
That may be a bug.
How to report it to developpers ?