Ronstang 293 Posted December 22, 2020 Posted December 22, 2020 Thanks for the replies on this sub issue. I might have to get an Nvidia shield for the den when I set up my surround then as my receiver is 40 feet from the TV through a wall, closet, and attic and I don't want to run 2 Redmere cables that lenght.
wakeboarder141 40 Posted December 23, 2020 Author Posted December 23, 2020 (edited) Edit: Nevermind I figured out the transcode reason on the file in question. Edited December 23, 2020 by wakeboarder141 1
wakeboarder141 40 Posted December 23, 2020 Author Posted December 23, 2020 12 hours ago, rbjtech said: It's easy enough with a simple script using ffmpeg with a recursive find. I'll put an example here if you like - or I can PM you my script to get you going ? I would also be interested in how you are batch changing the default audio track. Although I don't have anywhere near 4500 movies (Impressive!) I still can't go through and individually change every movie I have.
Carlo 4561 Posted December 23, 2020 Posted December 23, 2020 I did this for over 18K movies, 12K sports and over 100K TV episodes. I've also been converting my library over to h.265 as well. sickbeard_mp4_automator once configured is a "swiss army knife" of file manipulation that you can use to add stereo audio tracks that are normalized. Convert to specific formats, remove audio and subs in languages you don't use, etc
wakeboarder141 40 Posted December 23, 2020 Author Posted December 23, 2020 I would ideally like to find a script or program that would batch convert any 7.1 audio to 5.1 AC3, convert the container to mp4 if it isn't already, and change the default track to the stereo track.
Carlo 4561 Posted December 23, 2020 Posted December 23, 2020 I just gave you the name of a script that can do all of this.
wakeboarder141 40 Posted December 23, 2020 Author Posted December 23, 2020 1 minute ago, cayars said: I just gave you the name of a script that can do all of this. I found it and downloaded it, but I'm not familiar with how to operate it at all so I will see if I can do some research. 1
rbjtech 5284 Posted December 24, 2020 Posted December 24, 2020 (edited) If you just want something very simple - then copy the 'script' below into a .bat or .cmd file. @echo off setlocal ENABLEDELAYEDEXPANSION FOR /F "delims=" %%x in (filelist.txt) DO ( "C:\<yourpath to ffmpeg here>\ffmpeg.exe" -i "%%x" -map 0:v -map 0:a:0 -map 0:a -c:v copy -c:a copy -c:a:0 aac -ac 2 -filter:a:0 "volume=1.3" -disposition:a:0 default -disposition:a:1 0 -f matroska "%%~dx%%~px%%~nx-AddedAACStereo.mkv" ) :END This will take an input file (filelist.txt) and read the mkv filepath from it - then it will ADD a new Stereo AAC audio track created from the first available Audio track it finds. It will then mark this new AAC track as the default Audio track - it will keep all the other Audio tracks (untouched) and will copy the Video file also (untouched). It will create a new file with '-AddedAACStereo' on the end. The original file will remain untouched. An example filelist.txt is c:\movies\movie1.mkv c:\movies\movie2.mkv d:\movies\movie3.mkv Once you have tried it on a few files using the text file input format - then you can replace the txt file with an entire directory ie 'dir /b /s *.mkv' (include the single quotes) - this will scan for every mkv file in all directories - and add the new file. FOR /F "delims=" %%x in ( 'dir /b /s *.mkv') DO ( Until you get confident with the results, I would not add any deleting/renaming of the originals but that's easy enough to add. The sickbeard script is obviously much more powerful (and uses python) but for simple operations - the above will do the job just as well. Edited December 24, 2020 by rbjtech
wakeboarder141 40 Posted December 24, 2020 Author Posted December 24, 2020 1 hour ago, rbjtech said: If you just want something very simple - then copy the 'script' below into a .bat or .cmd file. Thank you for the suggestions. All of my files are already in .mp4 conatiner, and already have a 5.1/7.1 track as well as an AAC Stereo track. Would it be possible to just convert any 7.1 audio to 5.1 (I can isolate the 7.1 movies easily enough) and then switch the existing stereo track to the default?
rbjtech 5284 Posted December 25, 2020 Posted December 25, 2020 Should be easy enough - it will need a little experimentation - but basically replace -c:a:0 aac with -c:a:1 ac3 -ac 6 (assuming your 7.1 track is track 1 ?) and it will insert a new 5.1 AC3 track derived (downmixed) from the 7.1 track. Keeping -disposition:a:0 default -disposition:a:1 will make track 0 the default - change to whatever is the AAC Stereo in your case. Take a copy of the file before you start incase it goes wrong ..
wakeboarder141 40 Posted December 25, 2020 Author Posted December 25, 2020 Thanks I will try that. What should I change since I am starting and ending with an mp4 container instead of mkv?
Carlo 4561 Posted December 25, 2020 Posted December 25, 2020 (edited) 49 minutes ago, wakeboarder141 said: Thanks I will try that. What should I change since I am starting and ending with an mp4 container instead of mkv? "mkv" to "mp4" in what you see in the script above most likely is all that's needed. BUT if creating mp4 files you likely also want to "fast start" it by writing the index at the start of the file. -movflags faststart Edited December 25, 2020 by cayars
wakeboarder141 40 Posted January 2, 2021 Author Posted January 2, 2021 I think I have got it corrected now where all of my users can support 5.1 AC3, but I can't figure out the coding for converting it. I have an mp4 file with 7.1 track first, then Stereo AAC track 2nd. I would like to simply convert the 7.1 track to 5.1 AC3 and leave the track order as-is. Can someone help me with that command?
Luke 42078 Posted January 2, 2021 Posted January 2, 2021 4 hours ago, wakeboarder141 said: I think I have got it corrected now where all of my users can support 5.1 AC3, but I can't figure out the coding for converting it. I have an mp4 file with 7.1 track first, then Stereo AAC track 2nd. I would like to simply convert the 7.1 track to 5.1 AC3 and leave the track order as-is. Can someone help me with that command? how far have you gotten?
wakeboarder141 40 Posted January 2, 2021 Author Posted January 2, 2021 35 minutes ago, Luke said: how far have you gotten? I have tried combinations of commands from this post, but the best I have managed is adding another 5. 1 track. I would prefer to end up with just a 5.1 and stereo track. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now