Skip to content

Commit

Permalink
make aac_adtstoasc option
Browse files Browse the repository at this point in the history
  • Loading branch information
michael committed Nov 15, 2016
1 parent 1bbb1d7 commit 4995cf4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ General MP4 Configuration
- `audio-language` = 3 letter language code for audio streams you wish to copy. Leave blank to copy all. Separate multiple audio streams with commas (ex: eng,spa)
- `audio-default-language` = If an audio stream with an unidentified/untagged language is detected, you can default that language tag to whatever this value is (ex: eng). This is useful for many single-audio releases which don't bother to tag the audio stream as anything
- `audio-filter` = Applies FFMPEG audio filter. Make sure you specify all parameters are you would using the `-af` option with FFMPEG command line
- `aac_adtstoasc` = Applies the aac_adtstoasc filter to AAC channels being copied. Useful if your source of mkv's uses raw ADTS AAC containers but can cause some playback issues with certain audio encoders
- `subtitle-codec` = set your desired subtitle codec. If you're embedding subs, `mov_text` is the only option supported. If you're creating external subtitle files, `srt` or `webvtt` are accepted.
- `subtitle-language` = same as audio-language but for subtitles. Set to `nil` to disable copying of subtitles.
- `subtitle-language-default` = same as audio-language-default but for subtitles
Expand Down
1 change: 1 addition & 0 deletions autoProcess.ini.sample
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ sub-providers = addic7ed,podnapisi,thesubdb,opensubtitles
permissions = 0777
post-process = False
pix-fmt =
aac_adtstoasc = False

[CouchPotato]
host = localhost
Expand Down
5 changes: 4 additions & 1 deletion mkvtomp4.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def __init__(self, settings=None,
iOSFirst=False,
iOS_filter=None,
maxchannels=None,
aac_adtstoasc=False,
awl=None,
swl=None,
adl=None,
Expand Down Expand Up @@ -84,6 +85,7 @@ def __init__(self, settings=None,
self.maxchannels = maxchannels
self.awl = awl
self.adl = adl
self.aac_adtstoasc = aac_adtstoasc
# Subtitle settings
self.scodec = scodec
self.swl = swl
Expand Down Expand Up @@ -130,6 +132,7 @@ def importSettings(self, settings):
self.maxchannels = settings.maxchannels
self.awl = settings.awl
self.adl = settings.adl
self.aac_adtstoasc = settings.aac_adtstoasc
# Subtitle settings
self.scodec = settings.scodec
self.swl = settings.swl
Expand Down Expand Up @@ -422,7 +425,7 @@ def generateOptions(self, inputfile, original=None):
'disposition': disposition,
}})

if acodec == 'copy' and a.codec == 'aac':
if acodec == 'copy' and a.codec == 'aac' and self.aac_adtstoasc:
audio_settings[l]['bsf'] = 'aac_adtstoasc'
l = l + 1

Expand Down
3 changes: 3 additions & 0 deletions readSettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def __init__(self, directory, filename, logger=None):
'video-bitrate': '',
'video-max-width': '',
'h264-max-level': '',
'aac_adtstoasc': 'False',
'use-qsv-decoder-with-encoder': 'True',
'subtitle-codec': 'mov_text',
'subtitle-language': '',
Expand Down Expand Up @@ -299,6 +300,8 @@ def __init__(self, directory, filename, logger=None):
except:
self.postprocess = False

self.aac_adtstoasc = config.getboolean(section, 'aac_adtstoasc')

# Setup variable for maximum audio channels
self.maxchannels = config.get(section, 'max-audio-channels')
if self.maxchannels == "":
Expand Down

0 comments on commit 4995cf4

Please sign in to comment.