diff options
author | Clément Bœsch <clement.boesch@smartjog.com> | 2012-05-30 10:26:53 +0200 |
---|---|---|
committer | Clément Bœsch <ubitux@gmail.com> | 2012-06-04 07:41:22 +0200 |
commit | 6b35f1a2a6432cb79f657ea3fadb86b8e12dddcb (patch) | |
tree | 372b3d3ee1664494f32d1b518caf54fb9c4dd20b /ffmpeg.c | |
parent | 0f0f3bd1e022639eb8e9c02b7b18f37071c21763 (diff) | |
download | ffmpeg-6b35f1a2a6432cb79f657ea3fadb86b8e12dddcb.tar.gz |
timecode: move timecode muxer options to metadata.
Some demuxers set a timecode in the format or streams metadata. The
muxers now make use of this metadata instead of a duplicated private
option.
This makes possible transparent copy of the timecode when transmuxing
and transcoding.
-timecode option for MPEG1/2 codec is also renamed to -gop_timecode. The
global ffmpeg -timecode option will set it anyway so no option change
visible for the user.
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -5618,6 +5618,16 @@ static int opt_deinterlace(const char *opt, const char *arg) return 0; } +static int opt_timecode(OptionsContext *o, const char *opt, const char *arg) +{ + char *tcr = av_asprintf("timecode=%s", arg); + int ret = parse_option(o, "metadata:g", tcr, options); + if (ret >= 0) + ret = opt_default("gop_timecode", arg); + av_free(tcr); + return ret; +} + static void parse_cpuflags(int argc, char **argv, const OptionDef *options) { int idx = locate_option(argc, argv, options, "cpuflags"); @@ -5752,6 +5762,7 @@ static const OptionDef options[] = { { "sameq", OPT_BOOL | OPT_VIDEO, {(void*)&same_quant}, "use same quantizer as source (implies VBR)" }, { "same_quant", OPT_BOOL | OPT_VIDEO, {(void*)&same_quant}, "use same quantizer as source (implies VBR)" }, + { "timecode", HAS_ARG | OPT_VIDEO | OPT_FUNC2, {(void*)opt_timecode}, "set initial TimeCode value.", "hh:mm:ss[:;.]ff" }, { "pass", HAS_ARG | OPT_VIDEO, {(void*)opt_pass}, "select the pass number (1 or 2)", "n" }, { "passlogfile", HAS_ARG | OPT_VIDEO, {(void*)&opt_passlogfile}, "select two pass log file name prefix", "prefix" }, { "deinterlace", OPT_EXPERT | OPT_VIDEO, {(void*)opt_deinterlace}, |