Script to change audio?
Posted: March 27th, 2019, 10:42 pm
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!
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!