ossrs / srs

SRS is a simple, high-efficiency, real-time media server supporting RTMP, WebRTC, HLS, HTTP-FLV, HTTP-TS, SRT, MPEG-DASH, and GB28181.
https://ossrs.io
MIT License
25.69k stars 5.38k forks source link

When ingesting the streaming, there is an issue with the URL. The URL contains an "&" symbol, which causes a problem with the command format. How should this be written? #3512

Closed linkewei0580 closed 1 year ago

linkewei0580 commented 1 year ago

[2023-04-14 12:38:29.255][Trace][26799][6422233r] fored process, pid=26894, bin=ffmpeg, stdout=./objs/ffmpeg-ingest-defaultVhost-live-rtsp-1.log, stderr=./objs/ffmpeg-ingest-defaultVhost-live-rtsp-1.log, argv=ffmpeg -loglevel info -rtsp_transport tcp -i rtsp://admin:1370176lkW@192.168.1.109:554/cam/realmonitor?channel=1&subtype=0 -vcodec copy -acodec copy -f flv -y rtmp://192.168.1.121:1936/live/rtsp-1 [2023-04-14 12:38:29.255][Trace][26799][6422233r] process pid=26894 terminate, please restart it.

This URL, when enclosed in single or double quotation marks, will be removed when executed by Inges. The ampersand symbol (&) should be escaped with the backslash (\&). It can be directly used in the command. When changing it to \&, it should still be executed as \&. url rtsp://admin:1370176lkW@192.168.1.109:554/cam/realmonitor?channel=1&subtype=0; ingest rtsp-1 { enabled on; input { type stream; url rtsp://admin:1370176lkW@192.168.1.109:554/cam/realmonitor?channel=1&subtype=0; } ffmpeg ffmpeg; engine { enabled on; perfile { rtsp_transport tcp; } vcodec copy; acodec copy; output rtmp://192.168.1.121:1936/live/rtsp-1; } }

TRANS_BY_GPT3

linkewei0580 commented 1 year ago

The problem has been found, this command must be an absolute path. ffmpeg ffmpeg;

TRANS_BY_GPT3