[FFmpeg-cvslog] avconv: remove presets.
Anton Khirnov
git at videolan.org
Wed Aug 17 00:06:31 CEST 2011
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Fri Aug 12 19:19:19 2011 +0200| [ff884c79ee16def93a3daa709f44ed65046e03df] | committer: Anton Khirnov
avconv: remove presets.
Nothing except x264 uses them and native x264 presets should be used
with private options.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ff884c79ee16def93a3daa709f44ed65046e03df
---
avconv.c | 45 ---------------------------------------------
doc/avconv.texi | 34 ----------------------------------
2 files changed, 0 insertions(+), 79 deletions(-)
diff --git a/avconv.c b/avconv.c
index 9df4779..35d43b9 100644
--- a/avconv.c
+++ b/avconv.c
@@ -4076,47 +4076,6 @@ static int opt_bsf(const char *opt, const char *arg)
return 0;
}
-static int opt_preset(const char *opt, const char *arg)
-{
- FILE *f=NULL;
- char filename[1000], tmp[1000], tmp2[1000], line[1000];
- char *codec_name = *opt == 'v' ? video_codec_name :
- *opt == 'a' ? audio_codec_name :
- subtitle_codec_name;
-
- if (!(f = get_preset_file(filename, sizeof(filename), arg, *opt == 'f', codec_name))) {
- fprintf(stderr, "File for preset '%s' not found\n", arg);
- exit_program(1);
- }
-
- while(!feof(f)){
- int e= fscanf(f, "%999[^\n]\n", line) - 1;
- if(line[0] == '#' && !e)
- continue;
- e|= sscanf(line, "%999[^=]=%999[^\n]\n", tmp, tmp2) - 2;
- if(e){
- fprintf(stderr, "%s: Invalid syntax: '%s'\n", filename, line);
- exit_program(1);
- }
- if(!strcmp(tmp, "acodec")){
- opt_audio_codec(tmp, tmp2);
- }else if(!strcmp(tmp, "vcodec")){
- opt_video_codec(tmp, tmp2);
- }else if(!strcmp(tmp, "scodec")){
- opt_subtitle_codec(tmp, tmp2);
- }else if(!strcmp(tmp, "dcodec")){
- opt_data_codec(tmp, tmp2);
- }else if(opt_default(tmp, tmp2) < 0){
- fprintf(stderr, "%s: Invalid option or argument: '%s', parsed as '%s' = '%s'\n", filename, line, tmp, tmp2);
- exit_program(1);
- }
- }
-
- fclose(f);
-
- return 0;
-}
-
static const OptionDef options[] = {
/* main options */
#include "cmdutils_common_opts.h"
@@ -4230,10 +4189,6 @@ static const OptionDef options[] = {
{ "vbsf", HAS_ARG | OPT_VIDEO | OPT_EXPERT, {(void*)opt_bsf}, "", "bitstream_filter" },
{ "sbsf", HAS_ARG | OPT_SUBTITLE | OPT_EXPERT, {(void*)opt_bsf}, "", "bitstream_filter" },
- { "apre", HAS_ARG | OPT_AUDIO | OPT_EXPERT, {(void*)opt_preset}, "set the audio options to the indicated preset", "preset" },
- { "vpre", HAS_ARG | OPT_VIDEO | OPT_EXPERT, {(void*)opt_preset}, "set the video options to the indicated preset", "preset" },
- { "spre", HAS_ARG | OPT_SUBTITLE | OPT_EXPERT, {(void*)opt_preset}, "set the subtitle options to the indicated preset", "preset" },
- { "fpre", HAS_ARG | OPT_EXPERT, {(void*)opt_preset}, "set options from indicated preset file", "filename" },
/* data codec support */
{ "dcodec", HAS_ARG | OPT_DATA, {(void*)opt_data_codec}, "force data codec ('copy' to copy stream)", "codec" },
diff --git a/doc/avconv.texi b/doc/avconv.texi
index d9d2013..a190cbe 100644
--- a/doc/avconv.texi
+++ b/doc/avconv.texi
@@ -786,40 +786,6 @@ avconv -i infile -streamid 0:33 -streamid 1:36 out.ts
@end example
@end table
- at section Preset files
-
-A preset file contains a sequence of @var{option}=@var{value} pairs,
-one for each line, specifying a sequence of options which would be
-awkward to specify on the command line. Lines starting with the hash
-('#') character are ignored and are used to provide comments. Check
-the @file{ffpresets} directory in the Libav source tree for examples.
-
-Preset files are specified with the @code{vpre}, @code{apre},
- at code{spre}, and @code{fpre} options. The @code{fpre} option takes the
-filename of the preset instead of a preset name as input and can be
-used for any kind of codec. For the @code{vpre}, @code{apre}, and
- at code{spre} options, the options specified in a preset file are
-applied to the currently selected codec of the same type as the preset
-option.
-
-The argument passed to the @code{vpre}, @code{apre}, and @code{spre}
-preset options identifies the preset file to use according to the
-following rules:
-
-First avconv searches for a file named @var{arg}.ffpreset in the
-directories @file{$av_DATADIR} (if set), and @file{$HOME/.avconv}, and in
-the datadir defined at configuration time (usually @file{PREFIX/share/avconv})
-in that order. For example, if the argument is @code{libx264-max}, it will
-search for the file @file{libx264-max.ffpreset}.
-
-If no such file is found, then avconv will search for a file named
- at var{codec_name}- at var{arg}.ffpreset in the above-mentioned
-directories, where @var{codec_name} is the name of the codec to which
-the preset file options will be applied. For example, if you select
-the video codec with @code{-vcodec libx264} and use @code{-vpre max},
-then it will search for the file @file{libx264-max.ffpreset}.
- at c man end
-
@chapter Tips
@c man begin TIPS
More information about the ffmpeg-cvslog
mailing list