[Ffmpeg-cvslog] r6258 - in trunk: doc/ffmpeg-doc.texi ffmpeg.c tests/regression.sh

takis subversion
Fri Sep 15 13:15:55 CEST 2006


Author: takis
Date: Fri Sep 15 13:15:55 2006
New Revision: 6258

Modified:
   trunk/doc/ffmpeg-doc.texi
   trunk/ffmpeg.c
   trunk/tests/regression.sh

Log:
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.


Modified: trunk/doc/ffmpeg-doc.texi
==============================================================================
--- trunk/doc/ffmpeg-doc.texi	(original)
+++ trunk/doc/ffmpeg-doc.texi	Fri Sep 15 13:15:55 2006
@@ -109,7 +109,7 @@
 * 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 @@
 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 @@
 
 @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 @@
 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

Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c	(original)
+++ trunk/ffmpeg.c	Fri Sep 15 13:15:55 2006
@@ -105,7 +105,6 @@
 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_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 @@
                  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 @@
         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 @@
         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 @@
         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 @@
     { "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" },

Modified: trunk/tests/regression.sh
==============================================================================
--- trunk/tests/regression.sh	(original)
+++ trunk/tests/regression.sh	Fri Sep 15 13:15:55 2006
@@ -320,7 +320,7 @@
 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 @@
 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 @@
 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
 
 ###################################




More information about the ffmpeg-cvslog mailing list