Skyfireblaze
Member
Okay I realize what I'm doing can hardly be called programming as I merely make a batch-file but I figured it's still the best thread to ask in Basically what I try to do after the recent WebM boom is to make a batch-file that converts videos to WebM and then place it in Windows' "Send To" context menu so it's easily accessible.
I already got the batch file up and fully working though I have one problem. It works when I drag and drop a video-file onto the .bat that is in the same directory as the .bat itself, though I get a "File not found" error when I drag and drop a file from outside the .bat's directory. Is what I want to do even possible?
Here's the content of my .bat file so far:
Thanks in advance for any help!
EDIT: Figures I solve the problem on my own minutes after posting this
I thought "File not found" was related to the .bat not finding the dragged and dropped video-file but I just had to specify the absolute path to ffmpeg.exe and it's working, oh well...
I already got the batch file up and fully working though I have one problem. It works when I drag and drop a video-file onto the .bat that is in the same directory as the .bat itself, though I get a "File not found" error when I drag and drop a file from outside the .bat's directory. Is what I want to do even possible?
Here's the content of my .bat file so far:
Code:
@echo off
echo "Specify starting time in hh:mm:ss[.mss] (for example 00:00:10.000 would equal 10 seconds into the video)"
set /p Start=
echo "Specify end time in hh:mm:ss[.mss] (for example 00:00:20.000 would equal 20 seconds into the video)"
set /p End=
echo "Specify the width of the WebM in pixels (the height will be calculated automatically to maintain the aspect ratio)"
set /p Width=
echo "Set the maximum allowed bitrate (default is 15000)"
set /p Bit=
ffmpeg -i %1 -ss %Start% -to %End% -c:v libvpx -crf 4 -b:v %Bit%K -vf scale=%Width%:-1 -an %1.converted.webm
Thanks in advance for any help!
EDIT: Figures I solve the problem on my own minutes after posting this
I thought "File not found" was related to the .bat not finding the dragged and dropped video-file but I just had to specify the absolute path to ffmpeg.exe and it's working, oh well...