SRS deployment, use rtmp to push local video

1. Find an mp4 video on the Internet and download it locally
2. Start the virtual machine (the clone project has been completed in the virtual machine)

Refer to RTMP streaming, WebRTC streaming steps and problem solving

Switch directory:
cd srs/trunk
Start server:
./objs/srs -c conf/srs.conf

3. Open the command prompt
and enter the following command to push the stream

ffmpeg -re -i /Users/HTHT/Desktop/abc.mp4 -vcodec libx264 -acodec aac -f flv rtmp://10.1.4.111/live/home
(/Users/HTHT/Desktop/abc.mp4 is local mp4 storage path)

4. After the streaming is complete, open http://10.1.4.111:8080/players/rtc_player.html
to select the RTC player and click Play (10.1.4.111 is the IP address in the virtual machine)
    URL: webrtc://10.1. 4.111/live/home

Note: To use ffmpeg to stream in the command prompt, you must first start the srs server in the virtual machine
 

Guess you like

Origin blog.csdn.net/Jiang5106/article/details/128716195