[FFmpeg-devel] [PATCH 1/3] avformat/movenc: Add command line option to set base mov file timescale

Marton Balint cus at passwd.hu
Fri May 22 00:11:07 EEST 2020



On Mon, 20 Apr 2020, Kevin Wheatley wrote:

> Signed-off-by: Kevin Wheatley <kevin.j.wheatley at gmail.com>
> ---
> libavformat/movenc.c | 1 +
> libavformat/movenc.h | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/libavformat/movenc.c b/libavformat/movenc.c
> index 253cff8..7d79eca 100644
> --- a/libavformat/movenc.c
> +++ b/libavformat/movenc.c
> @@ -91,6 +91,7 @@ static const AVOption options[] = {
>     { "min_frag_duration", "Minimum fragment duration", offsetof(MOVMuxContext, min_fragment_duration), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM},
>     { "frag_size", "Maximum fragment size", offsetof(MOVMuxContext, max_fragment_size), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM},
>     { "ism_lookahead", "Number of lookahead entries for ISM files", offsetof(MOVMuxContext, ism_lookahead), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM},
> +    { "mov_timescale", "set timescale of mov container", offsetof(MOVMuxContext, mov_timescale), AV_OPT_TYPE_INT, {.i64 = MOV_TIMESCALE}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM},

Docs update is missing.

>     { "video_track_timescale", "set timescale of all video tracks", offsetof(MOVMuxContext, video_track_timescale), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM},
>     { "brand",    "Override major brand", offsetof(MOVMuxContext, major_brand),   AV_OPT_TYPE_STRING, {.str = NULL}, .flags = AV_OPT_FLAG_ENCODING_PARAM },
>     { "use_editlist", "use edit list", offsetof(MOVMuxContext, use_editlist), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, AV_OPT_FLAG_ENCODING_PARAM},
> diff --git a/libavformat/movenc.h b/libavformat/movenc.h
> index 997b2d6..322968c 100644
> --- a/libavformat/movenc.h
> +++ b/libavformat/movenc.h
> @@ -205,6 +205,7 @@ typedef struct MOVMuxContext {
>     AVIOContext *mdat_buf;
>     int first_trun;
> 
> +    int mov_timescale;
>     int video_track_timescale;
>
>     int reserved_moov_size; ///< 0 for disabled, -1 for automatic, size otherwise
> -- 
> 1.8.5.6

Regards,
Marton


More information about the ffmpeg-devel mailing list