Skip to content

Black frames when playing IP Cameras' RTSP streams

Summary

When playing an RTSP stream comming from an IP camera, black frames are "flashing" randomly with h264/h265. Using the trial unity package

Minimal project and steps to reproduce

Sample scene provided in the asset bundle

https://videolabs.io/solutions/vlc-unity-windows-trial.unitypackage

Set Uri to an IP Camera rtsp link

What is the current bug behavior?

There are black frames popping randomly while decoding h264 and h265. MJPEG works

What is the expected correct behavior?

No black frames

Does it work on other plaforms? Does it work with the official VLC apps?

Streams work in VLC app, with libVLC in a dotnet project and in Unity with another decoder

Relevant logs and/or screenshots

No libVLC logs seem to be in-sync with the black frames

Environment

  • OS: Windows 10
  • Version x64
  • Device: PC
  • LibVLC version and architecture: 4.0.0-dev-14970-g302d55967b
  • LibVLCSharp version: 4.0.0.0
  • VLC Unity plugin version: unknown, downloaded from above link
  • Scripting backend used: Mono/Unity

Possible fixes

unknown