* 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
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.
@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
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
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;
}
}
-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;
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;
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;
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;
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;
{ "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" },
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
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
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
###################################