您的位置:首页 > 其它

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

2007-01-12 13:33 435 查看
需要用到的组件
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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: