3
3

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 3 years have passed since last update.

ffmpegで配信先を複数指定する方法

Posted at

はじめに

ffmpegで入力映像(rtsp)を複数のストリーミングサーバーに配信(rtmp)できないかを調べたところ、参考にさせていただいたサイトのやり方のままでは配信が行えず、その後の調査と試行錯誤で配信が行えるようになった結果をメモとして残しておこうと思います。

ffmpegのバージョン

ffmpegのバージョン
ffmpeg version 4.0.2

ffmpegのコマンドイメージ

ffmpegのコマンドイメージ
ffmpeg -i rtsp://src -vcodec copy -an -f flv "rtmp://dst1/live/stream1" -vcodec copy -an -f flv "rtmp://dst2/live/stream2"

上記の中で、配信先を複数指定している部分は以下の通りです。

配信先その1の引数

-vcodec copy -an -f flv "rtmp://dst1/live/stream1"

配信先その2の引数

-vcodec copy -an -f flv "rtmp://dst2/live/stream2"

これでdst1、dst2のそれぞれのストリーミングサーバーを経由した再生確認で、stream1とstream2の映像がrtsp://srcの映像になっていることが確認できます。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?