FS#59290 - [opencv] 3.4.2 fails to work with gstreamer
Attached to Project:
Arch Linux
Opened by Juan Manuel (the_phet) - Tuesday, 10 July 2018, 10:04 GMT
Last edited by Antonio Rojas (arojas) - Wednesday, 11 July 2018, 17:37 GMT
Opened by Juan Manuel (the_phet) - Tuesday, 10 July 2018, 10:04 GMT
Last edited by Antonio Rojas (arojas) - Wednesday, 11 July 2018, 17:37 GMT
|
Details
Description: When trying to read or create a video using
python opencv, it fails with the following error:
python:15977): GStreamer-CRITICAL **: 18:19:37.484: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed Unable to stop the stream: Inappropriate ioctl for device Running with export OPENCV_VIDEOIO_DEBUG=TRUE [juanma@juanmahostname img_proc]$ export OPENCV_VIDEOIO_DEBUG=TRUE [juanma@juanmahostname img_proc]$ python test_svm.py pat00100_2_fast15.avi [ WARN:0] VIDEOIO(createGStreamerCapture(filename)): trying ... (python:11745): GStreamer-CRITICAL **: 09:24:32.751: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed [ WARN:0] VIDEOIO(createGStreamerCapture(filename)): result=(nil) isOpened=-1 ... [ WARN:0] VIDEOIO(cvCreateCameraCapture_V4L(filename.c_str())): trying ... Unable to stop the stream: Inappropriate ioctl for device [ WARN:0] VIDEOIO(cvCreateCameraCapture_V4L(filename.c_str())): result=(nil) ... [ WARN:0] VIDEOIO(cvCreateFileCapture_Images(filename.c_str())): trying ... [ WARN:0] VIDEOIO(cvCreateFileCapture_Images(filename.c_str())): result=(nil) ... [ WARN:0] VIDEOIO(createMotionJpegCapture(filename)): trying ... [ WARN:0] VIDEOIO(createMotionJpegCapture(filename)): result=(nil) isOpened=-1 ... [ WARN:0] VIDEOIO(createGPhoto2Capture(filename)): trying ... [ WARN:0] VIDEOIO(createGPhoto2Capture(filename)): result=(nil) isOpened=-1 ... [ WARN:0] VIDEOIO(cvCreateVideoWriter_GStreamer (filename.c_str(), fourcc, fps, frameSize, isColor)): trying ... (python:11745): GStreamer-CRITICAL **: 09:24:32.792: gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)' failed [ WARN:0] VIDEOIO(cvCreateVideoWriter_GStreamer (filename.c_str(), fourcc, fps, frameSize, isColor)): result=0x564e3cfc57d0... Additional info: * package version: 3.4.2 (downgrading to 3.4.1 works fine) Steps to reproduce: Using opencv python3, just try to read or create a video and it will report the error above. |
This task depends upon
1 extra/clutter-gst 3.0.26-1 [installed]
GStreamer bindings for clutter
2 extra/gnome-video-effects 0.4.3+13+g6867955-1 (gnome) [installed]
Collection of GStreamer effects for GNOME
3 extra/gst-libav 1.14.1-1
GStreamer Multimedia Framework ffmpeg Plugin
4 extra/gst-plugins-bad 1.14.1-2 [installed]
GStreamer Multimedia Framework Bad Plugins
5 extra/gst-plugins-base 1.14.1-1 [installed]
GStreamer Multimedia Framework Base Plugins
6 extra/gst-plugins-base-libs 1.14.1-1 [installed]
GStreamer Multimedia Framework Base Libraries
7 extra/gst-plugins-good 1.14.1-1 [installed]
GStreamer Multimedia Framework Good Plugins
8 extra/gst-plugins-ugly 1.14.1-1
GStreamer Multimedia Framework Ugly Plugins
9 extra/gst-python 1.14.1-1
GStreamer Python 3 binding overrides
10 extra/gst-python2 1.14.1-1
GStreamer Python 2 binding overrides
11 extra/gstreamer 1.14.1-1 [installed]
GStreamer open-source multimedia framework core library
12 extra/gstreamer-vaapi 1.14.1-1
GStreamer Multimedia Framework VAAPI Plugin
13 extra/libcanberra-gstreamer 0.30+2+gc0620e4-1
GStreamer plugin for libcanberra
14 extra/phonon-qt4-gstreamer 4.9.0-4
Phonon GStreamer backend for Qt4
15 extra/phonon-qt5-gstreamer 4.9.0-4 [installed]
Phonon GStreamer backend for Qt5
16 extra/qt-gstreamer 1.2.0-1
Qt bindings for GStreamer
17 extra/totem 3.26.1-1 (gnome) [installed]
Movie player for the GNOME desktop based on GStreamer
18 community/gambas3-gb-media 3.11.3-1 (gambas3)
Simplified interface to the GStreamer library component
19 community/gst-editing-services 1.14.1-1
GStreamer library for creating audio/video editors
20 community/gst-plugins-espeak 0.5.0-1
Use espeak as a sound source for gstreamer
21 community/gst-transcoder 1.14.0-1
GStreamer Transcoding API library
22 community/gst-validate 1.14.1-1
Debugging tool for GStreamer
23 community/gstreamermm 1.10.0-1
C++ interface for GStreamer
24 community/gstreamermm-docs 1.10.0-1
C++ interface for GStreamer (documentation)
25 community/parole 1.0.1-1 (xfce4-goodies)
Modern media player based on the GStreamer framework
26 community/pitivi 0.99-4
Editor for audio/video projects using the GStreamer framework
27 community/transmageddon 1.5-3
Simple python application for transcoding video into formats supported by GStreamer
It returns:
(python:3391): GStreamer-CRITICAL **: 17:25:47.520: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed
Unable to stop the stream: Inappropriate ioctl for device
(python:18682): GStreamer-CRITICAL **: 15:04:32.641: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed
Unable to stop the stream: Inappropriate ioctl for device
Traceback (most recent call last):
File "test.py", line 12, in <module>
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
cv2.error: OpenCV(3.4.2) /build/opencv/src/opencv-3.4.2/modules/imgproc/src/color.hpp:253: error: (-215:Assertion failed) VScn::contains(scn) && VDcn::contains(dcn) && VDepth::contains(depth) in function 'CvtHelper'
The video I am trying to read (and works fine with 3.4.1 but not with 3.4.2) was created in blender, compressed using FFMPEG. VLC gives the following details about the video: Code is H264 - MPEG-4 AVC (part10) (h264). 800x600 resolution, framerate is 30.