zoukankan      html  css  js  c++  java
  • ASP执行ffmpeg的非组件版

    用Wscript.Shell

    <%
    Server.ScriptTimeout=0
    'On Error Resume Next
    flvname=request.QueryString("flvname")
    'streamPath="../record/streams/_definst_/"&flvname&".flv"
    streamPath="dd/"&flvname&".flv"
    imgW ="160"
    imgY = "120"
    imgQuality = "70"
    ss="3"
    'newName = "../videoimage/"&flvname&".jpg"
    newName = "dd/"&flvname&".jpg"
    strd="ffmpeg.exe"
    strd=server.mappath(strd)
    strd=strd+" -i "&server.mappath(streamPath)&" -ss 3 -vframes 1 -r 1 -ac 1 -ab 2 -s "&imgW&"*"&imgY&" -f image2 "&server.mappath(newName)&""
    Set WshShell = server.CreateObject("Wscript.Shell")
    IsSuccess = WshShell.Run(strd,1,FALSE)
    '(strd,1,FALSE)为1时服务器端显示进度,为2时则无
    if IsSuccess = 0 Then
    Response.Write strd
    response.write " <br />成功执行"
    else
    Response.Write strd
    Response.write "<br />命令执行失败!权限不够或者该程序无法运行"
    end if
    Set WshShell = Nothing
    'if err.number <> 0 then
    'Response.Write "<p>错误号码:" & Err.number
    'Response.Write "<p>原因:" & Err.description
    'Response.Write "<p>错误来源:" & Err.Source
    'Response.end
    'end if
    %>
  • 相关阅读:
    Bitnami WordPress如何让默认URL指向WordPress目录?
    单片机调试
    FreeRTOS
    FreeRTOS
    FreeRTOS
    FreeRTOS
    FreeRTOS
    FreeRTOS 问题归纳
    单片机通信的加密和解密
    IAR ------ 扩展关键字__weak
  • 原文地址:https://www.cnblogs.com/MaxIE/p/576569.html
Copyright © 2011-2022 走看看