我想使用的ffmpeg的SWF轉換成PNG,我不能從某種像SWF中提取圖像:http://rapidshare.com/files/450953994/Movie1.swfFFMPEG並將swf轉換爲圖像?
,我在bat文件(1.BAT)
cws2fws Movie1.swf 3.swf
ffmpeg -i 3.swf -f image2 -vcodec png tese%d.png
使用此代碼
請幫助我! 我只想將swf轉換爲圖片還有其他建議方式有幫助嗎?
我想使用的ffmpeg的SWF轉換成PNG,我不能從某種像SWF中提取圖像:http://rapidshare.com/files/450953994/Movie1.swfFFMPEG並將swf轉換爲圖像?
,我在bat文件(1.BAT)
cws2fws Movie1.swf 3.swf
ffmpeg -i 3.swf -f image2 -vcodec png tese%d.png
使用此代碼
請幫助我! 我只想將swf轉換爲圖片還有其他建議方式有幫助嗎?
Mencoder不支持壓縮[swf @ 0xc230a0]Compressed SWF format not supported
。試一試http://www.swftools.org/download.html(編譯swftools後我已經試過了,但沒有成功)。 swfextract返回
$ swfextract test.swf
Objects in file test.swf:
[-i] 1 Shape: ID(s) 1
[-f] 1 Frame: ID(s) 0
沒有視頻,沒有聲音,沒有PNG ...
更新------
幾個跑腿後,從swftools swfrender做的工作。有一個沒有記錄的pagerange
選項。從swfrender.c
:
int args_callback_option(char*name,char*val)
{
if(!strcmp(name, "V")) {
printf("swfrender - part of %s %s\n", PACKAGE, VERSION);
exit(0);
} else if(!strcmp(name, "o")) {
[…]
} else if(!strcmp(name, "p")) {
pagerange = val;
return 1;
} else if(!strcmp(name, "s")) {
[…]
return 0;
}
現在知道,你可以做一個shell腳本(這裏快速和骯髒的使用bash):
#!/bin/bash
let count=1
swfinput=$1
while :
do
output=`basename $swfinput .swf`$count.png
swfrender $swfinput -p $count -o $output
if [ ! -f $output ];
then
break
fi
echo swfrender $swfinput -p $count -o $output
((count++))
done
就是這樣......
我使用cws2fws來解壓縮SWF文件,你的意思是用ffmpeg轉換需要不同的解壓縮? – Ali
不,我剛剛嘗試了從您的示例文件開始的獨立測試:1.使用swfcombine(由swftools提供)解壓縮; 2.嘗試使用swfextract提取數據。問題是,我只能找到形狀數據,沒有更多。 Cws2fws可能會正確地完成這項工作,但是沒有視頻需要提供mencoder或ffmpeg,沒有png ......我不知道只有形狀可以做什麼。 (你當然注意到我不是閃光大師) – Renaud
GOT IT !!!! swfrender由swftools提供。 '$ swfrender Movie1.swf -o output.png',你在png輸出中得到動畫的第一個圖像。無需解壓縮或提取...現在,您的需求是否足夠或您會得到幾個PNG(即動畫)? – Renaud
FFMPEG支持SWF?不知道...你在哪裏見過? – ronag
@ronag:'$ ffmpeg -formats'返回'DE swf Flash格式' – Renaud