[FFmpeg-devel] [PATCH] lavc: enable time_base encoding option
Stefano Sabatini
stefasab at gmail.com
Fri Jan 24 18:16:22 CET 2014
On date Friday 2014-01-24 18:11:14 +0100, Stefano Sabatini encoded:
> ---
> libavcodec/options_table.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
> index c82c104..89c30fc 100644
> --- a/libavcodec/options_table.h
> +++ b/libavcodec/options_table.h
> @@ -92,7 +92,7 @@ static const AVOption avcodec_options[] = {
> {"umh", "umh motion estimation", 0, AV_OPT_TYPE_CONST, {.i64 = ME_UMH }, INT_MIN, INT_MAX, V|E, "me_method" },
> {"iter", "iter motion estimation", 0, AV_OPT_TYPE_CONST, {.i64 = ME_ITER }, INT_MIN, INT_MAX, V|E, "me_method" },
> {"extradata_size", NULL, OFFSET(extradata_size), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX},
> -{"time_base", NULL, OFFSET(time_base), AV_OPT_TYPE_RATIONAL, {.dbl = 0}, INT_MIN, INT_MAX},
> +{"time_base", NULL, OFFSET(time_base), AV_OPT_TYPE_RATIONAL, {.dbl = 0}, INT_MIN, INT_MAX, V|E},
Any reason why this is not enabled?
Anyway I have all kind of weird behaviors if I use it, for example
libx264 sets the FPS based on this value:
x4->params.i_fps_num = x4->params.i_timebase_den = avctx->time_base.den;
x4->params.i_fps_den = x4->params.i_timebase_num = avctx->time_base.num;
I need to set this to improve timestamp accuracy when transcoding,
otherwise I get significant rounding errors when passing e.g. from
1/1000000 -> 1001/24000. Comments are welcome.
--
FFmpeg = Fierce and Fast Mastering Programmable Extensive Game
More information about the ffmpeg-devel
mailing list