Skip to content

Commit 4226252

Browse files
authored
Support libopus encoder
1 parent 8f11ab5 commit 4226252

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

auto_editor/utils/container.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class Container:
5353
av1_en = ["av1", "libaom-av1", "av1_nvenc", "av1_amf"]
5454
prores_en = ["prores", "prores_videotoolbox", "prores_aw", "prores_ks"]
5555
aac_en = ["aac", "aac_at", "libfdk_aac"]
56-
56+
opus_en = ["opus", "libopus"]
5757

5858
h265: DictContainer = {
5959
"allow_video": True,
@@ -80,24 +80,24 @@ class Container:
8080
"allow_subtitle": True,
8181
"allow_image": True,
8282
"vcodecs": h264_en + hevc_en + av1_en + ["vp9", "mpeg4", "mpeg2video", "mjpeg"],
83-
"acodecs": aac_en + ["mp3", "opus", "flac", "vorbis", "libvorbis", "ac3", "mp2"],
83+
"acodecs": aac_en + opus_en + ["mp3", "flac", "vorbis", "libvorbis", "ac3", "mp2"],
8484
"vstrict": True,
8585
}
8686
ogg: DictContainer = {
8787
"allow_video": True,
8888
"allow_audio": True,
8989
"allow_subtitle": True,
9090
"vcodecs": ["libtheora", "theora"],
91-
"acodecs": ["libvorbis", "vorbis", "flac", "opus", "speex"],
91+
"acodecs": opus_en + ["libvorbis", "vorbis", "flac", "speex"],
9292
"vstrict": True,
9393
}
9494

9595
mka_audio = (
9696
["libvorbis", "vorbis"]
9797
+ aac_en
98+
+ opus_en
9899
+ [
99100
"mp3",
100-
"opus",
101101
"flac",
102102
"ac3",
103103
"mp2",
@@ -172,11 +172,11 @@ class Container:
172172
},
173173
"opus": {
174174
"allow_audio": True,
175-
"acodecs": ["opus", "flac", "libvorbis", "vorbis", "speex"],
175+
"acodecs": opus_en + ["flac", "libvorbis", "vorbis", "speex"],
176176
},
177177
"oga": {
178178
"allow_audio": True,
179-
"acodecs": ["flac", "libvorbis", "vorbis", "opus", "speex"],
179+
"acodecs": opus_en + ["flac", "libvorbis", "vorbis", "speex"],
180180
},
181181
"flac": {
182182
"allow_audio": True,
@@ -188,7 +188,7 @@ class Container:
188188
"allow_audio": True,
189189
"allow_subtitle": True,
190190
"vcodecs": ["vp9", "vp8"] + av1_en,
191-
"acodecs": ["opus", "vorbis", "libvorbis"],
191+
"acodecs": opus_en + ["vorbis", "libvorbis"],
192192
"scodecs": ["webvtt"],
193193
"vstrict": True,
194194
"sstrict": True,

0 commit comments

Comments
 (0)