Skip to content

Commit

Permalink
audio bitrate calculations fixed
Browse files Browse the repository at this point in the history
Fixed a bug where the audio bitrate was improperly calculated when using
the max-audio-channel option.
  • Loading branch information
Michael Higgins committed Dec 21, 2014
1 parent 435c73f commit 69921ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mkvtomp4.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,15 +222,15 @@ def generateOptions(self, inputfile, original=None):
audio_channels = self.maxchannels
if acodec == 'copy':
acodec = self.audio_codec[0]
abitrate = self.maxchannels * self.audio_bitrate
else:
audio_channels = a.audio_channels
abitrate = a.audio_channels * self.audio_bitrate

# Bitrate calculations/overrides
if self.audio_bitrate is 0:
abitrate = a.audio_bitrate
else:
abitrate = a.audio_channels * self.audio_bitrate


audio_settings.update({l: {
'map': a.index,
'codec': acodec,
Expand Down

0 comments on commit 69921ff

Please sign in to comment.