Back to Go2rtc

Notes

pkg/README.md

1.9.149.6 KB
Original Source

Notes

go2rtc tries to name formats, protocols and codecs the same way they are named in FFmpeg. Some formats and protocols go2rtc supports exclusively. They have no equivalent in FFmpeg.

Producers (input)

  • The initiator of the connection can be go2rtc - Source protocols
  • The initiator of the connection can be an external program - Ingress protocols
  • Codecs can be incoming - Receiver codecs
  • Codecs can be outgoing (two way audio) - Sender codecs
GroupFormatProtocolsIngressReceiver codecsSender codecsExample
Devicesalsapipepcmalsa:
Devicesv4l2pipev4l2:
Filesadtshttp, tcp, pipehttpaachttp:
Filesflvhttp, tcp, pipehttph264, aachttp:
Filesh264http, tcp, pipehttph264http:
Fileshevchttp, tcp, pipehttphevchttp:
Fileshlshttph264, h265, aac, opushttp:
Filesmjpeghttp, tcp, pipehttpmjpeghttp:
Filesmpegtshttp, tcp, pipehttph264, hevc, aac, opushttp:
Fileswavhttp, tcp, pipehttppcm_alaw, pcm_mulawhttp:
Net (pub)mpjpeghttp, tcp, pipehttpmjpeghttp:
Net (pub)onvifrtsponvif:
Net (pub)rtmprtmprtmph264, aacrtmp:
Net (pub)rtsprtsp, wsrtsph264, hevc, aac, pcm*, opuspcm*, opusrtsp:
Net (pub)webrtc*webrtcwebrtch264, pcm_alaw, pcm_mulaw, opuspcm_alaw, pcm_mulawwebrtc:
Net (pub)yuv4mpegpipehttp, tcp, pipehttprawvideohttp:
Net (priv)bubblehttph264, hevc, pcm_alawbubble:
Net (priv)doorbirdhttpdoorbird:
Net (priv)dvriptcph264, hevc, pcm_alaw, pcm_mulawpcm_alawdvrip:
Net (priv)eseecloudhttpeseecloud:
Net (priv)goproudpTODOgopro:
Net (priv)hasswebrtcTODOhass:
Net (priv)homekithaph264, eld*homekit:
Net (priv)isapihttppcm_alaw, pcm_mulawisapi:
Net (priv)kasahttph264, pcm_mulawkasa:
Net (priv)nestrtsp, webrtcTODOnest:
Net (priv)ringwebrtcring:
Net (priv)roborockwebrtch264, opusopusroborock:
Net (priv)tapohttph264, pcmapcm_alawtapo:
Net (priv)tuyawebrtctuya:
Net (priv)vigihttpvigi:
Net (priv)webtorrentwebrtcTODOTODOTODOwebtorrent:
Net (priv)xiaomi*cs2, tutkxiaomi:
Servicesflussonicwsflussonic:
Servicesivideonwsh264ivideon:
Servicesyandexwebrtcyandex:
Otherecho*echo:
Otherexecpipe, rtspexec:
Otherexpr*expr:
Otherffmpegpipe, rtspffmpeg:
Otherstdinpipepcm_alaw, pcm_mulawstdin:
  • eld - rare variant of aac codec
  • pcm - pcm_alaw pcm_mulaw pcm_s16be pcm_s16le
  • webrtc - webrtc/kinesis, webrtc/openipc, webrtc/milestone, webrtc/wyze, webrtc/whep

Consumers (output)

FormatProtocolSend codecsRecv codecsExample
adtshttpaacGET /api/stream.adts
asciihttpmjpegGET /api/stream.ascii
flvhttph264, aacGET /api/stream.flv
hls/mpegtshttph264, hevc, aacGET /api/stream.m3u8
hls/fmp4httph264, hevc, aac, pcm*, opusGET /api/stream.m3u8?mp4
homekithaph264, opusApple HomeKit app
mjpegwsmjpeg{"type":"mjpeg"} -> /api/ws
mpjpeghttpmjpegGET /api/stream.mjpeg
mp4httph264, hevc, aac, pcm*, opusGET /api/stream.mp4
mse/fmp4wsh264, hevc, aac, pcm*, opus{"type":"mse"} -> /api/ws
mpegtshttph264, hevc, aacGET /api/stream.ts
rtmprtmph264, aacrtmp://localhost:1935/{stream_name}
rtsprtsph264, hevc, aac, pcm*, opusrtsp://localhost:8554/{stream_name}
webrtcwebrtch264, pcm_alaw, pcm_mulaw, opuspcm_alaw, pcm_mulaw, opus{"type":"webrtc"} -> /api/ws
yuv4mpegpipehttprawvideoGET /api/stream.y4m
  • pcm - pcm_alaw pcm_mulaw pcm_s16be pcm_s16le

Snapshots

FormatProtocolSend codecsExample
jpeghttpmjpegGET /api/frame.jpeg
mp4httph264,hevcGET /api/frame.mp4

Developers

File naming:

  • pkg/{format}/producer.go - producer for this format (also if support backchannel)
  • pkg/{format}/consumer.go - consumer for this format
  • pkg/{format}/backchannel.go - producer with only backchannel func

Mentioning modules: