apple-tv-converter 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -58,9 +58,14 @@ module AppleTvConverter
|
|
|
58
58
|
|
|
59
59
|
if media.needs_audio_conversion?
|
|
60
60
|
if media.ffmpeg_data.audio_codec =~ /mp3/i
|
|
61
|
+
# Ensure that destination audio bitrate is 128k for Stereo MP3 (couldn't convert with higher bitrate)
|
|
61
62
|
audio_bitrate = 128 if media.ffmpeg_data.audio_channels == 2
|
|
62
63
|
elsif media.ffmpeg_data.audio_codec =~ /pcm_s16le/i
|
|
64
|
+
# Ensure that destination audio bitrate is 128k for PCM signed 16-bit little-endian (couldn't convert with higher bitrate)
|
|
63
65
|
audio_bitrate = 128
|
|
66
|
+
elsif media.ffmpeg_data.audio_codec =~ /ac3/i
|
|
67
|
+
# Ensure that maximum destination audio bitrate is 576k for AC3 (couldn't convert with higher bitrate)
|
|
68
|
+
audio_bitrate = [media.ffmpeg_data.audio_bitrate || 576, 576].min
|
|
64
69
|
end
|
|
65
70
|
|
|
66
71
|
audio_bitrate ||= media.ffmpeg_data.audio_bitrate || 448
|