Comments (7)
Not an option using the base configuration, would need to be a custom function
Feel free to post your custom function that's not working and I'll take a look. canBypassConvert
is probably the one you want
from sickbeard_mp4_automator.
If I had DTS in autoprocess.ini I've trying this custom "blockaudiocopy" :
def blockAudioCopy(mp, stream, path, info):
# Custom function that skips HDR files that are missing proper HDR metadata / framedata
mp.log.info("Initiating custom audio copy check method.")
fra_audio_streams = [a for a in info.audio if a.metadata.get('language', '') == 'fra' and (a.metadata.get('codec', '') != 'ac3' or a.metadata.get('codec', '') != 'aac' or a.metadata.get('codec', '') != 'eac3')]
if stream in fra_audio_streams:
mp.log.info("found a fra language with not ac3 or aac or eac3 codec, conversion needed")
return True
return False
from sickbeard_mp4_automator.
I was more looking for your canBypassConvert attempt since that's what you're trying to do now, no?
from sickbeard_mp4_automator.
Sorry, I misremembered the name of the custom function, you would want to intervene on the validation
function, not canBypassConvert
as this is an internal function you shouldn't be modifying unless you're looking to fork the code
def validation(mp, info, path, tagdata):
# Custom function that skips files that don't have french audio
mp.log.info("Initiating custom validation method.")
fra_audio_streams = [a for a in info.audio if a.metadata.get('language', '') == 'fra']
return len(fra_audio_streams) > 0
from sickbeard_mp4_automator.
Sorry, I misremembered the name of the custom function, you would want to intervene on the
validation
function, notcanBypassConvert
as this is an internal function you shouldn't be modifying unless you're looking to fork the codedef validation(mp, info, path, tagdata): # Custom function that skips files that don't have french audio mp.log.info("Initiating custom validation method.") fra_audio_streams = [a for a in info.audio if a.metadata.get('language', '') == 'fra'] return len(fra_audio_streams) > 0
Thank you but it's not what I want. I would like to don't convert the others audio tracks if not fra, but the file may be converted ...
from sickbeard_mp4_automator.
Got it, that wasn't clear at all
Might be able to do this by getting creative about manipulating the codec settings on the fly for each stream
If you want to always remux nonfrench streams you could force the codec pool to be 'copy' in those instances and then apply a more standard codec pool for the french streams
def blockAudioCopy(mp, stream, path):
# Custom function that modifies codec pool depending on language
mp.log.info("Initiating custom audio copy check method.")
if stream.metadata.get('language') == 'fra':
mp.settings.acodec = ['ac3', 'eac3', 'aac'] # maintain default behavior
else:
mp.settings.acodec = ['copy'] # force copy
return False
Otherwise if that's still not the desired effect you need to be much more explicit about what you're trying to do
Of note, you're essentially bypassing your audio codec settings here and manually setting them, so in the future if you decide you change what codecs you want you'll need to update this function too
from sickbeard_mp4_automator.
Got it, that wasn't clear at all
Might be able to do this by getting creative about manipulating the codec settings on the fly for each stream
If you want to always remux nonfrench streams you could force the codec pool to be 'copy' in those instances and then apply a more standard codec pool for the french streams
def blockAudioCopy(mp, stream, path): # Custom function that modifies codec pool depending on language mp.log.info("Initiating custom audio copy check method.") if stream.metadata.get('language') == 'fra': mp.settings.acodec = ['ac3', 'eac3', 'aac'] # maintain default behavior else: mp.settings.acodec = ['copy'] # force copy return FalseOtherwise if that's still not the desired effect you need to be much more explicit about what you're trying to do
Of note, you're essentially bypassing your audio codec settings here and manually setting them, so in the future if you decide you change what codecs you want you'll need to update this function too
Worked like a charm !
Thank you so much :)
from sickbeard_mp4_automator.
Related Issues (20)
- Language flow HOT 3
- [Question] Speed up process? HOT 2
- sonarr-sma docker -- having issues trying to get ffmpeg to work with nvidia. HOT 31
- Unable to get Dolby Atmos in Plex on the Apple TV HOT 1
- Use hardware encoder and software decoder HOT 5
- Invalid format string in avcodecs.py NVEncH265Codec HOT 3
- Error in postSonarr with recent Sonarr update (4.0.1.929 — Jan 19 2024) HOT 2
- Generic Permissions HOT 1
- Need help with skipStream HOT 2
- How to get/configure SMA to use my Nvidia GPU HOT 5
- SAB Stating it is unable to run script HOT 2
- Problem embedding external subtitles HOT 1
- Subtitle marked as default HOT 11
- Not Processing files running in Manual Mode HOT 9
- Embed subtitles srt. HOT 7
- Error processing some anime HOT 6
- subtitle errors HOT 8
- [Question] Proper way to utilize output-directory and temp-extension HOT 1
- post_process scripts not running HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sickbeard_mp4_automator.