Hello there.
I have lots and lots of files with dual audio, and I want to keep just one audio. I'm trying to automate this process, but with no success.
I know there is scripting language to VirtualDub and VirtualdubMod. And know that this is possible with .bat with mencoder and ffmpeg. And there is avi-mux gui and avidemux also...
So far, I wasn't able to find a solution over the net. So I'm asking for help to anyone who knows about scripts or CLI.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 9 of 9
Thread
-
-
what kind of files? which audio track do you want to keep? Are they always the same between video files? e.g. always track #0 and track #1 ? or is it sometimes a different number ?
If they are different formats and specs, it's going to be difficult. If they are all the same file type , then it will be easier -
Always AVIs, XviD, most cases is to keep the audio track #0. 90% of cases is to keep track 0 (first audio).
-
1) Download FFMpeg binary , put ffmpeg.exe in same directory as files to be remuxed
http://ffmpeg.zeranoe.com/
2) open a text file in notepad, in the same directory as the files, copy & paste the following , save it, rename the .txt extension to .bat
Code:for %%a in ("*.avi") do ffmpeg -i %%a -map 0:0 -vcodec copy -map 0:1 -acodec copy %%~na.new.avi pause
This will copy the 1st video track, and 1st audio track into a new AVI, and it will have the same file name with "new" appended
e.g.
"input.avi" will generate a new file "input.new.avi" . Original file will not be overwritten -
If it was the 2nd audio track to be retained, change the 2nd map statement to -map 0:2 instead of -map 0:1
Code:for %%a in ("*.avi") do ffmpeg -i %%a -map 0:0 -vcodec copy -map 0:2 -acodec copy %%~na.new.avi pause
-
Ok, it's working. Save me a lot of time. So simple to you but its like gold to me. Thanks a lot. I'm gonna test in my dvd players if these are ok...
You know a little about ffmpeg. Have another question for you.
ffmpeg.exe -i "InputFile.aviORmkv" -f null - 2> report.txt
report.txt
i use this sometimes to test downloaded files for corruption. It's decodes the entire file without any image in screen. And if there are problems in the inputfile it will warn error codes. This command is correct or i'm missing something? -
Not sure about that one , you might want to open up another thread maybe someone else knows (they might not look if you bury that question in this thread because the title is unrelated)
Similar Threads
-
Audio/video out of sync after demux-remux
By CarryNL in forum SubtitleReplies: 0Last Post: 14th Sep 2011, 14:31 -
MP4 demux, transcode, remux => audio out of sync?
By julesh in forum Video ConversionReplies: 8Last Post: 10th Feb 2011, 20:00 -
Capture out of sync after demux/remux (framedropping)
By Bingo-days in forum CapturingReplies: 3Last Post: 13th Jan 2010, 08:41 -
Demux mkv -> remux Divx
By nsx3000 in forum Video ConversionReplies: 4Last Post: 15th Sep 2009, 09:12 -
can not remux after demux
By volam in forum EditingReplies: 2Last Post: 19th Mar 2009, 15:36