Skip to content

Add support HTTP-FLV with H265 from new Reolink cameras #1938

@0x464e

Description

@0x464e

Hi,

So I just received my new Reolink E1 Zoom ("v2", so the new version they silently upgraded to with higher MP, narrower fov, etc).
I quite like the camera, its form factor, its functionality, etc. But trying to get it to play nicely with Frigate has just been a HUGE pain.

So few things I've found out:

  • The camera is always in H265 when in 4K, can't be changed
  • RTSP H265 works in go2rtc no problem
  • BUT, Reolink RTSP is very bad, it stutters a lot, completely unusable if you want a smooth picture
  • Ok, well luckily the RTMP and HTTP FLV (which is just RTMP wrapped in HTTP) work great
    (apparently the HTTP-FLV stream is most realiable)
  • BUT, go2rtc will just seemingly refuse to work with H265 RTMP/HTTP-FLV
  • If I drop the resolution of the camera so it goes back to H264, go2rtc will work with RTMP/HTTP-FLV

Now what really annoys me, is that I can ffplay the H265 RTMP or HTTP-FLV stream no problem whatsoever. Butter smooth 4k playback with no problems.
So why can't go2rtc work with it if ffplaying works just fine? Is there some gotcha config I'm missing, or some technical limitation?

Some outputs:

If I ffprobe the HTTP-FLV stream, I get:

ffprobe version 8.0-full_build-www.gyan.dev Copyright (c) 2007-2025 the FFmpeg developers
  built with gcc 15.2.0 (Rev8, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-lcms2 --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-libdvdnav --enable-libdvdread --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libopenjpeg --enable-libquirc --enable-libuavs3d --enable-libxevd --enable-libzvbi --enable-liboapv --enable-libqrencode --enable-librav1e --enable-libsvtav1 --enable-libvvenc --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-openal --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-liblc3 --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint --enable-whisper
  libavutil      60.  8.100 / 60.  8.100
  libavcodec     62. 11.100 / 62. 11.100
  libavformat    62.  3.100 / 62.  3.100
  libavdevice    62.  1.100 / 62.  1.100
  libavfilter    11.  4.100 / 11.  4.100
  libswscale      9.  1.100 /  9.  1.100
  libswresample   6.  1.100 /  6.  1.100
Input #0, flv, from 'http://ip/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=user&password=password':
  Metadata:
    displayWidth    : 3840
    displayHeight   : 2160
    rotate          : 0
  Duration: 00:00:00.00, start: 0.000000, bitrate: N/A
  Stream #0:0: Video: hevc (Main), yuv420p(tv), 3840x2160, 15 fps, 20 tbr, 1k tbn
  Stream #0:1: Audio: aac (LC), 16000 Hz, mono, fltp, start 0.011000

In go2rtc (I now even took Frigate out of the equation, I'm running just the go2rtc docker container), when I "add temporary stream" with the HTTP-FLV url, and then click on "stream". I get a stream that's only blackscreen with audio. (Audio is extremely delayed and laggy).
Under info for the stream while playing it, I get:

{
  "producers": [
    {
      "id": 24,
      "format_name": "flv",
      "protocol": "http",
      "remote_addr": "ip",
      "url": "http://ip/flv?port=1935\u0026app=bcs\u0026stream=channel0_main.bcs\u0026user=user\u0026password=password",
      "medias": [
        "audio, recvonly, MPEG4-GENERIC/16000/1"
      ],
      "receivers": [
        {
          "id": 25,
          "codec": {
            "channels": 1,
            "codec_name": "aac",
            "codec_type": "audio",
            "sample_rate": 16000
          },
          "childs": [
            26
          ],
          "bytes": 35363,
          "packets": 142
        }
      ],
      "bytes_recv": 5078361
    }
  ],
  "consumers": [
    {
      "id": 23,
      "format_name": "mse/fmp4",
      "protocol": "ws",
      "remote_addr": "172.17.0.1:59196",
      "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36",
      "medias": [
        "video, sendonly, H264, H265",
        "audio, sendonly, MPEG4-GENERIC, PCMA, PCMU, L16, PCML, OPUS"
      ],
      "senders": [
        {
          "id": 26,
          "codec": {
            "channels": 1,
            "codec_name": "aac",
            "codec_type": "audio",
            "sample_rate": 16000
          },
          "parent": 25,
          "bytes": 35363,
          "packets": 142
        }
      ],
      "bytes_send": 50699
    }
  ]
}

I would really appreciate some advice into what is going on here and how I can fix it.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions