Use FFmpeg on Windows to realize local video push and simulate Haikang protocol rtsp video stream

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:

Build Nginx RTMP server on Windows and use FFmpeg to achieve local video streaming - Programmer Sought

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

Guess you like

Origin blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/132317435