1
1

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.

RTSPをPC/RasPi経由でYouTube Live

Last updated at Posted at 2022-05-28

気づいたらATOM Cam2にRTSPのI/Fが出来ていたのでYouTube Liveにでも残したくなった

ffmpegでサクッと


2023/03/15 追記
Atom Cam2のファームアップデートしたところなにがしかの変わったようで、オプションをちょとつけないといけないようだ
というわけで、こんなコマンドにすると良さそう

ffmpeg -rtsp_transport tcp -i rtsp://<anata-no-ip>/live -ar 11025 -f flv rtmp://a.rtmp.youtube.com/live2/<stream_key>

相変わらず Non-monotonous DTS ~~~ を消す方法がわからない
previousとcurrentの値が違いすぎるときはffmpegを起動し直すと早く近くなることがあるのでそれで逃げてる
誰か教えてくらはい


そのまま
ffmpeg -i rtsp://<anata-no-ip>/live -f flv rtmp://a.rtmp.youtube.com/live2/<livekey>

開始時に

[flv @ 0x7fffc4af7e80] Non-monotonous DTS in output stream 0:1; previous: 9422, current: 9393; changing to 9422. This may result in incorrect timestamps in the output file.

みたいなエラーが表示され続けるが、しばらくすると消えてくれる
音声のBitrateやらの不一致がそのうちいい感じになるのかもしれない

無音化
ffmpeg -i rtsp://<anata-no-ip>/live -f lavfi -i aevalsrc=0 -map 0:0 -map 1:0 -shortest -f flv rtmp://a.rtmp.youtube.com/live2/<livekey>

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?