Converting videos with style  (Read 4464 times)

N3Cr0

  • 1337
  • *
  • Posts: 641
  • Country: de
Converting videos with style
« on: June 12, 2012, 17:52 »
Do you know this problem?
You have a music video and want to convert it instantly into an mp3 file.
My Solution is the commandline tool ffmpeg, which can much more, but I guess this is the mostly used application.
It also offers high quality with low filesize.

1. Get a Windows build from this website: http://ffmpeg.zeranoe.com/builds/
    (static or shared; if you don't know what to do: get the static package.)
2. To make it executable from any path, I recommend extracting the files from the "bin" directory into your /Windows folder.
    This makes the usage more comfortable.
3.1 Let's make a script to automate converting videos to mp3's. Why not even giving the option for multiple bitrates?
    OK, I wrote one, so do just following: Open your notepad and paste this:
Code: [Select]
@echo off

set ext=%1
set /p "br=Bitrate [1=128k | 2=160k | 3=192k]"
if %br%==1 ffmpeg.exe -i %1 -f mp3 -ab 128000 -acodec libmp3lame "%ext:~0,-5%.mp3"
if %br%==2 ffmpeg.exe -i %1 -f mp3 -ab 160000 -acodec libmp3lame "%ext:~0,-5%.mp3"
if %br%==3 ffmpeg.exe -i %1 -f mp3 -ab 192000 -acodec libmp3lame "%ext:~0,-5%.mp3"

echo Done.
pause

3.2 Save the file as a batch file. (Change the file type from "text files" to "all files" and let the filename end with .bat instead of .txt)
      I recommend copying this file into your /windows directory.
4.Open a video with the file you have created. A commandprompt should appear and ask you for the bitrate you want to use. So press 1,2 or 3 and return.

EDIT:
For the lazy people: I have made a package. Just extract it and open the videos with the vid2mp3.bat
http://www.mediafire.com/?aaow4wz5t16bhl5

*Note: Strangely this program was very slowly when I converted a video under Windows 7. I usually run it under Linux and it's pretty fast there.
Also Windows cannot handle variables with spaces, so this script only works for filenames without spaces.
« Last Edit: June 12, 2012, 18:13 by N3Cr0 »
http://n3cr0.itch.io/

xmpp: n3cr0@jabber.ccc.de