Hello. I've found that encoding with the ASF output format always gave a duration that was off by 2 seconds. For example, I transcode 30 seconds worth to an ASF file, and the result file has a reported duration of 28.5 seconds. The duration written in the ASF header does not take into account the preroll of 2 seconds. To find the duration of an ASF clip, the play duration has the preroll subtracted from it. In this case, it would always be off by 2 seconds. This patch takes the preroll into account. Thanks! pollux:~> ./ffmpeg -i INPUT.avi -t 00:00:30 OUTPUT.asf FFmpeg version SVN-r6197, Copyright (c) 2000-2004 Fabrice Bellard libavutil version: 49.0.0 libavcodec version: 51.13.0 libavformat version: 50.5.0 built on Sep 29 2006 14:22:51, gcc: 3.4.2 (mingw-special) Input #0, avi, from 'INPUT.avi': Duration: 00:03:50.8, start: 0.000000, bitrate: 657 kb/s Stream #0.0: Video: mpeg4, yuv420p, 352x240, 29.98 fps(r) Stream #0.1: Audio: mp3, 32000 Hz, stereo, 96 kb/s Output #0, asf, to 'OUTPUT.asf': Stream #0.0: Video: msmpeg4, yuv420p, 352x240, q=2-31, 200 kb/s, 29.98 fps(c) Stream #0.1: Audio: mp3, 32000 Hz, stereo, 64 kb/s Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 [msmpeg4 @ 00721000]warning, clipping 1 dct coefficients to -127..127 video:853kB audio:239kB global headers:0kB muxing overhead -99.950162% pollux:~> ./ffmpeg -i OUTPUT.asf FFmpeg version SVN-r6197, Copyright (c) 2000-2004 Fabrice Bellard libavutil version: 49.0.0 libavcodec version: 51.13.0 libavformat version: 50.5.0 built on Sep 29 2006 14:22:51, gcc: 3.4.2 (mingw-special) Seems that stream 0 comes from film source: 1000.00 (1000/1) -> 29.97 (30000/1001) Input #0, asf, from 'OUTPUT.asf': Duration: 00:00:28.5, start: 2.000000, bitrate: 303 kb/s Stream #0.0: Video: msmpeg4, yuv420p, 352x240, 29.97 fps(r) Stream #0.1: Audio: mp3, 32000 Hz, stereo, 64 kb/s Must supply at least one output file -- Brian Brice
Hi On Fri, Sep 29, 2006 at 05:49:58PM -0500, Brian Brice wrote:
Hello. I've found that encoding with the ASF output format always gave a duration that was off by 2 seconds. For example, I transcode 30 seconds worth to an ASF file, and the result file has a reported duration of 28.5 seconds. The duration written in the ASF header does not take into account the preroll of 2 seconds. To find the duration of an ASF clip, the play duration has the preroll subtracted from it. In this case, it would always be off by 2 seconds. This patch takes the preroll into account. Thanks!
looks ok except that it doesnt update the regession checksums or dont they change? [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB In the past you could go to a library and read, borrow or copy any book Today you'd get arrested for mere telling someone where the library is
Hi, On 9/30/06, Michael Niedermayer <michaelni at gmx.at> wrote:
Hi
On Fri, Sep 29, 2006 at 05:49:58PM -0500, Brian Brice wrote:
Hello. I've found that encoding with the ASF output format always gave a duration that was off by 2 seconds. For example, I transcode 30 seconds worth to an ASF file, and the result file has a reported duration of 28.5 seconds. The duration written in the ASF header does not take into account the preroll of 2 seconds. To find the duration of an ASF clip, the play duration has the preroll subtracted from it. In this case, it would always be off by 2 seconds. This patch takes the preroll into account. Thanks!
looks ok except that it doesnt update the regession checksums or dont they change?
They do change. Attached patch adds the new checksum. I will apply it in a few minutes since you OKed the original patch. Guillaume -- With DADVSI (http://en.wikipedia.org/wiki/DADVSI), France finally has a lead on USA on selling out individuals right to corporations! Vive la France!
On 10/1/06, Guillaume POIRIER <poirierg at gmail.com> wrote: [..]
They do change. Attached patch adds the new checksum. I will apply it in a few minutes since you OKed the original patch.
-- With DADVSI (http://en.wikipedia.org/wiki/DADVSI), France finally has a lead on USA on selling out individuals right to corporations! Vive la France!
participants (3)
-
bbrice@newtek.com -
michaelni@gmx.at -
poirierg@gmail.com