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:
- start srs process:
./objs/srs -c conf/ffmpeg.transcode.conf
- 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
- wait and monitor the
ffmpeg processes, or check the srs log.
- 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].
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
transcodeTo Reproduce
Steps to reproduce the behavior:
./objs/srs -c conf/ffmpeg.transcode.confffmpeg -re -stream_loop -1 -i test.mp4 -vcodec h264 -profile:v baseline -acodec copy -f flv rtmp://localhost/live/livestreamffmpegprocesses, or check the srs log.ffmpegprocesses will be started to do transcode and republish the transcoded stream to same srs process, which will trigger anotherffmpegprocess to do another transcode, dead endless loops.e.g.
live/livestream_ffwill triggerlive/livestream_ff_ff;live/livestream_ff_ffwill triggerlive/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
transcodefeature, let it only accept certain streams[app]/[stream].