• 在线转flv+flash在线录制视频


    需要用到的组件
    ASPExec
    mencoder
    ffmpeg.exe

    第一步骤: 在线转换

    Set Executor = Server.CreateObject("ASPExec.Execute")
    Executor.Application = "cmd /c mencoder E:\qiancheng\upload\"&request.QueryString("keys")&" -o E:\qiancheng\shipin\record\streams\_definst_\record\"&lid&"\"&keys&".flv -of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames -lavcopts vcodec=flv:vbitrate=200:mbd=2:mv0:v4mv:last_pred=3:dia=3:cmp=3:vb_strategy=1 -vf scale=330:-3 -ofps 12 -srate 22050"
    Executor.Parameters = ""
    strResult = Executor.ExecuteDosApp

    asp执行 .bat文件

    第二步骤: 通过ffmpeg生成所略图+fso 删除源件

    Server.ScriptTimeout=0
    flvname=keys
    streamPath="../shipin/record/streams/_definst_/record/"&lid&"/"&flvname&".flv"
    imgW ="120"
    imgY = "90"
    imgQuality = "100"
    ss="3"
    newName = "../upload/"&flvname&".jpg"
    str="e:\qiancheng\webadmin\ffmpeg.exe"
    str=str+" -i "&server.mappath(streamPath)&" -ss 3 -vframes 1 -r 1 -ac 1 -ab 2 -s 120*90 -f image2 "&server.mappath(newName)&""
    Set shellffmpeg=server.CreateObject("ffmpeg.shellffmpeg")
    aa=shellffmpeg.shellffmpeg1(str)
    Set shellffmpeg = Nothing
    '删除上传的文件
    tupianid="../upload/"&request.QueryString("keys")
    set   fso=server.CreateObject("scripting.filesystemobject")   
    if fso.FileExists(Server.MapPath(tupianid))   then   
    fso.deletefile(server.MapPath(tupianid))   
    end if   
    set fso=nothing
  • 相关阅读:
    paip.提高开发效率自动数据库SQL备份
    paip.提升开发效率增量备份项目文件
    paip.提升开发效率使用拼音
    paip.asp vbs代码的排版格式化
    paip.asp vbs的代码折叠代码结构查看
    paip.提升用户体验文件查找
    poj3026
    poj3020
    poj1182
    POJ典型算法例题题号
  • 原文地址:https://www.cnblogs.com/MaxIE/p/618692.html
Copyright © 2020-2023  润新知