Skip to content

Conversation

suzp1984
Copy link
Contributor

@suzp1984 suzp1984 commented Aug 20, 2025

try to fix #4428.

Cause

rtmp do not support hevc, rtmp enhanced do.

How to reproduce

  1. start srs.
    ./objs/srs -c conf/srt.conf
  2. publish hevc (h.265) stream to srs by srt.
    ffmpeg -re -i ./doc/source.flv -c:v libx265 -crf 28 -preset medium -c:a copy -pes_payload_size 0 -f mpegts 'srt://127.0.0.1:10080?streamid=#!::r=live/livestream,m=publish'
  3. probe the rtmp stream
    ffprobe rtmp://localhost/live/livestream

About the Failed BlackBox test

The failed blackbox test: TestSlow_SrtPublish_RtmpPlay_HEVC_Basic TestSlow_SrtPublish_HttpFlvPlay_HEVC_Basic

Cause:

The ffmpeg 5 is used to record a piece of video (DRV), the ffmpeg will transcode the enhanced flv format to TS format, but ffmpeg 5 don't support enhanced rtmp (or flv) in this case.

The solution is to replace the ffmpeg to version 7 in those 2 test cases.

why not upgrade ffmpeg to version 7?

The black tests dependency on ffmpeg 5 will fail, and there are a few of them are not easy to resolve in ffmpeg 7.

@suzp1984 suzp1984 force-pushed the bugfix/srt-bridge-hevc-to-rtmp branch from 7eb3f7c to 6a710fa Compare August 20, 2025 15:42
@suzp1984 suzp1984 marked this pull request as draft August 20, 2025 16:29
@suzp1984 suzp1984 force-pushed the bugfix/srt-bridge-hevc-to-rtmp branch 26 times, most recently from 85334fa to 252510e Compare August 23, 2025 02:51
@suzp1984 suzp1984 marked this pull request as ready for review August 23, 2025 10:28
@suzp1984 suzp1984 force-pushed the bugfix/srt-bridge-hevc-to-rtmp branch from 60dc9d0 to 64d692b Compare August 23, 2025 11:32
@winlinvip
Copy link
Member

Feel free to upgrade dev-docker to FFmpeg 7 and Ubuntu 22/24.

@suzp1984 suzp1984 force-pushed the bugfix/srt-bridge-hevc-to-rtmp branch from 64d692b to a21741c Compare August 23, 2025 13:57
@winlinvip winlinvip marked this pull request as draft September 4, 2025 12:09
@suzp1984 suzp1984 force-pushed the bugfix/srt-bridge-hevc-to-rtmp branch from a21741c to 08b3116 Compare September 6, 2025 13:32
@suzp1984 suzp1984 reopened this Sep 7, 2025
@suzp1984 suzp1984 force-pushed the bugfix/srt-bridge-hevc-to-rtmp branch 9 times, most recently from f64f0a1 to 765af57 Compare September 7, 2025 13:50
@suzp1984 suzp1984 marked this pull request as ready for review September 7, 2025 14:03
try to fix ossrs#4428.
Cause: rtmp do not support hevc, rtmp enhanced do.
@suzp1984 suzp1984 force-pushed the bugfix/srt-bridge-hevc-to-rtmp branch from 765af57 to 05d8955 Compare September 9, 2025 13:00
Root Cause: the ffmpeg 5, inside the docker image srs:ubuntu20-cache, do
not support enhanced rtmp.
@suzp1984 suzp1984 force-pushed the bugfix/srt-bridge-hevc-to-rtmp branch from 05d8955 to 1b67cf2 Compare September 9, 2025 13:10
@winlinvip winlinvip changed the title fix srt bridge hevc to rtmp error. SRT2RTMP: fix srt bridge hevc to rtmp error. Sep 10, 2025
@winlinvip winlinvip changed the title SRT2RTMP: fix srt bridge hevc to rtmp error. SRT2RTMP: fix srt bridge hevc to rtmp error. v7.0.84 Sep 10, 2025
@winlinvip winlinvip added the RefinedByAI Refined by AI/GPT. label Sep 10, 2025
@winlinvip winlinvip merged commit a6d14eb into ossrs:develop Sep 10, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RefinedByAI Refined by AI/GPT.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problems when converting H265 data from srt to rtmp
2 participants