>Have a folder with about 800 bluray rips
>Have muxed in commentaries to several of them
>Others came with more than one language audio track, etc
>Over time forgotten which files have more than one audio track and which don't
Can /g/ help out with a script (Windows based preferable but I'm willing to do the work to make linux style scripts work in Windows) to identify MKV files that have more than one audio track?
>mediainfo
>drag
>???
>>58180121
Whats it matter if they have more than one audio track?
also you should host an ftp server anon :3
>>58180121
I'll help out bit.
Might not be correct syntax, so do bit of correction on this.for %%a in ("*.mkv") do (
ffmpeg -i "%%a" 2>&1 | findstr -i "audio" > test.txt
for /f %%i in ('FINDSTR /R /N "^.*" test.txt | FIND /C ":"') do set VAR=%%i
echo %VAR% > files.txt
echo. > files.txt
)
If all works, put this test.bat file inside where the mkv files are and it should give you files.txt with your result.
I didn't test the script cause im lazy
>>58180121
python or similar to catch stdout from mediainfo command line to output the properties of a file, then you parse that apply your own logic of demux / remux with ffmpeg commands, save all mediainfo info, and all to-run ffpmeg commands for quick review before batching 800 remux jobs
>>58180779
oh wait, I forgot the if statementsIF %VAR% GTR 1 (
echo %VAR% > files.txt
echo. > files.txt
)
something like this
>>58180779
>>58180852
This is a good starting point, thanks man. I'm on the fence about using ffmpeg vs ffprobe but yeah I was mostly after a loose loop structure without reinventing the wheel myself, as it's been a long time since I've programmed.
>>58180569
I'm in the mood to listen to a commentary track and am curious if I have any I've never listened to before
Ffprobe....
>>58181501
>commentary track
fair enough.
Wish I could give some simple advice, actually mpv has an icon for tracks and captions and it gives a number.. so you could open the whole directory and just keep hitting next until you see one you havnt seen before.
The way I would id it is how I handled sorting images.
enumerate the directory
open the images and get their properties
if (size is < acceptable){ send to trash();}
Do the same thing with the videos except
if ( number of audio tracks > 1) {move to different folder();}
I still think you should let us download some stuff if they are good movies.
>>58181501for %%a in ("*.mkv") do (
ffmpeg -i "%%a" 2>&1 | findstr -i "audio" > audio.txt
findstr /r /n "^.*" audio.txt | find /C ":" > num.txt
set /p a=<num.txt
if %a% == 1 (echo "skipped") else (echo "%%a" >> files.txt)
)
Re thought the code a little bit, however I can't run it in windows for some god damn reason. I'm pretty sure its syntactically correct.
>get file.mkv from dir
>print all audio streams into audio txt file
>load number of lines from audio txt and into num txt
>load num txt to variable a
>if var a is 1, skip, otherwise add file.mkv to file txt
This should technically give you a list of files that has more than 1 audio file. However I can't get it to run. I havent done batch files in longest time