找回密码
 新猫注册
查看: 647|回复: 0

从FLV中截图以及相关PHP代码

[复制链接]
kernel 发表于 2008-6-12 21:26:36 | 显示全部楼层 |阅读模式
使用-ss参数 作用(time_off set the start time offset),可以从指定时间点开始转换任务。如:
转换文件格式的同时抓缩微图:
ffmpeg -i "test.avi" -y -f image2 -ss 8 -t 0.001 -s 350x240 'test.jpg'
对已有flv抓图:
ffmpeg -i "test.flv" -y -f image2 -ss 8 -t 0.001 -s 350x240 'test.jpg'
-ss后跟的时间单位为秒

$streamPath = "./test.flv";
$newName = "myConvertedPic.jpg";
$imgW = 320;
$imgH = 240;
$imgQuality = 80;
$resultPath = "http://www.meinserver.de/snapit/".$newName.".jpg";
exec ("flv2jpg.exe", $streamPath, $newName, $imgW, $imgH, $imgQuality);
您需要登录后才可以回帖 登录 | 新猫注册

本版积分规则

手机版|小黑屋|[漫猫]动漫论坛

GMT+8, 2024-3-28 23:47

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表