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

ffmpeg transcode will result in endless ffmpeg process #4055

Open
suzp1984 opened this issue May 10, 2024 · 0 comments
Open

ffmpeg transcode will result in endless ffmpeg process #4055

suzp1984 opened this issue May 10, 2024 · 0 comments
Labels
EnglishNative This issue is conveyed exclusively in English.

Comments

@suzp1984
Copy link
Contributor

Describe the bug

Do transcode according to guide: https://ossrs.net/lts/zh-cn/docs/v4/doc/sample-ffmpeg.

If I start a ffmpeg transcode srs process and set the output to same srs process. It will result in endless ffmpeg process being triggered until the system's memory or cpu power exhausted.

Version
SRS 6 or maybe any SRS version support transcode

To Reproduce
Steps to reproduce the behavior:

  1. start srs process: ./objs/srs -c conf/ffmpeg.transcode.conf
  2. publish a rtmp stream: ffmpeg -re -stream_loop -1 -i test.mp4 -vcodec h264 -profile:v baseline -acodec copy -f flv rtmp://localhost/live/livestream
  3. wait and monitor the ffmpeg processes, or check the srs log.
  4. the ffmpeg processes will be started to do transcode and republish the transcoded stream to same srs process, which will trigger another ffmpeg process to do another transcode, dead endless loops.
    e.g. live/livestream_ff will trigger live/livestream_ff_ff;
    live/livestream_ff_ff will trigger live/livestream_ff_ff_ff;
    ... endless;

Expected behavior
the tutorial https://ossrs.net/lts/zh-cn/docs/v4/doc/sample-ffmpeg update, maybe remind the user don't sent the output to same srs process.

Or

refactor the transcode feature, let it only accept certain streams [app]/[stream].

@winlinvip winlinvip added the EnglishNative This issue is conveyed exclusively in English. label May 10, 2024
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.
Projects
None yet
Development

No branches or pull requests

2 participants