Okay so I made a small WebM conversion script that allows you to convert any video to a WebM simply by drag and dropping it onto my .bat file!
I know people might be hesitant to just run a random .bat file so I will just post the code here for anyone to make a .bat out of it.
Video version:
Code:
@echo off
echo "WebM Conversion Script v0.3.1 by Skyfireblaze & Skyllz"
echo.
echo "Specify starting time in hh:mm:ss.mss (for example 00:00:10.000 would equal 10 seconds into the video)"
echo.
set /p Start=
echo.
echo "Specify end time in hh:mm:ss.mss (for example 00:00:20.000 would equal 20 seconds into the video)"
echo.
set /p End=
echo.
echo "Specify the width of the WebM in pixels (the height will be calculated automatically to maintain the aspect ratio. Type 640 if not sure)"
echo.
set /p Width=
echo.
echo "Set the base quality level from 4 to 63 (default is 4, the lower the better)"
echo.
set /p Quality=
echo.
echo "Set the maximum allowed bitrate in MBit's/sec (default is 2)"
echo.
set /p Bit=
echo.
set /p ANSWER1=Do you want to use the VP8 or VP9 codec? (8/9) (if unsure type 8)
IF /i {%ANSWER1%}=={8} (set Codec=libvpx)
IF /i {%ANSWER1%}=={9} (set Codec=libvpx-vp9)
echo.
set /p ANSWER2=Do you want to have audio? (y/n)
IF /i {%ANSWER2%}=={y} (set Audio=-c:a libvorbis)
IF /i {%ANSWER2%}=={yes} (set Audio=-c:a libvorbis)
IF /i {%ANSWER2%}=={n} (set Audio=-an)
IF /i {%ANSWER2%}=={no} (set Audio=-an)
echo.
"%ProgramFiles%\WebM\ffmpeg.exe" -i %1 -ss %Start% -to %End% -c:v %Codec% -crf %Quality% -b:v %Bit%M -vf scale=%Width%:-1 %Audio% %1.converted.webm
.gif version:
Code:
@echo off
echo "WebM Conversion Script v0.3.1 (.gif version) by Skyfireblaze & Skyllz"
echo.
echo "Set the base quality level from 4 to 63 (default is 4, the lower the better)"
echo.
set /p Quality=
echo.
echo "Set the maximum allowed bitrate in MBit's/sec (default is 2)"
echo.
set /p Bit=
echo.
set /p ANSWER=Do you want to use the VP8 or VP9 codec? (8/9) (if unsure type 8)
IF /i {%ANSWER%}=={8} (set Codec=libvpx)
IF /i {%ANSWER%}=={9} (set Codec=libvpx-vp9)
echo.
"%ProgramFiles%\WebM\ffmpeg.exe" -i %1 -c:v %Codec% -crf %Quality% -b:v %Bit%M %1.converted.webm
The script basically asks you a few questions to fill the variables for you. Now I will give you a step by step guide how to make WebM making forever easy! The steps for the video and .gif version are identical!
1: Okay so first copy the content of the CODE up there into a empty textfile and then save it under any name you like. Next you have to change the extension of the textfile from .txt to .bat, this tells Windows that it's something it can execute.
2: Go to C:\Program Files and create a new folder called WebM. (Don't use Program Files (x86) or it won't work!)
3: Go
here and download either the 32bit or 64bit version of ffmpeg depending if you use 32bit or 64bit Windows.
4: After downloading and opening the archive you can pretty much disregard everything but the contents of the bin folder. Inside the bin folder you will find a ffmpeg.exe, just copy that into the WebM folder you created earlier.
5: You are done, from now on you can simply drop any video-file onto my .bat script and it will ask you the questions and make a WebM for you!
Optional Steps:
6: Now if you want to make the process even more convenient, read on! Copy the .bat file also into the WebM folder, right next to ffmpeg.exe
7: Make a shortcut to the .bat file from the right-click menu.
8a (for Windows Vista/7/8): Move the
shortcut you made to the following folder:
Code:
%APPDATA%\Microsoft\Windows\SendTo
If you wonder what %APPDATA% is, it's just a variable to a folder Windows uses, just paste it like that into the Address Bar of any open folder.
8b (for Windows XP): Move the
shortcut you made to the following folder:
Code:
C:\Documents and Settings\SendTo
9: What you have done is to link my WebM script to Windows' "SendTo" function, that means making a WebM file of any video you like is as simple as right-clicking on any video --> SendTo --> WebM
Note: The .webm file will always be created in the same folder the input video or .gif is!
Known issues:
- The script won't work if you place ffmpeg.exe outside the folder mentioned above
If you need help just send me a PM or ask here, I hope my script will help people with making WebM's
And can anyone tell me if it's okay to redistribute ffmpeg.exe? I would make a bundled .zip but I'm not sure I'm allowed to :/
EDITS:
- I updated the script to v0.3 which adds a VP8 and VP9 codec toggle!
- Now we have 0.3.1 which fixes the CRF description, thanks to Havel for pointing this out
- Added instructions for making a SendTo shortcut in Windows XP
- Added a .gif to WebM conversion script