In the code below, the macro builds this string and then runs that string, i.e.:
Run>D:\ffmpeg\bin\ffmpeg -ss 591 -i in.mp4 -t 90 -c copy out.mp4
The command prompt flickers on and off, but I can't tell what, if anything, it did. The result is nothing. I couldn't get ExecuteFile to function as Start | Run either.
When I paste this string into Start | Run, it works as intended in Windows 10.
D:\ffmpeg\bin\ffmpeg -ss 591 -i in.mp4 -t 90 -c copy out.mp4
Code: Select all
/* Run ffmpeg to shorten a video.
ffmpeg -ss 591 -i in.mp4 -t 213 -c copy out.mp4 (is the same as the line below)
ffmpeg -ss 591 -i in.mp4 -to 804 -c copy out.mp4
More notes here:
https://superuser.com/questions/377343/cut-part-from-video-file-from-start-position-to-end-position-with-ffmpeg
*/
Let>GeneralWait=0.1
Let>ffmpegPath=D:\ffmpeg\bin\ffmpeg
Let>StartTime=591
Let>NewVideoDuration=90
Wait>GeneralWait
Wait>GeneralWait
Wait>GeneralWait
Let>strFFmpeg=ffmpegPath
Concat>strFFmpeg, -ss
//Let>strFFmpeg= -ss
Concat>strFFmpeg,%space%
Concat>strFFmpeg,%StartTime%
Concat>strFFmpeg, -i in.mp4 -t
Concat>strFFmpeg,%space%
Concat>strFFmpeg,%NewVideoDuration%
Concat>strFFmpeg, -c copy out.mp4
Run>strFFmpeg
//ExecuteFile>%ffmpegPath%,%strFFmpeg%
//Msg>RP_RESULT
Msg>strFFmpeg
Label>MacroEnd