Skip to content

Fix #3767: RTMP: Do not response empty data packet. v6.0.153 v7.0.12#4162

Merged
winlinvip merged 3 commits intoossrs:developfrom
winlinvip:bugfix/ffmpeg-data-none
Aug 31, 2024
Merged

Fix #3767: RTMP: Do not response empty data packet. v6.0.153 v7.0.12#4162
winlinvip merged 3 commits intoossrs:developfrom
winlinvip:bugfix/ffmpeg-data-none

Conversation

@winlinvip
Copy link
Copy Markdown
Member

@winlinvip winlinvip commented Aug 30, 2024

If SRS responds with this empty data packet, FFmpeg will receive an empty stream, like Stream #0:0: Data: none in following logs:

ffmpeg -i rtmp://localhost:11935/live/livestream
#  Stream #0:0: Data: none
#  Stream #0:1: Audio: aac (LC), 44100 Hz, stereo, fltp, 30 kb/s
#  Stream #0:2: Video: h264 (High), yuv420p(progressive), 768x320 [SAR 1:1 DAR 12:5], 212 kb/s, 25 fps, 25 tbr, 1k tbn

This won't cause the player to fail, but it will inconvenience the user significantly. It may also cause FFmpeg slower to analysis the stream, see #3767


Co-authored-by: Jacob Su suzp1984@gmail.com

@winlinvip winlinvip added the EnglishNative This issue is conveyed exclusively in English. label Aug 30, 2024
@winlinvip winlinvip changed the title RTMP: Do not response empty data packet. Fix #3767: RTMP: Do not response empty data packet. Aug 30, 2024
Copy link
Copy Markdown
Contributor

@suzp1984 suzp1984 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems good.

@winlinvip winlinvip changed the title Fix #3767: RTMP: Do not response empty data packet. Fix #3767: RTMP: Do not response empty data packet. v6.0.153 v7.0.12 Aug 31, 2024
@winlinvip winlinvip added the RefinedByAI Refined by AI/GPT. label Aug 31, 2024
@winlinvip winlinvip merged commit a7aa2ea into ossrs:develop Aug 31, 2024
winlinvip added a commit that referenced this pull request Aug 31, 2024
If SRS responds with this empty data packet, FFmpeg will receive an
empty stream, like `Stream #0:0: Data: none` in following logs:

```bash
ffmpeg -i rtmp://localhost:11935/live/livestream
```

This won't cause the player to fail, but it will inconvenience the user
significantly. It may also cause FFmpeg slower to analysis the stream,
see #3767

---------

Co-authored-by: Jacob Su <suzp1984@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

EnglishNative This issue is conveyed exclusively in English. RefinedByAI Refined by AI/GPT.

Development

Successfully merging this pull request may close these issues.

2 participants