Add an option to preserve tags when transcoding
This commit is contained in:
@@ -158,9 +158,12 @@ Transcoder::start()
|
||||
args.push_back("0:" + std::to_string(*_parameters.stream));
|
||||
}
|
||||
|
||||
// Strip metadata
|
||||
args.push_back("-map_metadata");
|
||||
args.push_back("-1");
|
||||
if (_parameters.stripMetadata)
|
||||
{
|
||||
// Strip metadata
|
||||
args.push_back("-map_metadata");
|
||||
args.push_back("-1");
|
||||
}
|
||||
|
||||
// Skip video flows (including covers)
|
||||
args.push_back("-vn");
|
||||
|
||||
@@ -47,8 +47,9 @@ struct TranscodeParameters
|
||||
{
|
||||
Encoding encoding {Encoding::MP3};
|
||||
std::size_t bitrate {128000};
|
||||
boost::optional<std::size_t> stream {boost::none}; // Id of the stream to be transcoded (auto detect by default)
|
||||
boost::optional<std::chrono::seconds> offset {boost::none};
|
||||
boost::optional<std::size_t> stream; // Id of the stream to be transcoded (auto detect by default)
|
||||
boost::optional<std::chrono::seconds> offset;
|
||||
bool stripMetadata {true};
|
||||
};
|
||||
|
||||
class Transcoder
|
||||
|
||||
Reference in New Issue
Block a user