update audio and video transcoding profiles for compatibility

This commit is contained in:
Abel Luck 2026-04-01 16:58:06 +02:00
parent c40715c3eb
commit 0504013c5a

View file

@ -102,79 +102,95 @@ MEDIA_ALLOW_REDIRECTS = True
REPUBLISHER_AUDIO = [
{
"name": "vbr7",
"name": "mp3_vbr7_voice",
"format": "mp3",
"max_bitrate": 96000,
"mimetype": "audio/mp3",
"max_bitrate": 64000,
"mimetype": "audio/mpeg",
"extension": "mp3",
"ffmpeg_audio_params": {
"acodec": "libmp3lame",
# https://trac.ffmpeg.org/wiki/Encode/MP3#VBREncoding
"qscale:a": "7",
"ac": "1",
"ar": "48000",
},
},
{
"name": "vbr3",
"format": "aac",
"max_bitrate": 96000,
"mimetype": "audio/aac",
"extension": "aac",
"name": "m4a_aac_vbr2_voice",
"format": "m4a",
"max_bitrate": 64000,
"mimetype": "audio/mp4",
"extension": "m4a",
"ffmpeg_audio_params": {
"acodec": "libfdk_aac",
# https://trac.ffmpeg.org/wiki/Encode/MP3#VBREncoding
"vbr": "3",
"vbr": "2",
"ac": "1",
"ar": "48000",
},
},
{
"name": "webm_opus_voice_48k",
"format": "webm",
"max_bitrate": 48000,
"mimetype": "audio/webm",
"extension": "webm",
"ffmpeg_audio_params": {
"acodec": "libopus",
"b:a": "48k",
"ac": "1",
"ar": "48000",
"application": "voip",
},
},
]
REPUBLISHER_VIDEO = [
# broadly compatible
{
"name": "720",
"name": "main",
"container": "mp4",
"vcodec": "h264",
"acodec": "mp3",
"acodec": "aac",
"audio_max_bitrate": 96000,
"ffmpeg_audio_params": {
"acodec": "libmp3lame",
# https://trac.ffmpeg.org/wiki/Encode/MP3#VBREncoding
"qscale:a": "7",
"acodec": "aac",
"b:a": "96k",
"ac": "2",
"ar": "48000",
},
"ffmpeg_video_params": {
"vcodec": "libx264",
"pix_fmt": "yuv420p",
"profile:v": "main",
"level": "4.0",
"preset": "medium",
"crf": "22",
"movflags": "+faststart",
},
"ffmpeg_video_params": {"vcodec": "h264", "strict": "-2"},
"max_height": 720,
"mimetype": "video/mp4",
"extension": "mp4",
},
# {
# "passes": [
# {
# "c:v": "libvpx-vp9",
# "b:v": "0",
# "crf": "30",
# "pass": "1",
# "deadline": "good",
# "row-mt": "1",
# "f": "null",
# },
# {
# "c:v": "libvpx-vp9",
# "b:v": "0",
# "crf": "30",
# "pass": "2",
# "deadline": "good",
# "row-mt": "1",
# "c:a": "libopus",
# "b:a": "96k",
# "ac": "2",
# },
# ],
# "name": "720",
# "container": "webm",
# "vcodec": "libvpx-vp9",
# "acodec": "opus",
# "audio_max_bitrate": 96000,
# "max_height": 720,
# "mimetype": "video/webm",
# "extension": "webm",
# },
# linux fallback without patent encumberance
{
"name": "fallback",
"container": "webm",
"vcodec": "vp9",
"acodec": "opus",
"audio_max_bitrate": 96000,
"ffmpeg_audio_params": {
"acodec": "libopus",
"b:a": "96k",
"ac": "2",
"ar": "48000",
},
"ffmpeg_video_params": {
"vcodec": "libvpx-vp9",
"crf": "33",
"b:v": "0",
},
"max_height": 720,
"mimetype": "video/webm",
"extension": "webm",
},
]
REPUBLISHER_FFMPEG_ENCODERS = ["libmp3lame", "libfdk_aac", "libvpx-vp9", "libopus"]