convert multiple mp4 files to mp3

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
Winemaker
New Cone
New Cone
Posts: 2
Joined: 08 Apr 2017 14:46

convert multiple mp4 files to mp3

Postby Winemaker » 08 Apr 2017 15:06

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.

zcot
Big Cone-huna
Big Cone-huna
Posts: 606
Joined: 15 Jun 2005 10:58

Re: convert multiple mp4 files to mp3

Postby zcot » 10 Apr 2017 05:26


Winemaker
New Cone
New Cone
Posts: 2
Joined: 08 Apr 2017 14:46

Re: convert multiple mp4 files to mp3

Postby Winemaker » 10 Apr 2017 17:31

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.

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: convert multiple mp4 files to mp3

Postby mederi » 14 Apr 2017 13:06

Try VLC 3 nightly build: http://nightlies.videolan.org/
Qt interface:
* Batch convert support

zcot
Big Cone-huna
Big Cone-huna
Posts: 606
Joined: 15 Jun 2005 10:58

Re: convert multiple mp4 files to mp3

Postby zcot » 14 Apr 2017 20:54

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").

sandygs72
New Cone
New Cone
Posts: 1
Joined: 06 Oct 2017 12:22

Re: convert multiple mp4 files to mp3

Postby sandygs72 » 06 Oct 2017 12:34

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.

Shapet
New Cone
New Cone
Posts: 1
Joined: 17 Oct 2017 12:23

Re: convert multiple mp4 files to mp3

Postby Shapet » 17 Oct 2017 12:42

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!

:)

Parbuster
New Cone
New Cone
Posts: 4
Joined: 24 Dec 2018 18:08

Re: convert multiple mp4 files to mp3

Postby Parbuster » 29 Mar 2020 15:39

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

jh_mk1234@msn.com
New Cone
New Cone
Posts: 1
Joined: 30 Mar 2020 20:23

Re: convert multiple mp4 files to mp3

Postby jh_mk1234@msn.com » 30 Mar 2020 20:51

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


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 27 guests