1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-15 14:13:16 +02:00

avcodec: Add "sar" alias to "aspect" option of video encoders

It is impossible to pass "aspect" parameter to encoder from ffmpeg CLI
because option from lavc/options_table.h is eclipsed by option with same
name in ffmpeg_opt.c, which has different meaning (DAR, not SAR).

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Andrey Utkin
2016-05-05 15:37:49 +03:00
committed by Michael Niedermayer
parent 1d4400ac7f
commit abb69a2f2b
4 changed files with 8 additions and 0 deletions

View File

@@ -456,6 +456,9 @@ Possible values:
@item aspect @var{rational number} (@emph{encoding,video}) @item aspect @var{rational number} (@emph{encoding,video})
Set sample aspect ratio. Set sample aspect ratio.
@item sar @var{rational number} (@emph{encoding,video})
Set sample aspect ratio. Alias to @var{aspect}.
@item debug @var{flags} (@emph{decoding/encoding,audio,video,subtitles}) @item debug @var{flags} (@emph{decoding/encoding,audio,video,subtitles})
Print specific debug info. Print specific debug info.

View File

@@ -254,6 +254,7 @@ static const AVOption avcodec_options[] = {
{"median", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PRED_MEDIAN }, INT_MIN, INT_MAX, V|E, "pred"}, {"median", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_PRED_MEDIAN }, INT_MIN, INT_MAX, V|E, "pred"},
#endif #endif
{"aspect", "sample aspect ratio", OFFSET(sample_aspect_ratio), AV_OPT_TYPE_RATIONAL, {.dbl = 0}, 0, 10, V|E}, {"aspect", "sample aspect ratio", OFFSET(sample_aspect_ratio), AV_OPT_TYPE_RATIONAL, {.dbl = 0}, 0, 10, V|E},
{"sar", "sample aspect ratio", OFFSET(sample_aspect_ratio), AV_OPT_TYPE_RATIONAL, {.dbl = 0}, 0, 10, V|E},
{"debug", "print specific debug info", OFFSET(debug), AV_OPT_TYPE_FLAGS, {.i64 = DEFAULT }, 0, INT_MAX, V|A|S|E|D, "debug"}, {"debug", "print specific debug info", OFFSET(debug), AV_OPT_TYPE_FLAGS, {.i64 = DEFAULT }, 0, INT_MAX, V|A|S|E|D, "debug"},
{"pict", "picture info", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_PICT_INFO }, INT_MIN, INT_MAX, V|D, "debug"}, {"pict", "picture info", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_PICT_INFO }, INT_MIN, INT_MAX, V|D, "debug"},
{"rc", "rate control", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_RC }, INT_MIN, INT_MAX, V|E, "debug"}, {"rc", "rate control", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DEBUG_RC }, INT_MIN, INT_MAX, V|E, "debug"},

View File

@@ -62,6 +62,7 @@ stream=0, decode=0
bits_per_coded_sample=0 bits_per_coded_sample=0
pred=0 pred=0
aspect=180/180 aspect=180/180
sar=180/180
debug=0x00000000 debug=0x00000000
vismv=0x00000000 vismv=0x00000000
cmp=0 cmp=0
@@ -218,6 +219,7 @@ stream=0, decode=1
bits_per_coded_sample=0 bits_per_coded_sample=0
pred=0 pred=0
aspect=180/180 aspect=180/180
sar=180/180
debug=0x00000000 debug=0x00000000
vismv=0x00000000 vismv=0x00000000
cmp=0 cmp=0

View File

@@ -62,6 +62,7 @@ stream=0, decode=0
bits_per_coded_sample=0 bits_per_coded_sample=0
pred=0 pred=0
aspect=2835/2835 aspect=2835/2835
sar=2835/2835
debug=0x00000000 debug=0x00000000
vismv=0x00000000 vismv=0x00000000
cmp=0 cmp=0
@@ -218,6 +219,7 @@ stream=0, decode=1
bits_per_coded_sample=0 bits_per_coded_sample=0
pred=0 pred=0
aspect=2835/2835 aspect=2835/2835
sar=2835/2835
debug=0x00000000 debug=0x00000000
vismv=0x00000000 vismv=0x00000000
cmp=0 cmp=0