0
2

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

rtmpの認証できないエンコーダの間にffmpeg入れて認証する

Last updated at Posted at 2017-06-19

認証できないエンコーダって・・・・

認証ができないエンコーダがあったら困りますよね。
間にffmpegを噛まして認証して飛ばしたいと思いました。

環境

Lunux系であれば多分なんでも

nginxインストール

http://qiita.com/hagane5563/items/842afe6d6e7100db3a28
を参照してください。

ffmpegインストール

apt-getとかyumでサクッと。

nginxコンフィグ

/etc/nginx/nginx.conf
rtmp {
    server {
        listen 1935;
        access_log /var/log/nginx/rtmp_access.log;
         application conv {
            live on;
            wait_video on;
        }
    }
}

エンコーダ側設定

rtmp://nginxサーバのアドレス/conv/ストリーム名
でエンコード

ffmpegコマンド

ffmpeg -re -i "rtmp://localhost/conv/ストリーム名" -c:v copy -c:a copy -f flv "rtmp://ユーザ名:パスワード@認証が必要なRTMPアドレス"
Ctrl+Cで止まります。

まあ

認証できるエンコードを使った方が良いにこしたことは無いよね。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?