Skip to content

H265 regression in 2.7.4: RTSP fails with Video info is null or streams audio-only (black video) #2109

@pengxiao18

Description

@pengxiao18

Summary
After upgrading RootEncoder from 2.7.2 to 2.7.4, H265 over RTSP is broken.

In RTSP-Server demo app: switching to H265 can fail immediately with:
Failed: Video info is null
In production app: RTSP connects and sends packets, audio works, but video stays black.
RTMP with H265 is OK in the same environment.
This looks like a regression introduced in 2.7.4 in the H265 RTSP pipeline.

Versions
Works: 2.7.2
Fails: 2.7.4
Module: RootEncoder (library), RTSP path
Codec: H265/HEVC
Transport: RTSP (UDP in our tests)
Reproduction Steps
Use RootEncoder 2.7.4.
Start RTSP stream with H265 enabled.
Connect with VLC (or another RTSP client).
Observe:
Sometimes stream start fails with Video info is null (demo case), OR
Stream starts, audio plays, but video is black.
Expected Behavior
RTSP H265 should start and decode normally (same as 2.7.2).

Actual Behavior
Video info is null on start (in RtspServer demo), or
Audio-only RTSP stream (video black), despite ongoing video packet send logs.
Logs / Evidence
Demo H265 start error: Failed: Video info is null
In affected app:
RTSP handshake succeeds (DESCRIBE/SETUP/PLAY 200 OK)
RtspSender wrote Video packet ... continues
Client still shows black video
RTMP path remains functional, suggesting issue is RTSP/H265-specific.
Suspected Regression Area
Potentially related to H265 packetization/NAL handling changes in 2.7.4, especially:

common/nal/NalReader.kt (new)
rtsp/.../rtp/packets/H265Packet.kt (rewritten)
New multi-NAL extraction/fragmentation flow
Could be a compatibility issue with certain encoder output formats (Annex-B/multi-NAL access units), causing invalid RTP H265 payload or missing valid startup video info timing.

Additional Note
This reproduces not only in a custom integration, but also in demo behavior when switching to H265 (error: Video info is null), so it appears to be upstream/regression-level rather than app-only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions