Implement clean audio and video transcoding pipeline

This commit is contained in:
Abel Luck 2024-04-19 13:22:49 +02:00
parent ca17e44687
commit ac92eef8db
8 changed files with 540 additions and 74 deletions

View file

@ -99,3 +99,54 @@ LOG_LEVEL = "INFO"
# LOG_LEVEL = "ERROR"
MEDIA_ALLOW_REDIRECTS = True
REPUBLISHER_AUDIO = [
{
"name": "vbr7",
"format": "mp3",
"max_bitrate": 96000,
"mimetype": "audio/mp3",
"extension": "mp3",
"ffmpeg_audio_params": {
"acodec": "libmp3lame",
# https://trac.ffmpeg.org/wiki/Encode/MP3#VBREncoding
"qscale:a": "7",
},
},
{
"name": "vbr3",
"format": "aac",
"max_bitrate": 96000,
"mimetype": "audio/aac",
"extension": "aac",
"ffmpeg_audio_params": {
"acodec": "libfdk_aac",
# https://trac.ffmpeg.org/wiki/Encode/MP3#VBREncoding
"vbr": "3",
},
},
]
REPUBLISHER_VIDEO = [
{
"name": "720",
"container": "mp4",
"vcodec": "h264",
"acodec": "mp3",
"audio_max_bitrate": 96000,
"ffmpeg_audio_params": {
"acodec": "libmp3lame",
# https://trac.ffmpeg.org/wiki/Encode/MP3#VBREncoding
"qscale:a": "7",
},
"ffmpeg_video_params": {"vcodec": "h264", "strict": "-2"},
"max_height": 720,
"mimetype": "video/mp4",
"extension": "mp4",
}
]
REPUBLISHER_FFMPEG_ENCODERS = ["libmp3lame", "libfdk_aac"]
REPUBLISHER_FFMPEG_CODECS = ["aac", "mp3", "mpeg4", "vp9", "vorbis"]
CLOSESPIDER_ERRORCOUNT = 1