diff --git a/UI/ffmpeg-utils.cpp b/UI/ffmpeg-utils.cpp index b8f36cd00..a55e2e9a8 100644 --- a/UI/ffmpeg-utils.cpp +++ b/UI/ffmpeg-utils.cpp @@ -100,12 +100,8 @@ bool FFCodecAndFormatCompatible(const char *codec, const char *format) if (!codec || !format) return false; -#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(59, 0, 100) - AVOutputFormat *output_format; -#else - const AVOutputFormat *output_format; -#endif - output_format = av_guess_format(format, nullptr, nullptr); + const AVOutputFormat *output_format = + av_guess_format(format, nullptr, nullptr); if (!output_format) return false; @@ -114,13 +110,8 @@ bool FFCodecAndFormatCompatible(const char *codec, const char *format) if (!codec_desc) return false; -#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(60, 0, 100) - return avformat_query_codec(output_format, codec_desc->id, - FF_COMPLIANCE_EXPERIMENTAL) == 1; -#else return avformat_query_codec(output_format, codec_desc->id, FF_COMPLIANCE_NORMAL) == 1; -#endif } static const unordered_set builtin_codecs = { @@ -163,12 +154,9 @@ static const unordered_map> codec_compat = { "opus", "alac", "flac", -#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(60, 5, 100) - // PCM in MP4 is only supported in FFmpeg > 6.0 "pcm_s16le", "pcm_s24le", "pcm_f32le", -#endif }}, {"fragmented_mp4", { @@ -179,11 +167,9 @@ static const unordered_map> codec_compat = { "opus", "alac", "flac", -#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(60, 5, 100) "pcm_s16le", "pcm_s24le", "pcm_f32le", -#endif }}, // Not part of FFmpeg, see obs-outputs module {"hybrid_mp4", diff --git a/UI/window-basic-main.cpp b/UI/window-basic-main.cpp index 623c4021b..64964f0b8 100644 --- a/UI/window-basic-main.cpp +++ b/UI/window-basic-main.cpp @@ -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"; }