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

HTTP-FLV: The CPU usage is very high, greater than 25% #3963

Open
winlinvip opened this issue Feb 26, 2024 · 1 comment
Open

HTTP-FLV: The CPU usage is very high, greater than 25% #3963

winlinvip opened this issue Feb 26, 2024 · 1 comment
Assignees
Labels
TransByAI Translated by AI/GPT.

Comments

@winlinvip
Copy link
Member

winlinvip commented Feb 26, 2024

Describe the bug
When streaming to SRS using RTMP and playing back with HTTP-FLV, the CPU utilization is very high, exceeding 25%.

Version
6.0.113

To Reproduce
Steps to reproduce the behavior:

  1. Run SRS with:
env SRS_LISTEN=1935 \
  SRS_DAEMON=off \
  SRS_VHOST_MIN_LATENCY=on \
  SRS_VHOST_PLAY_MW_LATENCY=0 \
  SRS_HTTP_SERVER_ENABLED=on \
  SRS_VHOST_HTTP_REMUX_ENABLED=on \
  SRS_VHOST_HTTP_REMUX_MOUNT=[vhost]/[app]/[stream].flv \
  ./objs/srs -e
  1. Publish by RTMP: ffmpeg -re -i doc/source.flv -c copy -f flv rtmp://localhost/live/livestream
  2. Play by HTTP-FLV: curl http://localhost:8080/live/livestream.flv -o /dev/null
  3. The CPU will greater than 25%.

Expected behavior
Without transcoding, the CPU should less than 1%.

Screenshots
image

Additional context
No such problem if publishing and playing by RTMP, or set SRS_VHOST_PLAY_MW_LATENCY=350

TRANS_BY_GPT4

@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Feb 26, 2024
@winlinvip winlinvip self-assigned this Feb 26, 2024
@winlinvip
Copy link
Member Author

winlinvip commented Feb 26, 2024

Workaround: If not using WebRTC, set SRS_VHOST_PLAY_MW_LATENCY=100 or higher. Or simply keep the default value, not set this config item.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TransByAI Translated by AI/GPT.
Projects
None yet
Development

No branches or pull requests

1 participant