Commit 4a908866 authored by Anton Khirnov's avatar Anton Khirnov Committed by Michael Niedermayer

ffmpeg.c: rename map_meta_data option to map_metadata

It's consistent with the -metadata option and easier to write.
Signed-off-by: 's avatarJanne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 87e4d9b2)
parent e921bd57
...@@ -628,7 +628,10 @@ Just enumerate the input streams in the order you want them in the output. ...@@ -628,7 +628,10 @@ Just enumerate the input streams in the order you want them in the output.
@var{sync_stream_id} if specified sets the input stream to sync @var{sync_stream_id} if specified sets the input stream to sync
against. against.
@item -map_meta_data @var{outfile}[,@var{metadata}]:@var{infile}[,@var{metadata}] @item -map_meta_data @var{outfile}[,@var{metadata}]:@var{infile}[,@var{metadata}]
Set meta data information of @var{outfile} from @var{infile}. Note that those Deprecated, use @var{-map_metadata} instead.
@item -map_metadata @var{outfile}[,@var{metadata}]:@var{infile}[,@var{metadata}]
Set metadata information of @var{outfile} from @var{infile}. Note that those
are file indices (zero-based), not filenames. are file indices (zero-based), not filenames.
Optional @var{metadata} parameters specify, which metadata to copy - (g)lobal Optional @var{metadata} parameters specify, which metadata to copy - (g)lobal
(i.e. metadata that applies to the whole file), per-(s)tream, per-(c)hapter or (i.e. metadata that applies to the whole file), per-(s)tream, per-(c)hapter or
...@@ -644,7 +647,7 @@ file index can be used to create a dummy mapping that just disables automatic co ...@@ -644,7 +647,7 @@ file index can be used to create a dummy mapping that just disables automatic co
For example to copy metadata from the first stream of the input file to global metadata For example to copy metadata from the first stream of the input file to global metadata
of the output file: of the output file:
@example @example
ffmpeg -i in.ogg -map_meta_data 0:0,s0 out.mp3 ffmpeg -i in.ogg -map_metadata 0:0,s0 out.mp3
@end example @end example
@item -map_chapters @var{outfile}:@var{infile} @item -map_chapters @var{outfile}:@var{infile}
Copy chapters from @var{infile} to @var{outfile}. If no chapter mapping is specified, Copy chapters from @var{infile} to @var{outfile}. If no chapter mapping is specified,
......
...@@ -3027,7 +3027,7 @@ static void parse_meta_type(char *arg, char *type, int *index, char **endptr) ...@@ -3027,7 +3027,7 @@ static void parse_meta_type(char *arg, char *type, int *index, char **endptr)
*type = 'g'; *type = 'g';
} }
static void opt_map_meta_data(const char *arg) static void opt_map_metadata(const char *arg)
{ {
AVMetaDataMap *m, *m1; AVMetaDataMap *m, *m1;
char *p; char *p;
...@@ -3053,6 +3053,13 @@ static void opt_map_meta_data(const char *arg) ...@@ -3053,6 +3053,13 @@ static void opt_map_meta_data(const char *arg)
metadata_chapters_autocopy = 0; metadata_chapters_autocopy = 0;
} }
static void opt_map_meta_data(const char *arg)
{
fprintf(stderr, "-map_meta_data is deprecated and will be removed soon. "
"Use -map_metadata instead.\n");
opt_map_metadata(arg);
}
static void opt_map_chapters(const char *arg) static void opt_map_chapters(const char *arg)
{ {
AVChapterMap *c; AVChapterMap *c;
...@@ -4211,7 +4218,10 @@ static const OptionDef options[] = { ...@@ -4211,7 +4218,10 @@ static const OptionDef options[] = {
{ "i", HAS_ARG, {(void*)opt_input_file}, "input file name", "filename" }, { "i", HAS_ARG, {(void*)opt_input_file}, "input file name", "filename" },
{ "y", OPT_BOOL, {(void*)&file_overwrite}, "overwrite output files" }, { "y", OPT_BOOL, {(void*)&file_overwrite}, "overwrite output files" },
{ "map", HAS_ARG | OPT_EXPERT, {(void*)opt_map}, "set input stream mapping", "file:stream[:syncfile:syncstream]" }, { "map", HAS_ARG | OPT_EXPERT, {(void*)opt_map}, "set input stream mapping", "file:stream[:syncfile:syncstream]" },
{ "map_meta_data", HAS_ARG | OPT_EXPERT, {(void*)opt_map_meta_data}, "set meta data information of outfile from infile", "outfile[,metadata]:infile[,metadata]" }, { "map_meta_data", HAS_ARG | OPT_EXPERT, {(void*)opt_map_meta_data}, "DEPRECATED set meta data information of outfile from infile",
"outfile[,metadata]:infile[,metadata]" },
{ "map_metadata", HAS_ARG | OPT_EXPERT, {(void*)opt_map_metadata}, "set metadata information of outfile from infile",
"outfile[,metadata]:infile[,metadata]" },
{ "map_chapters", HAS_ARG | OPT_EXPERT, {(void*)opt_map_chapters}, "set chapters mapping", "outfile:infile" }, { "map_chapters", HAS_ARG | OPT_EXPERT, {(void*)opt_map_chapters}, "set chapters mapping", "outfile:infile" },
{ "t", OPT_FUNC2 | HAS_ARG, {(void*)opt_recording_time}, "record or transcode \"duration\" seconds of audio/video", "duration" }, { "t", OPT_FUNC2 | HAS_ARG, {(void*)opt_recording_time}, "record or transcode \"duration\" seconds of audio/video", "duration" },
{ "fs", HAS_ARG | OPT_INT64, {(void*)&limit_filesize}, "set the limit file size in bytes", "limit_size" }, // { "fs", HAS_ARG | OPT_INT64, {(void*)&limit_filesize}, "set the limit file size in bytes", "limit_size" }, //
......
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