asp+ffmpeg視頻截圖

<%
'視頻數據定義
str_ffmpeg="C:\ffmpeg\bin\ffmpeg.exe"     '服務器端 ffmpeg.exe 位置 
video="D:\test\ffmpeg\test2\m1080p1.wmv"   '須要截圖的視頻位置
pic="D:\test\ffmpeg\test2\m1080p1.jpg"  '截圖生產後,截圖存放的位置 服務器

'wscript腳本定義
Set WshShell = server.CreateObject("Wscript.Shell")   '創建wscript 腳本
str_ffmpeg=str_ffmpeg& " -ss 00:01:05  -i  "& video &"  "& pic &"  -r 1 -vframes 1 -an -vcodec mjpeg "  'ffmpeg命令
Isffmpeg = WshShell.Run(str_ffmpeg,1,false)           '服務器端 執行ffmpeg 命令 ide

'顯示結果
Response.write ("<br/>視頻圖片處理結束<br/>")
if Isffmpeg = 0 Then
Response.Write str&"<br>"
end if
response.write video
Response.write "<br/>"
%> code

相關文章
相關標籤/搜索