VideoWriter failure: "Gstreamer Opencv backend does not support this codec actually"

asked 2013-12-05 13:16:57 -0600

talcat gravatar image

Hello everyone!

I am running OpenCV 2.4.7, compiled on 64 bit Ubuntu 12.04.

I can read video files just fine (cv2.VideoCapture).

However, using any codec with cv2.VideoWriter yields the following error:

error: /home/-----/opencv-2.4.7/modules/highgui/src/cap_gstreamer.cpp:505: error: (-210) Gstreamer Opencv backend doesn't support this codec acutally. in function CvVideoWriter_GStreamer::open

Does anyone know what could be causing the problem? Is it a gstreamer version error or something?

Below is the output of cmake for this opencv install:

-- Detected version of GNU GCC: 46 (406)
-- Could NOT find Jasper (missing:  JASPER_LIBRARY JASPER_INCLUDE_DIR) 
-- checking for module 'libdc1394-2'
--   package 'libdc1394-2' not found
-- checking for module 'libdc1394'
--   package 'libdc1394' not found
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for sys/videoio.h
-- Looking for sys/videoio.h - not found
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - found 
-- Looking for ffmpeg/avformat.h
-- Looking for ffmpeg/avformat.h - not found
-- 
-- General configuration for OpenCV 2.4.7 =====================================
--   Version control:               unknown
-- 
--   Platform:
--     Host:                        Linux 3.2.0-54-generic x86_64
--     CMake:                       2.8.7
--     CMake generator:             Unix Makefiles
--     CMake build tool:            /usr/bin/make
--     Configuration:               Release
-- 
--   C/C++:
--     Built as dynamic libs?:      YES
--     C++ Compiler:                /usr/bin/c++  (ver 4.6)
--     C++ flags (Release):         -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations  -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG  -DNDEBUG
--     C++ flags (Debug):           -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g  -O0 -DDEBUG -D_DEBUG -ggdb3
--     C Compiler:                  /usr/bin/gcc
--     C flags (Release):           -fsigned-char -W -Wall -Werror=return-type  -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -fsigned-char -W -Wall -Werror=return-type  -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g  -O0 -DDEBUG -D_DEBUG -ggdb3
--     Linker flags (Release):      
--     Linker flags (Debug):        
--     Precompiled headers:         YES
-- 
--   OpenCV modules:
--     To be built:                 core flann imgproc highgui features2d calib3d ml video legacy objdetect photo gpu ocl nonfree contrib python stitching superres ts videostab
--     Disabled:                    world
--     Disabled by dependency:      -
--     Unavailable:                 androidcamera java
-- 
--   GUI: 
--     QT:                          NO
--     GTK+ 2.x:                    YES (ver 2.24.10)
--     GThread :                    YES (ver 2.32.3)
--     GtkGlExt:                    NO
--     OpenGL support:              NO
-- 
--   Media I/O: 
--     ZLib:                        /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.3.4)
--     JPEG:                        /usr/lib/x86_64-linux-gnu/libjpeg.so (ver )
--     PNG:                         /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.2.46)
--     TIFF:                        /usr/lib/x86_64-linux-gnu/libtiff.so (ver 42 - 3.9.5)
--     JPEG 2000:                   build (ver 1.900.1)
--     OpenEXR:                     build (ver 1.7.1)
- 
--   Video I/O:
--     DC1394 1.x:                  NO
--     DC1394 2.x:                  NO 
--     FFMPEG:                      YES
--       codec:                     YES (ver 54 ...
(more)
edit retag flag offensive close merge delete

Comments

Wow (bump), this question has sooo many hits yet no one has come up with an answer. I'm having this same error trying to write a video to a file in fedora 20. I'm going to switch to Ubuntu as soon as that system is up - but do not expect it to work there either. Does anyone have ideas that we could try to fix this problem?

st5000 gravatar imagest5000 ( 2014-10-20 21:31:54 -0600 )edit