1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

ffmpeg Tips

Posted at

いつも忘れるのでメモ

静止画から動画を作成する

ffmpeg -loop 1 -i input.jpg -vcodec libx264 -pix_fmt yuv420p -t 3 -r 29.97 output.mp4

-t : 作成する動画の時間[sec]
-r : frame rate

動画を1秒ごとにx枚の静止画にする

ffmpeg -i input.mp4 -r 1 output%04d.png

-r : frame rate (=x) 上記の例では1秒に1枚の静止画にする

動画の連結

list.txt
file /path/to/input0001.mp4
file /path/to/input0002.mp4
...
file /path/to/inputxxxx.mp4
ffmpeg -f concat -i list.txt -c copy output.mp4

-c : codec ("copy"で入力と同一codec)

参考

http://tecsingularity.com/ffmpeg/make-movie/
https://gist.github.com/hirokai/807d05ddd9f749100e1b96f9d0422e66
https://qiita.com/niusounds/items/c386e02ab8e67030bdc0

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?