ASP在线转flv+缩略图

时间:2007-08-27 16:18:00 

FLV在线转换,是目前主流播客网上通用的一种视频解决方案需要用到的组件
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


第二步骤: 通过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
标签:flv,转换
0
投稿

猜你喜欢

  • sql怎样显示出评论最多的文章?

    2008-08-08 12:17:00
  • sql server中批量插入与更新两种解决方案分享(存储过程)

    2012-05-22 18:29:59
  • © 版权符号显示不清楚解决方法

    2008-02-18 14:46:00
  • 目前最全的浏览器/CSS选择器兼容性总结(包括Safari 4 beta)

    2009-02-26 15:26:00
  • GC与JS内存泄露

    2010-09-25 19:01:00
  • MySQL数据库优化经验详谈

    2009-12-15 10:34:00
  • HTML5 WebSockets基础使用教程

    2010-09-21 12:48:00
  • 让长字符自动换行 比如URL和Email地址等

    2008-07-01 14:41:00
  • 小谈MySQL字符集

    2009-02-13 13:30:00
  • 如何建设一个多语言版的ASP网站?

    2009-11-26 20:36:00
  • mysql myisam 优化设置

    2010-03-25 10:18:00
  • 跨浏览器使用剪贴板

    2008-09-27 13:26:00
  • W3C优质网页小贴士(三)

    2008-04-09 13:32:00
  • 菜鸟课堂:玩转MySQL数据库 性能优化八法

    2009-03-25 14:44:00
  • Oracle数据库快照的使用

    2010-07-28 13:32:00
  • js实现单机双人象棋设计分析

    2008-05-20 12:57:00
  • MySQL 数值类型概述int smallint tinyint

    2010-11-02 11:46:00
  • 在SQL Server中处理空值时涉及的三个问题

    2009-02-05 15:30:00
  • asp 小偷采集程序原理与常用函数方法

    2011-03-06 10:36:00
  • 对设计文档的一点小看法

    2010-03-15 12:30:00
  • asp之家 网络编程 m.aspxhome.com