I'm trying to read an udp streaming of a H264 encoded image. The software structure is like follows:
On a BeagleBoneBlack (Ubuntu 16.04) I've an Elp H264 cam (see here: https://www.amazon.com/ELP-Support-Android-Windows-Surveillance/dp/B00VDSBH9G ). I stream frames with ffmpeg on a Unicast UDP Stream.
I want to read this images from python and opencv to be able to process them.
I tried with this simple code to see if the cap is opened or not:
import cv2
try: cap = cv2.VideoCapture("udp://localhost:1234/") cap.set(CV_CAP_PROP_FOURCC, CV_FOURCC('H', '2', '6', '4')); except Exception, e: print str(e)
But when I run this script python says:
DtsGetHWFeatures: Create File Failed DtsGetHWFeatures: Create File Failed Running DIL (3.22.0) Version DtsDeviceOpen: Opening HW in mode 0 DtsDeviceOpen: Create File Failed libva info: VA-API version 0.38.1 libva info: va_getDriverName() returns -1 libva error: va_getDriverName() failed with unknown libva error,driver_name=(null) libva info: VA-API version 0.38.1 libva info: va_getDriverName() returns -1 libva error: va_getDriverName() failed with unknown libva error,driver_name=(null) libva info: VA-API version 0.38.1 libva info: va_getDriverName() returns -1 libva error: va_getDriverName() failed with unknown libva error,driver_name=(null) libva info: VA-API version 0.38.1 libva info: va_getDriverName() returns -1 libva error: va_getDriverName() failed with unknown libva error,driver_name=(null) GStreamer Plugin: Embedded video playback halted; module vaapidecode reported: Could not initialize supporting library. OpenCV Error: Unspecified error (GStreamer: unable to start pipeline ) in cvCaptureFromCAM_GStreamer, file /builddir/build/BUILD/opencv-
2.4.12.3/modules/highgui/src/cap_gstreamer.cpp, line 816 /builddir/build/BUILD/opencv-2.4.12.3/modules/highgui/src/cap_gstreamer.cpp:816: error: (-2) GStreamer: unable to start pipeline in function cvCaptureFromCAM_GStreamer
Can anybody help me?
Thanks,
Francesco.
Solved:
I solved this problem updating ffmpeg.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.