Make the ipod format output compatible with non seekable output stream (pipe).#36

This commit is contained in:
emeric
2020-03-04 13:15:39 +01:00
parent d24ee46f8f
commit ffbb07f295
2 changed files with 9 additions and 0 deletions
+2
View File
@@ -235,6 +235,8 @@ guessMediaFileFormat(const std::filesystem::path& file)
if (!format || !format->name) if (!format || !format->name)
return {}; return {};
LMS_LOG(AV, DEBUG) << "File '" << file.string() << "', formats = '" << format->name << "'";
auto formats {StringUtils::splitString(format->name, ",")}; auto formats {StringUtils::splitString(format->name, ",")};
if (formats.size() > 1) if (formats.size() > 1)
LMS_LOG(AV, INFO) << "File '" << file.string() << "' reported several formats: '" << format->name << "'"; LMS_LOG(AV, INFO) << "File '" << file.string() << "' reported several formats: '" << format->name << "'";
+7
View File
@@ -162,6 +162,13 @@ Transcoder::start()
args.emplace_back("-f"); args.emplace_back("-f");
args.emplace_back(mediaFileFormat->format); args.emplace_back(mediaFileFormat->format);
// Workaround for ipod streams: make it compatible with non seekable output
if (mediaFileFormat->format == "ipod")
{
args.emplace_back("-movflags");
args.emplace_back("frag_keyframe");
}
_outputMimeType = mediaFileFormat->mimeType; _outputMimeType = mediaFileFormat->mimeType;
} }