ffmpeg算是超級無敵的轉檔程式,由於是開放源自由軟體,完全免費,可設定的參數非常多,僅列出我常用到的參數,其餘可參考網路上的資源,如:
http://www.ffmpeg.org/faq.html#SEC14
http://zh.wikipedia.org/zh-tw/FFmpeg
http://blog.xuite.net/michaelr/linux/22143380

將循序圖片檔轉成movie檔(取自http://www.ffmpeg.org/faq.html#SEC14)

First, rename your pictures to follow a numerical sequence. For example, img1.jpg, img2.jpg, img3.jpg,... Then you may run:

 ffmpeg -f image2 -i img%d.jpg /tmp/a.mpg

Notice that `%d' is replaced by the image number.

`img%03d.jpg' means the sequence `img001.jpg', `img002.jpg', etc...

If you have large number of pictures to rename, you can use the following command to ease the burden. The command, using the bourne shell syntax, symbolically links all files in the current directory that match *jpg to the `/tmp' directory in the sequence of `img001.jpg', `img002.jpg' and so on.

 x=1; for i in *jpg; do counter=$(printf %03d $x); ln "$i" /tmp/img"$counter".jpg; x=$(($x+1)); done

If you want to sequence them by oldest modified first, substitute $(ls -r -t *jpg) in place of *jpg.

Then run:

 ffmpeg -f image2 -i /tmp/img%03d.jpg /tmp/a.mpg

The same logic is used for any image format that ffmpeg reads.

我自己常用的指令

ffmpeg -r 24 -b 16777216 -i img%d.jpg /tmp/a.mpg

那個 -b 是設定影像的bit rate,預設是200kb/s,好像不太夠,影像會有鋸齒狀,所以要提高一些!可以直接寫17000000就可以了。

arrow
arrow
    全站熱搜

    jpwang100 發表在 痞客邦 留言(0) 人氣()