Use docker for RTSP publishing #297
Unanswered
wangsuhua1504
asked this question in
Questions
Replies: 1 comment
-
Hello, the reason is that ffmpeg is not bundled in the Docker image - you have to build one yourself with ffmpeg by following instructions here |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Which version are you using?
v0.15.1
Question
use this command to run a container:
docker run --rm -it --name rtsp_server --mount type=bind,source=/root/videos/rtsp_stream/test_video,target=/data --network=host -v /root/videos/rtsp-simple-server.yml:/rtsp-simple-server.yml aler9/rtsp-simple-server
/root/videos/rtsp_stream/test_video is the path of video
runOnDemand in rtsp-simple-server.yaml like this:
./ffmpeg -re -stream_loop -1 -i /data/6.flv -c copy -f rtsp rtsp://localhost:8554/test1
or like this
/data/ffmpeg -re -stream_loop -1 -i /data/6.flv -c copy -f rtsp rtsp://localhost:8554/test1 (because ffmpeg is in /root/videos/rtsp_stream/test_video)
or like this
/data/ffmpeg -re -stream_loop -1 -i /data/6.flv -c copy -f rtsp rtsp://localhost:8554/test1/
but no matter what way,when play it use vlc by rtsp://ip:8554/test1 ,it will occur error like this
2021/03/24 12:25:23 [I] [0/0/0] rtsp-simple-server v0.15.1
2021/03/24 12:25:23 [I] [0/0/0] [RTSP/UDP/RTP listener] opened on :8000
2021/03/24 12:25:23 [I] [0/0/0] [RTSP/UDP/RTCP listener] opened on :8001
2021/03/24 12:25:23 [I] [0/0/0] [RTSP/TCP listener] opened on :8554
2021/03/24 12:25:23 [I] [0/0/0] [RTMP listener] opened on :1935
2021/03/24 12:25:29 [I] [1/0/0] [client 10.8.96.44:56087] connected (RTSP/TCP)
2021/03/24 12:25:29 [I] [1/0/0] [path test1] on demand command started
2021/03/24 12:25:34 [I] [2/0/0] [client 10.8.96.44:56112] connected (RTSP/TCP)
2021/03/24 12:25:34 [I] [2/0/0] [client 10.8.96.44:56112] ERR: path must end with a slash (test1)
2021/03/24 12:25:34 [I] [1/0/0] [client 10.8.96.44:56112] disconnected
2021/03/24 12:25:34 [I] [2/0/0] [client 10.8.96.44:56113] connected (RTSP/TCP)
2021/03/24 12:25:34 [I] [1/0/0] [client 10.8.96.44:56113] disconnected
2021/03/24 12:25:39 [I] [1/0/0] [client 10.8.96.44:56087] ERR: publisher of path 'test1' has timed out
2021/03/24 12:25:39 [I] [0/0/0] [client 10.8.96.44:56087] disconnected
2021/03/24 12:25:49 [I] [0/0/0] [path test1] on demand command stopped
I don't know the reason,and I don't know the right way.look forward your reply.Thank you so much
Beta Was this translation helpful? Give feedback.
All reactions