logo       

Re: keeping bitrate during conversion: msg#00197

video.ffmpeg.user

Subject: Re: keeping bitrate during conversion

Michel Bardiaux wrote:
astrograph GMX wrote:
hi,

I am trying to convert .mp4 videos to .3gp, it works, but there is a big difference in bitrate between the original and the converted copy:

ffmpeg -i media/470222.mp4 test3.3gp
ffmpeg version 0.4.9-pre1, build 4718, Copyright (c) 2000-2004 Fabrice Bellard
built on Feb 28 2005 14:45:40, gcc: 3.2.3 20030502 (Red Hat Linux 3.2.3-49)

This is very old. Please upgrade to CVS.

thank you for your quick response!! yes, I am aware of that, I ran into the problem that I wasn´t able to compile the current version of ffmpeg:

]$ make
make -C libavutil all
make[1]: Entering directory `/opt/qpass/mediaconverter/tools/ffmpeg/libavutil'
gcc -O3 -g -Wall -Wno-switch -Wdeclaration-after-statement -DHAVE_AV_CONFIG_H -DBUILD_AVUTIL -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o mathematics.o mathematics.c
In file included from mathematics.c:24:
common.h:608: warning: static declaration of 'lrintf' follows non-static declaration
mathematics.c:132:7: warning: no newline at end of file
gcc -O3 -g -Wall -Wno-switch -Wdeclaration-after-statement -DHAVE_AV_CONFIG_H -DBUILD_AVUTIL -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o rational.o rational.c
In file included from rational.c:30:
common.h:608: warning: static declaration of 'lrintf' follows non-static declaration
gcc -O3 -g -Wall -Wno-switch -Wdeclaration-after-statement -DHAVE_AV_CONFIG_H -DBUILD_AVUTIL -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o intfloat_readwrite.o intfloat_readwrite.c
In file included from intfloat_readwrite.c:26:
common.h:608: warning: static declaration of 'lrintf' follows non-static declaration
gcc -O3 -g -Wall -Wno-switch -Wdeclaration-after-statement -DHAVE_AV_CONFIG_H -DBUILD_AVUTIL -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o crc.o crc.c
In file included from crc.c:1:
common.h:608: warning: static declaration of 'lrintf' follows non-static declaration
rm -f libavutil.a
ar rc libavutil.a mathematics.o rational.o intfloat_readwrite.o crc.o
ranlib libavutil.a
make[1]: Leaving directory `/opt/qpass/mediaconverter/tools/ffmpeg/libavutil'
make -C libavcodec all
make[1]: Entering directory `/opt/qpass/mediaconverter/tools/ffmpeg/libavcodec'
gcc -O3 -g -Wall -Wno-switch -Wdeclaration-after-statement -DHAVE_AV_CONFIG_H -I.. -I/opt/qpass/mediaconverter/tools/ffmpeg/libavutil -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o bitstream.o bitstream.c
In file included from /opt/qpass/mediaconverter/tools/ffmpeg/libavutil/avutil.h:24,
from avcodec.h:14,
from bitstream.c:28:
/opt/qpass/mediaconverter/tools/ffmpeg/libavutil/common.h:608: warning: static declaration of 'lrintf' follows non-static declaration
gcc -O3 -g -Wall -Wno-switch -Wdeclaration-after-statement -DHAVE_AV_CONFIG_H -I.. -I/opt/qpass/mediaconverter/tools/ffmpeg/libavutil -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o utils.o utils.c
In file included from /opt/qpass/mediaconverter/tools/ffmpeg/libavutil/avutil.h:24,
from avcodec.h:14,
from utils.c:27:
/opt/qpass/mediaconverter/tools/ffmpeg/libavutil/common.h:608: warning: static declaration of 'lrintf' follows non-static declaration
utils.c: In function `avcodec_string':
utils.c:1093: warning: implicit declaration of function `_snprintf'
utils.c: In function `av_tempfile':
utils.c:1375: error: `_O_RDWR' undeclared (first use in this function)
utils.c:1375: error: (Each undeclared identifier is reported only once
utils.c:1375: error: for each function it appears in.)
utils.c:1375: error: `_O_BINARY' undeclared (first use in this function)
utils.c:1375: error: `_O_CREAT' undeclared (first use in this function)
make[1]: *** [utils.o] Error 1
make[1]: Leaving directory `/opt/qpass/mediaconverter/tools/ffmpeg/libavcodec'
make: *** [lib] Error 2

any idea what could be causing this?

thx

Phil


Input #0, mov,mp4,m4a,3gp, from 'media/470222.mp4':
Duration: 00:00:30.0, bitrate: 80 kb/s
Stream #0.0: Video: mpeg4, 176x144, 12.00 fps
Stream #0.1: Audio: amr_nb, 8000 Hz, mono
Output #0, 3gp, to 'test3.3gp':
Stream #0.0: Video: h263, 176x144, 12.00 fps, q=2-31, 200 kb/s

Normal, 200kb/s is the default bitrate for the ffmpeg command line app.

Stream #0.1: Audio: amr_nb, 8000 Hz, mono, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
[h263 @ 0x443014]warning, cliping 1 dct coefficents to -127..127
...<snip/>...
[h263 @ 0x443014]warning, cliping 1 dct coefficents to -127..127
frame= 360 q=2.0 Lsize= 846kB time=30.0 bitrate= 231.0kbits/s
video:789kB audio:47kB global headers:0kB muxing overhead 1.184066%

of course I can set the bitrate parameters manually:

ffmpeg -i media/470222.mp4 -b 50 -ab 10 test4.3gp
ffmpeg version 0.4.9-pre1, build 4718, Copyright (c) 2000-2004 Fabrice Bellard
built on Feb 28 2005 14:45:40, gcc: 3.2.3 20030502 (Red Hat Linux 3.2.3-49)
Input #0, mov,mp4,m4a,3gp, from 'media/470222.mp4':
Duration: 00:00:30.0, bitrate: 80 kb/s
Stream #0.0: Video: mpeg4, 176x144, 12.00 fps
Stream #0.1: Audio: amr_nb, 8000 Hz, mono
Output #0, 3gp, to 'test4.3gp':
Stream #0.0: Video: h263, 176x144, 12.00 fps, q=2-31, 50 kb/s
Stream #0.1: Audio: amr_nb, 8000 Hz, mono, 10 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
[h263 @ 0x351014]warning, cliping 1 dct coefficents to -127..127
[h263 @ 0x351014]warning, cliping 1 dct coefficents to -127..127
frame= 360 q=4.4 Lsize= 324kB time=30.0 bitrate= 88.6kbits/s
video:275kB audio:40kB global headers:0kB muxing overhead 3.161163%

question 1: is there a way to tell ffmpeg to keep the (overall) bitrate from the original?

No.

question 2: is there a command which returns the bitrate(s) for a specific file?

No.


thx

Phil

_______________________________________________
ffmpeg-user mailing list
ffmpeg-user@xxxxxxxxxxxx
http://mplayerhq.hu/mailman/listinfo/ffmpeg-user




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise