UI: Remove compatibility with FFmpeg < 6.1

This commit is contained in:
derrod
2024-08-18 09:07:33 +02:00
committed by Ryan Foster
parent f07004c3b7
commit 3ebe071c7b
2 changed files with 2 additions and 31 deletions

View File

@@ -7698,26 +7698,11 @@ void OBSBasic::AutoRemux(QString input, bool no_show)
const char *format = config_get_string(
config, isSimpleMode ? "SimpleOutput" : "AdvOut", "RecFormat2");
#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(60, 5, 100)
const obs_encoder_t *audioEncoder =
obs_output_get_audio_encoder(outputHandler->fileOutput, 0);
const char *aCodecName = obs_encoder_get_codec(audioEncoder);
bool audio_is_pcm = strncmp(aCodecName, "pcm", 3) == 0;
/* FFmpeg <= 6.0 cannot remux AV1+PCM into any supported format. */
if (audio_is_pcm && strcmp(vCodecName, "av1") == 0)
return;
#endif
/* Retain original container for fMP4/fMOV */
if (strncmp(format, "fragmented", 10) == 0) {
output += "remuxed." + suffix;
} else if (strcmp(vCodecName, "prores") == 0) {
output += "mov";
#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(60, 5, 100)
} else if (audio_is_pcm) {
output += "mov";
#endif
} else {
output += "mp4";
}