Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix single aac file rtmp publish error. #3414

Merged
merged 2 commits into from
Jun 11, 2024

Conversation

suzp1984
Copy link
Contributor

@suzp1984 suzp1984 commented Jun 1, 2024

Which version are you using?

current main branch.

Which operating system are you using?

  • macOS amd64 standard

Describe the issue

when I publish an aac file by ffmpeg to mediamtx, I met an error.

2024/06/01 17:10:55 INF [RTMP] [conn [::1]:57689] closed: not enough bits

The root cause is the mediamtx want to parse an audio message with empty payload.

Describe how to replicate the issue

  1. start the server: ./mediamtx
  2. publish an aac file with ffmpeg: ffmpeg -stream_loop -1 -re -i music.aac -c copy -f flv -y rtmp://localhost/live/test
  3. check the mediamtx log: INF [RTMP] [conn [::1]:57689] closed: not enough bits
    and ffmpeg cmd exit with error.

Did you attach the server logs?

yes

MediaMTX logs
2024/06/01 17:10:53 INF MediaMTX v0.0.0
2024/06/01 17:10:53 INF configuration loaded from /Users/jacobsu/hack/media/mediamtx/mediamtx.yml
2024/06/01 17:10:53 INF [RTSP] listener opened on :8554 (TCP), :8000 (UDP/RTP), :8001 (UDP/RTCP)
2024/06/01 17:10:53 INF [RTMP] listener opened on :1935
2024/06/01 17:10:53 INF [HLS] listener opened on :8888
2024/06/01 17:10:53 INF [WebRTC] listener opened on :8889 (HTTP), :8189 (ICE/UDP)
2024/06/01 17:10:53 INF [SRT] listener opened on :8890 (UDP)
2024/06/01 17:10:55 INF [RTMP] [conn [::1]:57689] opened
2024/06/01 17:10:55 INF [RTMP] [conn [::1]:57689] closed: not enough bits

Did you attach a network dump?

no

@suzp1984 suzp1984 force-pushed the debug/single-aac-rtmp-publish-error branch 2 times, most recently from bfebd29 to 6cf560c Compare June 5, 2024 00:18
@suzp1984 suzp1984 force-pushed the debug/single-aac-rtmp-publish-error branch from 6cf560c to 6d3787b Compare June 5, 2024 11:44
Copy link

codecov bot commented Jun 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.24%. Comparing base (16d0bb7) to head (236209e).
Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3414      +/-   ##
==========================================
+ Coverage   55.68%   56.24%   +0.56%     
==========================================
  Files         191      190       -1     
  Lines       18897    19078     +181     
==========================================
+ Hits        10522    10731     +209     
+ Misses       7570     7523      -47     
- Partials      805      824      +19     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aler9 aler9 merged commit 3a2594d into bluenviron:main Jun 11, 2024
8 checks passed
@aler9
Copy link
Member

aler9 commented Jun 11, 2024

i added tests and merged, thanks!

Copy link
Contributor

This issue is mentioned in release v1.8.3 🚀
Check out the entire changelog by clicking here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants