Page 1 of 1

convert multiple mp4 files to mp3

Posted: 08 Apr 2017 15:06
by Winemaker
I just can't quite understand the process. I thought there is a way to do it without creating code. Or if I must use code, where do I put the batch file, please inlclude, and where do i run it from? Thanks.

Re: convert multiple mp4 files to mp3

Posted: 10 Apr 2017 05:26
by zcot

Re: convert multiple mp4 files to mp3

Posted: 10 Apr 2017 17:31
by Winemaker
There is supposed to be a way yo convert multiple files without writing a bat file no? I tried that first and it didn't work; I can't select more than one file. Is it possible someone can write one for me? I have windows 7.

Re: convert multiple mp4 files to mp3

Posted: 14 Apr 2017 13:06
by mederi
Try VLC 3 nightly build: http://nightlies.videolan.org/
Qt interface:
* Batch convert support

Re: convert multiple mp4 files to mp3

Posted: 14 Apr 2017 20:54
by zcot
mederi.... :cry: I'm bummed to see that. But happy to see it too! :lol:

But I have to post this since I did the work. Hopefully 3.0.0 is good, but at least I have to post this. :roll:

I sketched this up last night. It works for multiple files dragged onto the .bat:

Code: Select all

FOR %%A IN (%*) DO ( cmd /c vlc.exe -I dummy "%%~nxA" --sout=#transcode{vcodec=none,acodec=mp3,ab=96,channels=2,samplerate=44100}:std{access=file,mux=mp3,dst="%%~nA.co.mp3"} vlc://quit ren "%%~nA.co.mp3}" "%%~nA.co.mp3" ) pause
it takes a file name(or more) and makes a new mp3 file:
"Holy Smoke.mp4" will produce audio file "Holy Smoke.mp3"
"I'll Wait.mp4" makes "I'll Wait.mp3"

There's a limitation to how many files you will be able to drop on it because the commandline only has an 8192 character input buffer. You can change that if you want: https://www.google.com/?gws_rd=ssl#q=wi ... workaround

Or just do this. Make a folder called "z" on the C drive. So then pull all your mp4's into that "C:\z" folder... -instead of them being in, for example, "C:\Users\Winemaker Bobsled\Videos\potential music\hacked youtube songs"(<- that's where you eat up all the buffer). At this rate, maybe you can drag up to about 400 songs onto it at once... Wow, that might take a couple hours of processing.

Anyway, you can save this script as a batch file in that same directory and start dragging a group of files at once, then let it finish them... it'll probably take 15 to 20 seconds for the length of a 3 to 5 min song and it keeps looping as far as it can go for how many files you dragged onto it, or however many the buffer will hold at once, then you can continue where it left off if it didn't get them all.

btw, if you have a problem saving it as a real batch file, open the file, use save as, then add quotes around file name when you rename it "vlcohshitloop.bat". (this is due to Windows default setting for "hide extensions for known file types").

Re: convert multiple mp4 files to mp3

Posted: 06 Oct 2017 12:34
by sandygs72
Thank you. The batch file worked just fine. Except instead of "Dragging" files I had to use "dir *.wma" (convert.bat dir *.wma where convert.bat is the name I have given to my batch file). I am converting 5 files or so at a time because its almost freezing the system during conversion.

One question: I am trying to convert Window Media Audio (*.wma) files to *.mp3.
When I use VLC GUI for converting single files at a time, why is that the file size using GUI method is larger than the file size using batch file method. Am I losing any accuracy or metadata? Thanks in advance.

Re: convert multiple mp4 files to mp3

Posted: 17 Oct 2017 12:42
by Shapet
Thanks for the help.
Seems to work so far.

I'm questioning the '.co.mp3' part of the code. It does validate the filename as being converted but it changes the song name at the same time.

The "convert.bat dir * .m4a" (in my case) suggestion is awesome!

I'd also add the need to include DOS type pathways to your VLC install directory (ie. C:\Progra~1\VLC\... etc).

The other problem that I corrected was to use encapsulating (double quotes) " at the after the /C and before the vlc://quit command to make it work.

And as stated. Allow some time for it to happen if you are doing multiple files!

I'll run the files on my .mp3 supporting only stereo tomorrow and let you know if there are any problems!

:)

Re: convert multiple mp4 files to mp3

Posted: 29 Mar 2020 15:39
by Parbuster
I am having a problem with MP4 videos I receive from a friend in NZ.I cannot play them on my PC and i do not know how to overcome this. I am 93yrs.old so any info must be simple and easy to do I am not PC Guru

Re: convert multiple mp4 files to mp3

Posted: 30 Mar 2020 20:51
by jh_mk1234@msn.com
Hi Am simply trying to find out a way to burn all the mp3 files on my CD to hard drive folder without doing so individually. Tried to make a Project, but could not find out how to get there