Reputation: 75
Trying to use the code below to run the following command in a .bat file
c:\program files (x86)\Team Mediaportal\Mediaportal\TV Thumbnailer\ffmpeg.exe -ss 720 -itsoffset -5 -i "c:\tv recordings\sample recording.mpg" -vframes 1 -y "C:\tv recordings\sample recording.jpg"
Set "FFMpeg_Location=c:\Program Files (x86)\Team Mediaportal\Mediaportal\TV Thumbnailer"
rem or Set "FFMpeg_Location=c:\Program Files (x86)\Team Mediaportal\Mediaportal\TV Thumbnailer\ffmpeg.exe" , whichever is easier :D
Set "Video_Path=c:\tv recordings\"
Set "Video_File=sample recording"
%FFMpeg_Location%\FFMpeg.exe -ss 720 -itsoffset -5 -i "%Video_Path%%Video_File%.mpg" -vframes 1 -y "%Video_Path%%Video_File%.jpg"
PS. I'd like the .bat to continue after ffmpeg has finished running, as I am using ffmpeg to process a lot of files inside a for loop. Also I'd prefer not to change the working directory of the .bat file by doing cd c:\pro...\tv thumbnailer\ as that would break my script.
EDIT: I solved my problem by using the call statement :D
call "%FFMpeg_Location%\FFMpeg.exe" -ss 720 -itsoffset -5 -i "%Video_Path%%Video_File%.mpg -vframes 1 -y "%Video_Path%%Video_File%.jpg"
Upvotes: 1
Views: 13469
Reputation: 75
call "%FFMpeg_Location%\FFMpeg.exe" -ss 720 -itsoffset -5 -i "%Video_Path%%Video_File%.mpg -vframes 1 -y "%Video_Path%%Video_File%.jpg"
Upvotes: 2