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でMP3の音声データをMP4の動画にする

Posted at

はじめに

FFmpegというフリーウェアを使って動画を作る方法です。動画といっても静止画に音声をつけるだけです。

FFmpegの環境設定

Windowsで行います。

  1. FFmpegのダウンロード
    https://ffmpeg.org/download.html

  2. ダウンロードしたzipファイルを解凍します。
    C:\Users\talomina\Downloadsに解凍したとします。

素材データをそろえる

用意するもの。

  • 画像データ(PNG) gazou.pngとします。
  • 音声データ(MP3) onsei.mp3とします。

これらのファイルをc:\Users\talomina\Documentsに置くものとします。

動画を作成する

  1. Powershellから実行します。
C:\Users\talomina\Downloads\ffmpeg-master-latest-win64-gpl-shared\ffmpeg-master-latest-win64-gpl-shared\bin\ffmpeg.exe `
-loop 1 -r 30000/1001 `
-i C:\Users\talomina\Documents\gazou.png `
-i C:\Users\talomina\Documents\onsei.mp3 `
-pix_fmt yuv420p -shortest douga.mp4

おわりに

パスの設定等はしなくてもフルパスでffmpeg.exeを実行することができました。

参考文献

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?