diff options
author | Robin Gareus <robin@gareus.org> | 2018-11-19 22:26:16 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2018-11-19 22:26:16 +0100 |
commit | 5fa05b403ca21a6573d07b921dc14f0769dc9fc7 (patch) | |
tree | 9a581b468af1a64169cee80b686e7bd55e640d41 /libs/ardour/export_graph_builder.cc | |
parent | d18b247a05906aec00d684996c493b5444a46e77 (diff) |
Prepare export-format codec-quality setting
Diffstat (limited to 'libs/ardour/export_graph_builder.cc')
-rw-r--r-- | libs/ardour/export_graph_builder.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/ardour/export_graph_builder.cc b/libs/ardour/export_graph_builder.cc index b2eaafce21..e190791291 100644 --- a/libs/ardour/export_graph_builder.cc +++ b/libs/ardour/export_graph_builder.cc @@ -322,7 +322,7 @@ ExportGraphBuilder::Encoder::init_writer (boost::shared_ptr<AudioGrapher::CmdPip throw ExportFailed ("External encoder (ffmpeg) is not available."); } - int quality = 3; // TODO get from config.format + int quality = config.format->codec_quality (); int a=0; char **argp = (char**) calloc (100, sizeof(char*)); @@ -342,9 +342,9 @@ ExportGraphBuilder::Encoder::init_writer (boost::shared_ptr<AudioGrapher::CmdPip argp[a++] = strdup ("pipe:0"); argp[a++] = strdup ("-y"); - if (quality < 10) { + if (quality <= 0) { /* variable rate, lower is better */ - snprintf (tmp, sizeof(tmp), "%d", quality); + snprintf (tmp, sizeof(tmp), "%d", -quality); argp[a++] = strdup ("-q:a"); argp[a++] = strdup (tmp); } else { /* fixed bitrate, higher is better */ |