LoginSignup
0
0

More than 1 year has passed since last update.

Finderからワンクリックで動画をYouTubeのshorts用(アスペクト比9:16)にする

Last updated at Posted at 2022-08-12

TL;DR

ここ数年流行りのYouTubeのshortsの条件は、動画が1分以内でかつアスペクト比が9:16であること。
今回は、Finderから動画を9:16にするworkflowをAutomatorで作成した。動画本体のアスペクトは変えずに、左右上下に黒いボックスを付け加えて動画の画面サイズだけ9:16にする。

手順

① Automatorを開く
Automator→新規→クイックアクション
image.png

シェルスクリプトを実行をダブルクリック
image.png

② 条件設定
ワークフローが受け取る現在の項目ムービーファイルにする
イメージはお好きに
検索対象Finder.appにする。
image.png

③ シェルスクリプトを実行
シェルスクリプトの中に以下のソースをペースト

name="$1"
/usr/local/bin/ffmpeg -i "$1" -pix_fmt yuv420p -vf "pad=width=max(iw\,ih*(9/16)):height=ow/(9/16):x=(ow-iw)/2:y=(oh-ih)/2" "${name%.*}_shorts.mp4"

入力の引き渡し方法引数としてに変更。
image.png

④ 通知用AppleScript
これはなくてもいいが、完了したときに通知させる。
AppleScriptを実行をダブルクリック

on run {input, parameters}
	display notification "変換処理が完了しました" with title "動画をshorts用に変換する"
	return input
end run

をペーストする。

⑤ 保存
cmd+Sで名前をつけて保存する。このworkflowは /Users/$USER/Library/Services/の下に保存される。
image.png

使い方

Finderから右クリック→クイックアクション→保存した名前のワークフローをクリック

image.png

元の名前_shorts.mp4 という動画ファイルが出力される。
image.png

もとの動画に左右上下に黒いボックスがついた9:16の動画のできあがり!

0
0
1

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
0
0