ros-drivers / video_stream_opencv

A package to open video streams and publish them in ROS using the opencv videocapture mechanism
224 stars 159 forks source link

Strange errors consuming RTSP h264 stream #98

Open ghost opened 3 years ago

ghost commented 3 years ago

The following error logs I get while consuming h264 RTSP stream from a visual engineering HD Rugged IP camera with the latest firmware installed. I did not run with ros DEBUG on because the debug messages that print the frame count would truncate my terminals history if left running for long enough (these errors are intermittent). The camera stays connected and I still had video feedback fortunately, though possibly the stream was interrupted briefly.

Any thoughts on what could be causing them? Or is it likely an issue with the camera and not this repo? The camera is just on my desk - no motion or environmental factors:

roslaunch video_stream_opencv camera.launch video_stream_provider:=rtsp://192.168.1.1:554/h264

[h264 @ 0x7f6fdc031380] Invalid level prefix [h264 @ 0x7f6fdc031380] error while decoding MB 39 22 [h264 @ 0x7f6fdc031380] top block unavailable for requested intra mode -1 [h264 @ 0x7f6fdc031380] error while decoding MB 0 0 [h264 @ 0x7f6fdc031380] Frame num change from 0 to 215 [h264 @ 0x7f6fdc031380] decode_slice_header error Invalid UE golomb code [h264 @ 0x7f6fdc1d4240] mb_type -1094995529 in I slice too large at 0 0 [h264 @ 0x7f6fdc1d4240] error while decoding MB 0 0 [h264 @ 0x7f6fdc1f0580] slice type 32 too large at 0 [h264 @ 0x7f6fdc1f0580] decode_slice_header error [h264 @ 0x7f6fdc1f0580] no frame! [h264 @ 0x7f6fdc2b4ec0] corrupted macroblock 39 22 (total_coeff=-1) [h264 @ 0x7f6fdc2b4ec0] error while decoding MB 39 22 [h264 @ 0x7f6fdc1f0580] corrupted macroblock 39 22 (total_coeff=-1) [h264 @ 0x7f6fdc1f0580] error while decoding MB 39 22 [h264 @ 0x7f6fdc2b4ec0] corrupted macroblock 31 16 (total_coeff=-1) [h264 @ 0x7f6fdc2b4ec0] error while decoding MB 31 16 [NULL @ 0x7f6fdc019580] reference count 1 overflow [h264 @ 0x7f6fdc279c20] reference count overflow [h264 @ 0x7f6fdc279c20] decode_slice_header error [h264 @ 0x7f6fdc279c20] no frame! [h264 @ 0x7f6fdc279c20] out of range intra chroma pred mode [h264 @ 0x7f6fdc279c20] error while decoding MB 38 22

awesomebytes commented 3 years ago

Hello @zoombinis . Unfortunately this package is just a wrapper of the OpenCV API, which itself, wraps a few backends (uses whichever you have available) to offer its functionality.

If I google one of those errors I get results like:

You could also try to use the ROS package gscam instead of this one. Good luck!