Skip to content

Commit

Permalink
feat: Add OPUS mp4 support (#143)
Browse files Browse the repository at this point in the history
Always use mp4 for opus
  • Loading branch information
Chokoabigail authored Sep 11, 2023
1 parent f2d3445 commit 2f38022
Showing 1 changed file with 1 addition and 4 deletions.
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

0 comments on commit 2f38022

Please sign in to comment.