Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add OPUS mp4 support #143

Merged
merged 1 commit into from
Sep 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions streamer/bitrate_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,8 @@ def get_ffmpeg_codec_string(self, hwaccel_api: str) -> str:

def get_output_format(self) -> str:
"""Returns an FFmpeg output format suitable for this codec."""
# TODO: consider Opus in mp4 by default
# TODO(#31): add support for configurable output format per-codec
if self == AudioCodec.OPUS:
return 'webm'
elif (self == AudioCodec.AAC) or (self == AudioCodec.AC3) or (self == AudioCodec.EAC3):
if (self == AudioCodec.OPUS) or (self == AudioCodec.AAC) or (self == AudioCodec.AC3) or (self == AudioCodec.EAC3):
return 'mp4'
else:
assert False, 'No mapping for output format for codec {}'.format(
Expand Down