Upgrade to Pro — share decks privately, control downloads, hide ads and more …

WHIP を試す( Galène/OBS Studio/GStreamer/ffmpeg/go2rtc )

WHIP を試す( Galène/OBS Studio/GStreamer/ffmpeg/go2rtc )

発表場所::
「鹿児島Linux勉強会 2023.06(オンライン開催)」
2023-06-18(sun) 14:00-18:00 ( 〜22:00 )
https://kagolug.connpass.com/event/284750/

source::
https://gitlab.com/matoken/kagolug-2023.06/-/blob/main/slide/slide.adoc

Kenichiro MATOHARA

June 18, 2023
Tweet

More Decks by Kenichiro MATOHARA

Other Decks in Technology

Transcript

  1. Galène のML でWHIP(WebRTC- HTTP Ingestion Protocol) を知る [Galene] OBS Studio

    and Galene WHIP WHIP output got merged into OBS Studio master early this morning. I tested Galène with OBS master, and it’s breathtaking. 3
  2. Galène のWHIP breanch を試す とりあえず普通に使えるのを確認 $ git clone https://github.com/jech/galene $

    cd galene $ git checkout whip $ CGO_ENABLED=0 go build -ldflags='-s -w' $ mv ./galene ./galene-whip $ mkdir groups $ echo '{ "op": [{"username": "admin", "password": "1234"}], "presenter": [{}] }' > groups/name.json $ ./galene-whip 4
  3. OBS Studio WebRTC (WHIP) output support OBS Studio のPR のDraft

    にWHIP を使うplugin これをbuild するか,GitHub Actions から最新の自分の環境に合 うものをダウンロードして利用 https://github.com/Sean-Der/obs- studio/tree/john/webrtc-output-plugin https://github.com/obsproject/obs-studio/actions? query=branch%3Awebrtc-output-plugin 5
  4. 8

  5. go2rtc WHIP に対応したサーバのgo2rtc を試す AlexxIT/go2rtc: Ultimate camera streaming application with

    support RTSP, RTMP, HTTP-FLV, WebRTC, MSE, HLS, MP4, MJPEG, HomeKit, FFmpeg, etc. 10
  6. OBS Studio から go2rtc へWHIP OBS Studio の配信URLを に して配信

    go2rtc にstream は現れるが,データが来ていない? WHIP ではなくrtmp でTwitch に配信してみるとうまく行く http://localhost:1984/api/webrtc?dst=livestream 12
  7. GStreamer のWHIP(未検証) GStreamer 1.22〜 gst-plugins-rs で WHIP サポート  GStreamer

    / gst-plugins-rs · GitLab $ cargo install cargo-c : ...requires rustc 1.65.0 or newer... $ rmadison rustc | grep -E -v "old|debug" rustc | 1.63.0+dfsg1-2 | stable | source, amd64, arm64, armel, armhf, rustc | 1.63.0+dfsg1-2 | testing | source, amd64, arm64, armel, armhf, rustc | 1.63.0+dfsg1-2 | unstable | source, amd64, arm64, armel, armhf, rustc | 1.66.0+dfsg1-1~exp1 | experimental | source, amd64, arm64, armel, armhf, #942314 - RFP: gst-plugins-rs — GStreamer plugins written in Rust - Debian Bug report logs 13
  8. ffmpeg のWHIP まだ取り込まれていないPR を利用 build テストパターンを送信 $ git clone -b

    feature/rtc-muxer https://github.com/winlinvip/ffmpeg-webrtc.git $ cd ffmpeg-webrtc $ ./configure --enable-muxer=rtc --enable-openssl --enable-version3 \ --enable-libx264 --enable-gpl --enable-libopus $ make -j$(nproc) $ ./ffmpeg -re -f lavfi -i testsrc=s=1280x720:r=30:decimals=2 -f lavfi -i sine=f=440:b=4 \ -vcodec libx264 -pix_fmt yuv420p -profile:v baseline -r 25 -g 50 \ -acodec libopus -ar 48000 -ac 2 \ -f rtc http://localhost:1984/api/webrtc?dst=livestream 14
  9. 15

  10. まとめ 生煮え>< まだ検証が足りない感じGStreamer, Galene WHIP, OBS Studio は再検証するつもり まだ時期尚早だったかも? go2rtc

    は様々なソースを1画面で見ることが出来てWHIP 関係なく 便利 WHIP 自体はWebRTC で直に配信できて低遅延らしいので気にな る h.264+opus なのでRaspberry Pi でラジコンとかにも良さそ う? 16
  11. 参考URL WebRTC配信技術 "WHIP" で遊ぶ - NTT Communications Engineers' Blog OBSとgo2rtcを使ってWebRTC

    (WHIP)配信をする - KILINBOX ffmpegからWebRTCのWHIPでSora Laboにつなぐ実験 18