Help us understand the problem. What is going on with this article?

ffmpegでMacのスクリーンレコーディングしたmovファイルをmp4, gifに変換する

あまりソフトを増やしたりしたくないので手元のffmpegでできないかなと思ったらできたのでメモ

スクリーンレコーディング(画面収録)する

shift + command + 5 で適当に撮る

詳しくはこちら
https://support.apple.com/ja-jp/HT208721

注意点としては、キャプチャサイズを偶数倍ピクセルにすること。後述する mp4 変換の時に難儀する

ffmpeg で変換する

mp4

$ ffmpeg -i sample.mov -pix_fmt yuv420p out.mp4

# 整数倍ではないと言われてエラー出た時は以下のオプションをつける
# -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2"

gif

$ ffmpeg -i sample.mov -r 24 out.gif
Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away