I currently use ffmpeg to re-encode the audio on large 4K files to AC3 5.1 so Direct Play on Plex works and those large files don't have to be transcoded. Is there a way to add this process to run automatically in SAB as a post-processing script once a file is done downloading then send the file to the appropriate folder after?
I currently open up a cmd window and type:
ffmpeg -i originalfilename-map 0 -vcodec copy -scodec copy -acodec ac3 -b:a 640k newfilename
to keep the video as is and just change the audio to AC3 5.1. I was able to set it up and get that part working. Just hoping now I can make this automatic in SAB somehow. I am only doing this with huge 4K files as regular 1080 is fine with transcoding (or most are just encoded for direct play automatically anyways), but also wondering if on top of re-encoding the audio the script can also re-encode the video to H.264 if it is not already.
Just doing the audio part would be fine for now, but if one script, or multiple, can be run as a post processing script in SAB to get all files set with the right video and audio encoding for direct play purposes, that would be great. Any help would be appreciated!
Script to change audio?
Forum rules
Help us help you:
Help us help you:
- Are you using the latest stable version of SABnzbd? Downloads page.
- Tell us what system you run SABnzbd on.
- Adhere to the forum rules.
- Do you experience problems during downloading?
Check your connection in Status and Interface settings window.
Use Test Server in Config > Servers.
We will probably ask you to do a test using only basic settings. - Do you experience problems during repair or unpacking?
Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Re: Script to change audio?
Have you taken a look at https://sabnzbd.org/wiki/scripts/post-p ... ng-scripts ?
You will need to create a script, either Python or shell/bash script, and in that script you should automatically detect the filename.
So maybe try to match on ".mkv"?
I did a quick Google and already found some other ffmpeg-SABnzbd scripts, so maybe you can also take those or part of those?
You will need to create a script, either Python or shell/bash script, and in that script you should automatically detect the filename.
So maybe try to match on ".mkv"?
I did a quick Google and already found some other ffmpeg-SABnzbd scripts, so maybe you can also take those or part of those?
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Re: Script to change audio?
Thank you, but was more hoping for a little more step by step. I have no idea how to create a script and detect the filename. Was hoping it would be a simple setting somewhere based on what I already setup with ffmpeg.
Re: Script to change audio?
Unfortunately I can't help much, I'm not too much of a Linux expert myself..
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Re: Script to change audio?
Are you using Windows?
Stuff I like: Apache bash cron DD-WRT Debian DNSMasq Entware FireFox GitHub ImageMagick Kate KDE LibreELEC Netrunner NFS NVIDIA OpenVPN Orvibo-S20 pfSense Python Raspberry-Pi RAID SABnzbd Transmission Usenet VirtualBox Watcher3 XFCE
Re: Script to change audio?
Sorry Marty, I can help with scripting on Linux, but my Windows is a little rusty. Hopefully, someone can jump in and assist.
Stuff I like: Apache bash cron DD-WRT Debian DNSMasq Entware FireFox GitHub ImageMagick Kate KDE LibreELEC Netrunner NFS NVIDIA OpenVPN Orvibo-S20 pfSense Python Raspberry-Pi RAID SABnzbd Transmission Usenet VirtualBox Watcher3 XFCE