Ask Your Question
0

python-opencv h 265 codec

asked 2017-12-22 13:01:04 -0600

python_user gravatar image

updated 2017-12-22 13:08:16 -0600

berak gravatar image

Hello everyone. I am using python-opencv 3.3.1 and i want to read the stream h.265 via rtsp using ip camera. But it gives an error while reading frames. When i stream my video by h.264 codec it works normally. Could you help me to solve this problem? Thanks

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2017-12-23 10:18:06 -0600

supra56 gravatar image

updated 2017-12-23 12:21:26 -0600

Very sorry. The codec string with *'H265', nothing gets written This will work with GStreamer:

sudo apt-get install gstreamer0.10-libde265

Also a VLC will work too:

sudo apt-get install vlc-plugin-libde265

Warning: H265/HEVC only for playback only

edit flag offensive delete link more

Comments

my rtsp addres is look like this: rtsp://xxx.xxx.xxx.xx:ppp/user=USER_password=PASSWORD=1_stream=0.sdp?real_stream so if i add to this .h.265 Will it work? i think, no

python_user gravatar imagepython_user ( 2017-12-23 11:21:28 -0600 )edit

H265 is the same as HVEC

python_user gravatar imagepython_user ( 2017-12-23 11:22:35 -0600 )edit

@python_user. It is IP CAMERA or usb webcam?

supra56 gravatar imagesupra56 ( 2017-12-23 12:09:17 -0600 )edit

can you give me rtsp pipline code for gstreamer

devdev gravatar imagedevdev ( 2017-12-24 04:32:07 -0600 )edit
supra56 gravatar imagesupra56 ( 2017-12-24 13:37:28 -0600 )edit

Thank you for your answer, i've already seen this article and i am getting such error message:

Called with args: Namespace(image_height=1080, image_width=1920, rtsp_latency=200, rtsp_uri='rtsp://192.168.168.20/net0', use_rtsp=True, use_usb=False, video_dev=1) OpenCV version: 3.3.0 OpenCV Error: Unspecified error (GStreamer: unable to start pipeline ) in cvCaptureFromCAM_GStreamer, file /home/programmer/opencv/modules/videoio/src/cap_gstreamer.cpp, line 881 VIDEOIO(cvCreateCapture_GStreamer (CV_CAP_GSTREAMER_FILE, filename)): raised OpenCV exception:

/home/programmer/opencv/modules/videoio/src/cap_gstreamer.cpp:881: error: (-2) GStreamer: unable to start pipeline in function cvCaptureFromCAM_GStreamer

Failed to open camera!

python_user gravatar imagepython_user ( 2017-12-25 08:57:17 -0600 )edit
0

answered 2017-12-23 09:12:15 -0600

devdev gravatar image

When i stream my video in h.264 codec it works. But when i stream video in h.265 codec it does not work.

edit flag offensive delete link more

Comments

@devdev . It will not work.

supra56 gravatar imagesupra56 ( 2017-12-23 10:20:20 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-12-22 13:01:04 -0600

Seen: 9,139 times

Last updated: Dec 23 '17