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.
NJ> And, how come it does not return an error code to the shell ?
another bug?
That may be a bug. -- Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA SMARTJOG S.A. http://www.smartjog.com Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA Phone: +33 1 49966312