total duration wrong with the x264 codec?
Hello, I tried to encode a quicktime movie with the x264 codec I compiled into the ffmpeg (CVS snapshot from 15th October) and Quicktime 7 on Windows cannot play it. It says that the movie has a total duration of 47s. I played the movie with ffplay and it is played but also ffplay does not seek to a position when I click into the displaying window. Instead ffplay complains as well that the total duration is 47s. I did a raw h264 encoding (no mov) and I do get this error message: ffplay painting_diary_ipod.h264 Seek to 60% (-346208:-43:-25) of total duration (-577014:-32:-22) painting_diary_ipod.h264: error while seeking The message with the h264 in the mov is: Seek to 60% (00:00:28) of total duration (00:00:47) but the movie is 90 min long.... ABach
Dear All, What is the simplest way to read the size (WxH) information of a video or image file using ffmpeg? I know there is the size information in the log string such as: Input #0, mov,mp4,m4a,3gp, from '4BM60004.mp4': Duration: 00:00:05.0, bitrate: 146 kb/s Stream #0.0: Video: mpeg4, 176x144, 13.60 fps Stream #0.1: Audio: 0x726d6173, 8000 Hz, mono but is the position of this size value fixed? Is it safe for me to assume that in the input stream lines, the size of a video or image is always the 3rd value after the stream number? If not, then what is the rule I can let a program determine which item in the string is the size value? Best regards Xiaogang Zhang
On Mon, Oct 17, 2005 at 03:29:19PM +1000, Xiaogang Zhang wrote:
Dear All,
What is the simplest way to read the size (WxH) information of a video or image file using ffmpeg? I know there is the size information in the log string such as:
Input #0, mov,mp4,m4a,3gp, from '4BM60004.mp4': Duration: 00:00:05.0, bitrate: 146 kb/s Stream #0.0: Video: mpeg4, 176x144, 13.60 fps Stream #0.1: Audio: 0x726d6173, 8000 Hz, mono
but is the position of this size value fixed? Is it safe for me to assume that in the input stream lines, the size of a video or image is always the 3rd value after the stream number? If not, then what is the rule I can let a program determine which item in the string is the size value?
If you have a new question to ask, don't reply in an unrelated thread... Rich
ABach wrote:
Hello,
[...] It says that the movie has a total duration of 47s. [...] but the movie is 90 min long.... ok, I managed to get around this "total duration" problem by converting the movie into a mov-file using a normal m4v codec not a h264 and setting the frame size and frame rate already to the target. After that I can reencode the whole thing using the codec x264 and the total duration is correct (90min).
However ;) Quicktime 7 on Windows does not play it. I see now a blank screen for 90min instead of 47s... I downloaded a h264 encoded demo from apple and I tried to input it into ffmpeg (snapshot from 15th october) to find any difference. The first difference is that it has an audio stream, the second is that the audio stream is mapped to the stream 0.0 while ffmpeg usually puts the video stream first (?). When I reencode the demo, vlc can play it. When I do not reencode the demo vlc ends with a floating point exception. When I do this command /usr/local/bin/ffmpeg -i nasa_shuttle_m420p.mov -b 10000kb -f mov -vcodec copy -acodec copy copy_nasa.mov I get this: ffmpeg version CVS, build 3276800, Copyright (c) 2000-2004 Fabrice Bellard configuration: --enable-gpl --enable-pp --enable-libogg --enable-vorbis --enable-a52 --enable-dts --disable-debug --enable-mp3lame --enable-x264 --enable-faad --enable-shared-pp --prefix=/usr/local built on Oct 15 2005 23:11:06, gcc: 3.3.5 (Debian 1:3.3.5-8) Seems that stream 1 comes from film source: 2997.00 (2997/1) -> 30.00 (30/1) Input #0, mov,mp4,m4a,3gp,3g2, from 'nasa_shuttle_m420p.mov': Duration: 00:01:00.9, start: 0.000000, bitrate: 1980 kb/s Stream #0.0: Audio: aac, 48000 Hz, stereo Stream #0.1, 30.00 fps: Video: h264, yuv420p, 960x540 File 'copy_nasa.mov' already exists. Overwrite ? [y/N] y Output #0, mov, to 'copy_nasa.mov': Stream #0.0, nan fps: Video: h264, 960x540, q=2-31 Stream #0.1: Audio: mp4a / 0x6134706D, 48000 Hz, stereo Stream mapping: Stream #0.1 -> #0.0 Stream #0.0 -> #0.1 Press [q] to stop encoding error, non monotone timestamps 3003 >= 3003 error, non monotone timestamps 12012 >= 12012 error, non monotone timestamps 18018 >= 18018 error, non monotone timestamps 24024 >= 24024 error, non monotone timestamps 30030 >= 30030 error, non monotone timestamps 36036 >= 36036 error, non monotone timestamps 42042 >= 42042 error, non monotone timestamps 48048 >= 48048 error, non monotone timestamps 54054 >= 54054 error, non monotone timestamps 60060 >= 60060 error, non monotone timestamps 66066 >= 66066 error, non monotone timestamps 72072 >= 72072 error, non monotone timestamps 78078 >= 78078 error, non monotone timestamps 84084 >= 84084 error, non monotone timestamps 90090 >= 90090 error, non monotone timestamps 96096 >= 96096 [...] Any ideas? ABach
participants (3)
-
dalias@aerifal.cx -
monster@vampeuse.de -
xiaogangz@acm.org