0
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でm4aをYouTubeにアップロードできるmp4に変換する方法

Posted at

背景

iPhoneで録音したm4aの音声ファイルをYoutubeに非公開でアップロードしておくためにffmpegを用いてmp4に変換を試みました。

しかし、公式に書かれているシンプルな例

$ ffmpeg -i input.m4a output.mp4

で変換したmp4ではYouTubeへのアップロードに失敗してしまいました。

結論

こちらの記事を参考に下記でYouTubeにアップロード可能なmp4へ変換することができました。

$ ffmpeg -loop 1 -i image.png -i input.m4a -shortest output.mp4

単に-iで画像を指定するだけではだめで、ループ回数を指定してあげる必要がありました。
また、-shortestをつけると変換処理が早くなったので、つけています。

なお、このオプションは音質にはこだわっておらず、YouTubeにアップロード可能なmp4を素早く生成することに主眼を置いています。

同じ問題で困っている人の助けになれば幸いです。

参考

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