[FFmpeg-devel] [PATCH] Calculate and store mov bitrate
aviad rozenhek
aviadr1
Tue Sep 22 11:12:04 CEST 2009
On Thu, Aug 20, 2009 at 16:47, haim alon <haim.alter at gmail.com> wrote:
> Hi,
> This patch calculates the actual bitrate of a mov file and stores it in the
> AVCodecContext structure.
> Regards
> Haim.
>
>
Hi,I'd like to ping the ffmpeg-devel on this patch, and offer an example of
why it is useful.
the gist of it is that several ffmpeg demuxers provide per-stream bitrate
information, while the .mov demuxer doesn't.
this is the printout of running ffmpeg -i on just an arbitrary .flv file we
have in our sample files
notice that bitrate information for the video stream *is* available
$>ffmpeg -i "\\aptest\qamedia\QAInternalTests\flv files\OneTouchTV1.flv"
FFmpeg version SVN-r19958, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --enable-shared --disable-static --enable-memalign-hack
--prefix=/mingw --cross-prefix=i686-mingw32- --cc=ccache-i686-mingw32-gcc
--ta
--enable-libvorbis --enable-libtheora --enable-libspeex --enable-libmp3lame
--enable-libopenjpeg --enable-libxvid --enable-libschroedinger --enable-li
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.35. 0 / 52.35. 0
libavformat 52.38. 0 / 52.38. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
built on Sep 22 2009 04:02:51, gcc: 4.2.4
Seems stream 0 codec frame rate differs from container frame rate: 1000.00
(1000/1) -> 25.00 (25/1)
Input #0, flv, from '\\aptest\qamedia\QAInternalTests\flv
files\OneTouchTV1.flv':
Duration: 00:01:37.87, start: 0.000000, bitrate: 1699 kb/s
Stream #0.0: Video: flv, yuv420p, 768x576, *1699 kb/s*, 25 tbr, 1k tbn,
1k tbc
Stream #0.1: Audio: mp3, 44100 Hz, 2 channels, s16
Metadata
duration : 98
width : 768
height : 768
videodatarate : 1660
audiodatarate : 96
framerate : 25
creationdate : Fri Jun 16 11:32:13 2006
At least one output file must be specified
this is the printout of running ffmpeg -i on just an arbitrary .mov file we
have in our sample files
notice that bitrate information for the video stream *is* *not* available
$> ffmpeg -i "\\aptest\qamedia\QAInternalTests\mov files\Harry Potter and
The Blood Prince.mov"
FFmpeg version SVN-r19958, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --enable-shared --disable-static --enable-memalign-hack
--prefix=/mingw --cross-prefix=i686-mingw32- --cc=ccache-i686-mingw32-gcc
--target-os=mingw32 --ar
--enable-libvorbis --enable-libtheora --enable-libspeex --enable-libmp3lame
--enable-libopenjpeg --enable-libxvid --enable-libschroedinger
--enable-libx264
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.35. 0 / 52.35. 0
libavformat 52.38. 0 / 52.38. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
built on Sep 22 2009 04:02:51, gcc: 4.2.4
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1ca8c00]max_analyze_duration reached
Seems stream 0 codec frame rate differs from container frame rate: 5994.00
(5994/1) -> 23.98 (24000/1001)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
'\\aptest\qamedia\QAInternalTests\mov files\Harry Potter and The Blood
Prince.mov':
Duration: 00:01:50.16, start: 0.000000, bitrate: 2664 kb/s
Stream #0.0(eng): Video: h264, yuv420p, 848x352, 23.98 tbr, 2997 tbn,
5994 tbc
Stream #0.1(eng): Audio: aac, 48000 Hz, 6 channels, s16
Stream #0.2(eng): Data: tmcd / 0x64636D74
Metadata
comment : Encoded and delivered by apple.com/trailers/
comment-eng : Encoded and delivered by apple.com/trailers/
copyright : ? 2008 Warner Bros. Pictures. All Rights Reserved
copyright-eng : ? 2008 Warner Bros. Pictures. All Rights Reserved
title : Harry Potter and The Blood Prince
title-eng : Harry Potter and The Blood Prince
At least one output file must be specified
--
Aviad Rozenhek
More information about the ffmpeg-devel
mailing list