ZLMediaKit pulls the camera (Hikvision protocol) and encodes it to H265 and uses flv.js to play: FLV: Unsupported codec in video frame: 12

Scenes

The open source streaming media server ZLMediaKit runs on Windows, configures it, pulls the stream on demand (pulls the camera rtsp video stream) and uses the http-flv web page to play:

The open source streaming media server ZLMediaKit runs on Windows, configures it, and pulls the camera rtsp video stream on demand) and uses the http-flv web page to play_srs pull stream on demand_Overbearing rogue temperament blog-CSDN blog

Follow the above process to pull the rtsp stream of the camera and transfer it to play when playing with flv.js:

DemuxException: type - CodeUnsupported,info - Flv: Unsupported codec in video fram:12

Note:

Blog:
https://blog.csdn.net/badao_liumang_qizhi 

accomplish

1. Here is the rtsp stream of the Hikvision camera.

Hikvision rtsp stream format is:

rtsp://admin:123456@ip:554/h264/ch1/main/av_stream

Here admin is the account, 123456 is the password, modify the IP and port, here pull the mainstream of the h264 encoding format.

At the beginning, it is not considered that the camera encoding is H265, which leads to problems.

But here use

rtsp://admin:123456@ip:554/h264/ch1/main/av_stream

as well as

rtsp://admin:123456@ip:554/h265/ch1/main/av_stream

Can use software such as vlc to play.

But when playing with flv.js, the prompt is as above.

2. After carefully checking the process and interface of ZLMEediaKit, it is found that the streaming interface returns to normal

However, when using the address of the corresponding flv to play, it fails, and it prompts in vlc:

 

VLC cannot identify this audio or video codec

3. In order to solve this problem, first use ffmpeg to simulate an rtsp stream of Haikang protocol

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

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

Then use the simulated rtsp stream address

Execute the above process and find that it can play normally.

So it is most likely a problem with the camera itself.

Check the description of the official flv.js and find that its characteristics are:

FLV container with H.264 + AAC / MP3 codec playback
Multipart segmented video playback
HTTP FLV low latency live stream playback
FLV over WebSocket live stream playback
Compatible with Chrome, FireFox, Safari 10, IE11 and Edge
Extremely low overhead, and hardware accelerated by your browser!

 4. Then log in to the Hikvision camera to check its encoding format

Configuration-Video-Audio-Video-Video Encoding, it really is H265

After modifying it to H264, the playback is normal

Guess you like

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