mirror of https://git.ffmpeg.org/ffmpeg.git
Remove the "b" OptionDef option from the ffmpeg.c file. From now on the unit of
-b of ffmpeg is bits/sec not kbits/sec, as already was the case for the AVOption. "k" and "M" suffixes are available though. Originally committed as revision 6258 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
7df00a4e06
commit
3c0ba8703c
|
@ -109,7 +109,7 @@ stream, in the order of the definition of output streams.
|
|||
* You can transcode decrypted VOBs
|
||||
|
||||
@example
|
||||
ffmpeg -i snatch_1.vob -f avi -vcodec mpeg4 -b 800 -g 300 -bf 2 -acodec mp3 -ab 128 snatch.avi
|
||||
ffmpeg -i snatch_1.vob -f avi -vcodec mpeg4 -b 800k -g 300 -bf 2 -acodec mp3 -ab 128 snatch.avi
|
||||
@end example
|
||||
|
||||
This is a typical DVD ripping example; the input is a VOB file, the
|
||||
|
@ -139,7 +139,7 @@ ffmpeg [[infile options][@option{-i} @var{infile}]]... @{[outfile options] @var{
|
|||
If no input file is given, audio/video grabbing is done.
|
||||
|
||||
As a general rule, options are applied to the next specified
|
||||
file. For example, if you give the @option{-b 64} option, it sets the video
|
||||
file. For example, if you give the @option{-b 64k} option, it sets the video
|
||||
bitrate of the next file. The format option may be needed for raw input
|
||||
files.
|
||||
|
||||
|
@ -226,7 +226,7 @@ streams are delayed by 'offset' seconds.
|
|||
|
||||
@table @option
|
||||
@item -b bitrate
|
||||
Set the video bitrate in kbit/s (default = 200 kb/s).
|
||||
Set the video bitrate in bit/s (default = 200 kb/s).
|
||||
@item -r fps
|
||||
Set frame rate (default = 25).
|
||||
@item -s size
|
||||
|
@ -618,7 +618,7 @@ the Linux player does not seem to be very fast, so it can miss
|
|||
frames. An example is:
|
||||
|
||||
@example
|
||||
ffmpeg -g 3 -r 3 -t 10 -b 50 -s qcif -f rv10 /tmp/b.rm
|
||||
ffmpeg -g 3 -r 3 -t 10 -b 50k -s qcif -f rv10 /tmp/b.rm
|
||||
@end example
|
||||
|
||||
@item The parameter 'q' which is displayed while encoding is the current
|
||||
|
|
14
ffmpeg.c
14
ffmpeg.c
|
@ -105,7 +105,6 @@ static int frame_rightBand = 0;
|
|||
static int max_frames[4] = {INT_MAX, INT_MAX, INT_MAX, INT_MAX};
|
||||
static int frame_rate = 25;
|
||||
static int frame_rate_base = 1;
|
||||
static int video_bit_rate = 200*1000;
|
||||
static int video_bit_rate_tolerance = 4000*1000;
|
||||
static float video_qscale = 0;
|
||||
static int video_qmin = 2;
|
||||
|
@ -2116,11 +2115,6 @@ static void opt_format(const char *arg)
|
|||
}
|
||||
}
|
||||
|
||||
static void opt_video_bitrate(const char *arg)
|
||||
{
|
||||
video_bit_rate = atoi(arg) * 1000;
|
||||
}
|
||||
|
||||
static void opt_video_bitrate_tolerance(const char *arg)
|
||||
{
|
||||
video_bit_rate_tolerance = atoi(arg) * 1000;
|
||||
|
@ -3020,7 +3014,6 @@ static void new_video_stream(AVFormatContext *oc)
|
|||
av_set_double(video_enc, opt_names[i], d);
|
||||
}
|
||||
|
||||
video_enc->bit_rate = video_bit_rate;
|
||||
video_enc->bit_rate_tolerance = video_bit_rate_tolerance;
|
||||
video_enc->time_base.den = frame_rate;
|
||||
video_enc->time_base.num = frame_rate_base;
|
||||
|
@ -3820,7 +3813,7 @@ static void opt_target(const char *arg)
|
|||
opt_frame_rate(frame_rates[norm]);
|
||||
opt_gop_size(norm ? "18" : "15");
|
||||
|
||||
video_bit_rate = 1150000;
|
||||
opt_default("b", "1150000");
|
||||
video_rc_max_rate = 1150000;
|
||||
video_rc_min_rate = 1150000;
|
||||
video_rc_buffer_size = 40*1024*8;
|
||||
|
@ -3847,7 +3840,7 @@ static void opt_target(const char *arg)
|
|||
opt_frame_rate(frame_rates[norm]);
|
||||
opt_gop_size(norm ? "18" : "15");
|
||||
|
||||
video_bit_rate = 2040000;
|
||||
opt_default("b", "2040000");
|
||||
video_rc_max_rate = 2516000;
|
||||
video_rc_min_rate = 0; //1145000;
|
||||
video_rc_buffer_size = 224*1024*8;
|
||||
|
@ -3869,7 +3862,7 @@ static void opt_target(const char *arg)
|
|||
opt_frame_rate(frame_rates[norm]);
|
||||
opt_gop_size(norm ? "18" : "15");
|
||||
|
||||
video_bit_rate = 6000000;
|
||||
opt_default("b", "6000000");
|
||||
video_rc_max_rate = 9000000;
|
||||
video_rc_min_rate = 0; //1500000;
|
||||
video_rc_buffer_size = 224*1024*8;
|
||||
|
@ -4010,7 +4003,6 @@ const OptionDef options[] = {
|
|||
{ "dts_delta_threshold", HAS_ARG | OPT_INT | OPT_EXPERT, {(void*)&dts_delta_threshold}, "timestamp discontinuity delta threshold", "" },
|
||||
|
||||
/* video options */
|
||||
{ "b", HAS_ARG | OPT_VIDEO, {(void*)opt_video_bitrate}, "set video bitrate (in kbit/s)", "bitrate" },
|
||||
{ "vframes", OPT_INT | HAS_ARG | OPT_VIDEO, {(void*)&max_frames[CODEC_TYPE_VIDEO]}, "set the number of video frames to record", "number" },
|
||||
{ "aframes", OPT_INT | HAS_ARG | OPT_AUDIO, {(void*)&max_frames[CODEC_TYPE_AUDIO]}, "set the number of audio frames to record", "number" },
|
||||
{ "dframes", OPT_INT | HAS_ARG, {(void*)&max_frames[CODEC_TYPE_DATA]}, "set the number of data frames to record", "number" },
|
||||
|
|
|
@ -320,7 +320,7 @@ fi
|
|||
if [ -n "$do_rc" ] ; then
|
||||
# mpeg4 rate control
|
||||
file=${outfile}mpeg4-rc.avi
|
||||
do_ffmpeg $file -y -b 400 -bf 2 -f pgmyuv -i $raw_src -an -vcodec mpeg4 $file
|
||||
do_ffmpeg $file -y -b 400k -bf 2 -f pgmyuv -i $raw_src -an -vcodec mpeg4 $file
|
||||
|
||||
# mpeg4 rate control decoding
|
||||
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
|
||||
|
@ -340,7 +340,7 @@ fi
|
|||
if [ -n "$do_mpeg4thread" ] ; then
|
||||
# mpeg4
|
||||
file=${outfile}mpeg4-thread.avi
|
||||
do_ffmpeg $file -y -b 500 -flags +mv4+part+aic+trell -mbd bits -ps 200 -bf 2 -f pgmyuv -i $raw_src -an -vcodec mpeg4 -threads 2 $file
|
||||
do_ffmpeg $file -y -b 500k -flags +mv4+part+aic+trell -mbd bits -ps 200 -bf 2 -f pgmyuv -i $raw_src -an -vcodec mpeg4 -threads 2 $file
|
||||
|
||||
# mpeg4 decoding
|
||||
do_ffmpeg $raw_dst -y -i $file -f rawvideo $raw_dst
|
||||
|
@ -360,7 +360,7 @@ fi
|
|||
if [ -n "$do_mp4psp" ] ; then
|
||||
# mp4 PSP style
|
||||
file=${outfile}mpeg4-PSP.mp4
|
||||
do_ffmpeg $file -y -b 768 -s 320x240 -f psp -ar 24000 -ab 32 -i $raw_src $file
|
||||
do_ffmpeg $file -y -b 768k -s 320x240 -f psp -ar 24000 -ab 32 -i $raw_src $file
|
||||
fi
|
||||
|
||||
###################################
|
||||
|
|
Loading…
Reference in New Issue