UI: Support PCM in MP4

This commit is contained in:
derrod
2023-05-03 12:36:41 +02:00
committed by Lain
parent d53ed7daed
commit ef3a67708e
2 changed files with 17 additions and 7 deletions

View File

@@ -7510,16 +7510,17 @@ void OBSBasic::AutoRemux(QString input, bool no_show)
const char *format = config_get_string(
config, isSimpleMode ? "SimpleOutput" : "AdvOut", "RecFormat2");
/* AV1+PCM cannot be remuxed into any supported format (until FFmpeg 6.1) */
if (strcmp(vCodecName, "av1") == 0 &&
strncmp(aCodecName, "pcm", 3) == 0)
bool audio_is_pcm = strncmp(aCodecName, "pcm", 3) == 0;
/* FFmpeg <= 6.0 cannot remux AV1+PCM into any supported format. */
if (audio_is_pcm && !ff_supports_pcm_in_mp4() &&
strcmp(vCodecName, "av1") == 0)
return;
/* Retain original container for fMP4/fMOV */
if (strncmp(format, "fragmented", 10) == 0) {
output += "remuxed." + suffix;
} else if (strcmp(vCodecName, "prores") == 0 ||
strncmp(aCodecName, "pcm", 3) == 0) {
(audio_is_pcm && !ff_supports_pcm_in_mp4())) {
output += "mov";
} else {
output += "mp4";