原理及原始檔解讀
從Google Video跟YouTube將flv檔抓下來。
想找Google Video的flv檔案位址,首先要看影片頁面的網頁原始碼,找到flash影片瀏覽器的swf檔的位置(應該是叫做googleplayer.swf,搜尋一下吧),將後面的videoUrl參數複製下來,然後使用php的urldecode
或是Java Script的unescape
函式,就可以得到正確的flv檔案位址。
YouTube的就更簡單啦,只要將網址中的watch.php?v=
改成get_video.php?video_id=
就是flv檔案的位址了。
update:現在YouTube還要加上&t={一段亂七八糟的字串}
,這串參數可以在原始碼內flash object的地方找到。
不過懶人就不想每次都要去翻原始碼或是要手動改網址列再抓檔,所以我寫了一個php script自動去找flv的檔案位址:GooTube FLV Retriever,下面簡單寫一下使用方法。
先複製Google Video或是YouTube的影片頁面的網址。


將網址列貼上GooTube FLV Retriever的input field中,因為script會自動判斷是Google Video或是YouTube的網址,所以沒什麼其他的選項需要選的。

送出之後會得到一個flv檔案的網址列。為了方便,我順便做了連結,這樣就可以直接按右鍵另存新檔囉。

按右鍵另存新檔,記得將副檔名改為flv。

下載完畢之後,就可以看到下載回來的flv檔了(廢話),如果你有flash video的撥放程式,就可以直接打開來觀看囉。

如果沒有flv player或是想將flv影片檔轉成wmv或是mpeg格式的話怎麼辦?
沒關係,我們可以用Riva VX: Riva FLV Encoder,下面簡略的講一下如何用Riva FLV Encoder將flv檔轉成mpg。
安裝完Riva FLV Encoder後,啟動程式,按下Browse。

選取想要轉換的flv檔。

選完之後回到程式的畫面,你可以選擇輸出的目錄,預設是桌面。

手動更改output file的file name,將副檔名改成mpg。
這邊有點奇怪,這程式並沒有選項讓你選擇輸出的類型,而是直接更改副檔名,我不知道這到底算好還是壞(不過他本來就說是FLV Encoder,所以沒別的選項可以選也是可以理解的,但是他真的可以轉成mpg就是了)。

按下Encode就開始轉檔囉。

轉檔的時候程式的畫面會變白,等到畫面恢復就表示好囉!
下面也會顯示:Encoding Successful! 太好啦,這樣就不用每台電腦都要裝FLV Player才能看了。

p.s. : Riva FLV Encoder是個Freeware,開心的用吧!!