Commit 64db1a82 authored by Anton Khirnov's avatar Anton Khirnov

lavc: add audio flag to the 'b' option, deprecate 'ab'.

Its only reason for its existence was ffmpeg's inability to properly assign
AVOptions to streams. Now this is not a problem anymore, so 'ab' should
go.
parent f4ad238c
......@@ -3908,7 +3908,7 @@ static int opt_target(const char *opt, const char *arg)
opt_default("minrate", "1150000");
opt_default("bufsize", "327680"); // 40*1024*8;
opt_default("ab", "224000");
opt_default("b:a", "224000");
audio_sample_rate = 44100;
audio_channels = 2;
......@@ -3938,7 +3938,7 @@ static int opt_target(const char *opt, const char *arg)
opt_default("flags", "+scan_offset");
opt_default("ab", "224000");
opt_default("b:a", "224000");
audio_sample_rate = 44100;
opt_default("packetsize", "2324");
......@@ -3961,7 +3961,7 @@ static int opt_target(const char *opt, const char *arg)
opt_default("packetsize", "2048"); // from www.mpucoder.com: DVD sectors contain 2048 bytes of data, this is also the size of one pack.
opt_default("muxrate", "10080000"); // from mplex project: data_rate = 1260000. mux_rate = data_rate * 8
opt_default("ab", "448000");
opt_default("b:a", "448000");
audio_sample_rate = 48000;
} else if(!strncmp(arg, "dv", 2)) {
......
......@@ -956,7 +956,7 @@ You can encode to several formats at the same time and define a
mapping from input stream to output streams:
@example
avconv -i /tmp/a.wav -map 0:a -ab 64k /tmp/a.mp2 -map 0:a -ab 128k /tmp/b.mp2
avconv -i /tmp/a.wav -map 0:a -b 64k /tmp/a.mp2 -map 0:a -b 128k /tmp/b.mp2
@end example
Converts a.wav to a.mp2 at 64 kbits and to b.mp2 at 128 kbits. '-map
......@@ -967,7 +967,7 @@ stream, in the order of the definition of output streams.
You can transcode decrypted VOBs:
@example
avconv -i snatch_1.vob -f avi -c:v mpeg4 -b 800k -g 300 -bf 2 -c:a libmp3lame -ab 128k snatch.avi
avconv -i snatch_1.vob -f avi -c:v mpeg4 -b:v 800k -g 300 -bf 2 -c:a libmp3lame -b:a 128k snatch.avi
@end example
This is a typical DVD ripping example; the input is a VOB file, the
......
......@@ -70,8 +70,8 @@ static const AVOption *opt_find(void *obj, const char *name, const char *unit, i
#define AV_CODEC_DEFAULT_BITRATE 200*1000
static const AVOption options[]={
{"b", "set bitrate (in bits/s)", OFFSET(bit_rate), FF_OPT_TYPE_INT, {.dbl = AV_CODEC_DEFAULT_BITRATE }, INT_MIN, INT_MAX, V|E},
{"ab", "set bitrate (in bits/s)", OFFSET(bit_rate), FF_OPT_TYPE_INT, {.dbl = AV_CODEC_DEFAULT_BITRATE }, INT_MIN, INT_MAX, A|E},
{"b", "set bitrate (in bits/s)", OFFSET(bit_rate), FF_OPT_TYPE_INT, {.dbl = AV_CODEC_DEFAULT_BITRATE }, INT_MIN, INT_MAX, V|A|E},
{"ab", "this option is deprecated, use b", OFFSET(bit_rate), FF_OPT_TYPE_INT, {.dbl = AV_CODEC_DEFAULT_BITRATE }, INT_MIN, INT_MAX, A|E},
{"bt", "set video bitrate tolerance (in bits/s)", OFFSET(bit_rate_tolerance), FF_OPT_TYPE_INT, {.dbl = AV_CODEC_DEFAULT_BITRATE*20 }, 1, INT_MAX, V|E},
{"flags", NULL, OFFSET(flags), FF_OPT_TYPE_FLAGS, {.dbl = DEFAULT }, 0, UINT_MAX, V|A|E|D, "flags"},
{"mv4", "use four motion vector by macroblock (mpeg4)", 0, FF_OPT_TYPE_CONST, {.dbl = CODEC_FLAG_4MV }, INT_MIN, INT_MAX, V|E, "flags"},
......
......@@ -16,7 +16,7 @@ if [ -n "$do_vref" ]; then
do_avconv $raw_ref -f image2 -vcodec pgmyuv -i $raw_src -an -f rawvideo
fi
if [ -n "$do_aref" ]; then
do_avconv $pcm_ref -ab 128k -ac 2 -ar 44100 -f s16le -i $pcm_src -f wav
do_avconv $pcm_ref -b 128k -ac 2 -ar 44100 -f s16le -i $pcm_src -f wav
fi
if [ -n "$do_mpeg" ] ; then
......@@ -279,7 +279,7 @@ do_audio_encoding ac3.rm "-vn -acodec ac3_fixed"
fi
if [ -n "$do_g726" ] ; then
do_audio_encoding g726.wav "-ab 32k -ac 1 -ar 8000 -acodec g726"
do_audio_encoding g726.wav "-b 32k -ac 1 -ar 8000 -acodec g726"
do_audio_decoding
fi
......
......@@ -14,7 +14,7 @@ eval do_$test=y
do_lavf()
{
file=${outfile}lavf.$1
do_avconv $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -ab 64k -t 1 -qscale 10 $2
do_avconv $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -b:a 64k -t 1 -qscale 10 $2
do_avconv_crc $file $DEC_OPTS -i $target_path/$file $3
}
......@@ -53,7 +53,7 @@ fi
if [ -n "$do_rm" ] ; then
file=${outfile}lavf.rm
do_avconv $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -t 1 -qscale 10 -acodec ac3_fixed -ab 64k
do_avconv $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -t 1 -qscale 10 -acodec ac3_fixed -b:a 64k
# broken
#do_avconv_crc $file -i $target_path/$file
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment