Forums

installing codecs for video editing / saving

Hello everyone, I'm developing a video editing app which have a save functionality. The script for saving is pretty standard:


fourcc = cv2.cv.CV_FOURCC('MJPG')*

out = cv2.VideoWriter(outputVidName,fourcc, 24, (1280,720))


But whenever I execute, I got this error:


<class 'cv2.error'>(/root/OpenCV/opencv-2.4.9/modules/highgui/src/cap_gstreamer.cpp:518: error: (-210) Your version of Gstreamer doesn't support this codec acutally or needed plugin missing. in function CvVideoWriter_GStreamer::open )


I assume I'd need to install a video codec for this task, but I can't find the docs to do that. Anyone have any ideas how I should proceed? Thanks in advance for your help :)

I'm afraid we don't have anyone in the office that knows about that... Maybe one of our other users will speak up? Or perhaps stackoverflow might have some answers?

we do have "avconv" installed, which might be able to help you do some transcoding stuff if you can get cv2 to save anything at all...

Hello, Thanks for your response. From what I read, Opencv can only use the video codecs installed on the system. So is there a way to install video codecs to my hosting at PA? Alternatively, which codecs have you got installed on your system? Thanks.

I'm afraid I really don't know anything about that...

Do you have ffmpeg / gstreamer installed on your servers? If not is there a way we can have it installed? Thanks.

avconv is a fork of ffmpeg, and it should be able to do everything ffmpeg can do... more info

Thanks for the answer Harry, the thing is AFAIK opencv uses ffmpeg for its encoding processes, and I don't know how to make it use avconv instead.

ah. well you've reached the limits of my knowledge i'm afraid....