Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GStreamer vs FFmpeg

I try to record a Video with the OpenCV Framework an would like to save that into an Matroska(mkv) Container together with some additional data streams.

First I thought using FFmpeg is the way that. But while looking into the OpenCV Sourcecode and searching in the web I found GStreamer.

Because the documentation in GStreamer is much better than the FFmpeg documentation I would prefer using this Framework.

In my understanding GStreamer is primarily used for Streaming, but could also rncode and mux video data.

Is there any disadvantage when using GStreamer instead of FFmpeg?

Thanks in advance Horst

like image 231
user1129474 Avatar asked Jan 04 '12 08:01

user1129474


People also ask

Does OpenCv use FFmpeg or GStreamer?

You can use an OpenCv VideoWriter using either ffmpeg or gstreamer backend and compare. For example (you may adapt to your platform plugins and video mode): # Using ffmpeg backend cv::VideoWriter ffmpeg_h264_writer ("test-ffmpeg-h264-writer.

What is FFmpeg GStreamer?

GStreamer FFmpeg plug-in contains one plugin with a set of elements using the FFmpeg library code. It contains most popular decoders as well as very fast colorspace conversion elements.

Why use GStreamer?

It allows you to put together arbitrary multimedia processing pipelines built from different components (we call them elements) that all do different tasks. GStreamer provides generic mechanisms to put together these pipelines, control them, synchronize data flow, etc.

Is FFmpeg faster than HandBrake?

Conversion Speed In theory, HandBrake and FFmpeg have about the same transcoding speed when using the same output settings. Yet, in reality, HandBrake would perform generally faster than FFmpeg, for Handbrake would always engage all cores for multithreading while FFmpeg usually uses a single main thread.


1 Answers

I try to record a Video with the OpenCV Framework an would like to save that into an Matroska(mkv)

I don't think OpenCV can store video as MKV,

together with some additional data streams.

OpenCV doesn't provide features for this operation.

An easy workaround is to simply call ffmpeg's or gstreamer's cmd-line application to do the conversion for you.

GStreamer has indeed a decent documentation and it can also do the job. The obvious disadvantage is that if you know how to work with FFmpeg, changing to GStreamer will require some extra time to understand how it works since both have completely different APIs: GStreamer architecture was inspired by DirectShow and Quicktime.

The advantage is that GStreamer (besides being cross-platform as well) is used on several big projects and getting to know GStreamer will certainly add a great skill to your programming arsenal.

like image 111
karlphillip Avatar answered Oct 06 '22 04:10

karlphillip