Scenes
Nginx builds RTMP server + FFmpeg to realize Hikvision camera preview:
Nginx builds RTMP server + FFmpeg to realize Hikvision camera preview
What is recorded above is to use FFmpeg to pull the rtsp stream of the Hikvision protocol camera and push it to the streaming media server.
If in other business scenarios, local video files are required to simulate Haikang's rtsp streaming protocol format for streaming.
Note:
Blog:
Domineering Rogue Temperament_C#, Architecture Road, SpringBoot-CSDN Blog
accomplish
1. Refer to the following to build FFmpeg
Build Nginx RTMP server on Windows and use FFmpeg to push local video:
Then create a new bat file in the directory of ffmpeg.exe.
2. Modify the bat content to
ffmpeg.exe -re -stream_loop -1 -i D:\test\22.mp4 -c copy -rtsp_transport tcp -f rtsp rtsp://username:password@RTSP流媒体服务器ip:1554/h264/ch01/main/av_stream
pause
Pay attention to the local video path here and the configured username username and password password of the rtsp streaming server ip and port 1554 according to your own
The actual situation is modified. The construction of the rtsp streaming media server is omitted here.
3. Run bat
4. Use VLC and other pull current tests