The Struggle is Real!
Hey HA community! Like many of you, I’ve been battling with Reolink cameras in Home Assistant. Specifically, getting the H.265 main stream to transcode to H.264 for clients like VLC, ContaCam, and other players that don’t support H.265. After weeks of trial and error, I finally found a working solution and wanted to share it with everyone!
The Problem You’re Probably Having:
error="streams: exec/pipe: EOF"in go2rtc logs#video=h264syntax not working- Streams work in Chrome but fail in VLC/ContaCam
- Camera works fine in Reolink app but not in HA
Why This Happens
Reolink cameras (especially RLC-840WA and similar models) output H.265 for their main 4K streams. While modern browsers can handle this via WebRTC, many other clients (VLC, ContaCam, some mobile apps) don’t support H.265. The built-in go2rtc #video=h264 syntax often fails due to timestamp issues in Reolink’s H.265 streams.
The Solution That Actually Works!
After extensive testing, I found that using go2rtc’s exec: provider with specific FFmpeg parameters is the key. Here’s the magic formula:
Basic Working Configuration:
# In your go2rtc.yaml file:
streams:
# Main stream transcoded to H.264 (for VLC/ContaCam)
camera_main_h264:
- "exec:ffmpeg -rtsp_transport tcp -i 'rtsp://admin:password@camera-ip:554//h265Preview_01_main' -c:v libx264 -preset ultrafast -tune zerolatency -c:a aac -f mpegts -"
# Original H.265 stream (for browsers that support it)
camera_main_h265:
- "rtsp://admin:password@camera-ip:554//h265Preview_01_main"
# Sub stream (already H.264, low res)
camera_sub:
- "rtsp://admin:password@camera-ip:554//h264Preview_01_sub"
P.S. If you found this helpful, consider giving it a like so others can find it more easily!