zoukankan      html  css  js  c++  java
  • 在线转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
  • 相关阅读:
    bzoj 3155: Preprefix sum
    bzoj 1854: [Scoi2010]游戏
    UVA1608 不无聊的序列 Non-boring sequences
    UVA1747 【Swap Space】
    Luogu P5550 Chino的数列
    bzoj 1799: [Ahoi2009]self 同类分布
    bzoj 1054: [HAOI2008]移动玩具
    MATLAB工具箱,应用程序,软件和资源的精选清单
    论文格式排版Issue及解决办法
    《将博客搬至CSDN》
  • 原文地址:https://www.cnblogs.com/MaxIE/p/618692.html
Copyright © 2011-2022 走看看