I'm currently working on an embedded system doesn't support for gstlibogg,gstlibtheora, etc. So I need to have a software decoder which can be used with gstreamer pipeline . If i build Gstreamer again with these above mentioned .so files ,i'll lose the hardware specific gstreamer plugins.Can you suggest a software decoder which can be used with gstreamer..
Related
I want to encode images to H264 video in OpenCV.
As part of my software for image tracking, I'm using VideoWriter in OpenCV 3.4 (64-bit) with Visual Studio 2017 C++. I use ffmpeg for manual encoding, and as it comes with OpenCV I assume this is the best option. My version of OpenCV indicates it has been compiled with ffmpeg, and I can verify it loads the opencv_ffmpeg340_64.dll.
Decoding H264 (AVC1) is absolutely fine, including when specifically using the ffmpeg API. But encoding anything other than MJPG or raw images doesn't work:
VideoWriter.Open() mostly returns false, for some cases it only writes an empty or small header but won't write frames. I've tried not only the ffmpeg API, but also any available API. Redirecting console/debug output to intermediate window in VC doesn't give any messages from OpenCV or ffmpeg.
There are numerous posts on previous versions of OpenCV using FFmpeg, including (Cisco) OpenH264 library and difficulties using this. I've tried many options, installing codecs pack including H264, ffmpeg static version, Cisco openH264 library, setting paths etc and even tried the low level ffmpeg library functions such as cvCreateVideoWriter exposed in OpenCV, and using different video containers (AVI, MPG, MP4) as well as fourcc strings.
I can't believe in 2018 the great OpenCV with FFmpeg support is unable to encode anything but arcane MJPG or raw images. If it uses FFmpeg surely a significant set of functionality should be available?
Though I think this should work, my next best option would be using a separate ffmpeg library, which would ironically add another ffmpeg.dll to my solution I imagine. Any suggestion appreciated!
Code fragment (using any video encoding API):
VideoWriter writer;
int codec = VideoWriter::fourcc('X', '2', '6', '4');
writer.open("test.avi", codec, 30, colorImage.size(), true);
writer.write(colorImage);
writer.release();
To answer my own question - thank you for the previous suggestions though - I've managed to create and write frames to H264 video now, without any recompiling needed. This is what I've used:
Using OpenCV version 3.4.1
In the same folder as the exe: opencv_ffmpeg341_64.dll (provided with OpenCV)
In the same folder: openh264-1.7.0-win64.dll (available from: https://github.com/cisco/openh264/releases)
Use OpenCV VideoWriter class, omitting a specific encoding API
Container: MP4
Codec fourcc string: "H264"
I formatted my machine (Windows 10 64bit) so I can't exclude any issues with potential codec-clashing - also I have not fully tested for other combinations. As this appears to be such a common problem (with many misconceptions) I hope this is useful.
I have created a Qt 5.8 web engine based application but unfortunately, the video is not playing in the application.
After coming across many forums I found that I need to build QT with flag proprietary-codec
But this solution comes with the warning: When distributing proprietary codec libraries, you must acquire licenses for them.
Unfortunately, I can't use these proprietary codec libraries.
If I use open source codec libraries do I need to compile QT again with some other flag.
Is there any other solution to this approach.
Unfortunately for mp4 file format using proprietary codecs is the only option (i.e. this includes acquiring licenses to distribute and configuring/building Qt with the option you specified already in your question).
From Qt docs:
Qt WebEngine supports the MPEG-4 Part 14 (MP4) file format only if the required proprietary audio and video codecs, such as H.264 and MPEG layer-3 (MP3), have been enabled.
I have a Qt 5.3 application that plays videos which works fine for some videos. Unfortunately when given some .mov files, I either get a QMediaPlayer::FormatError or I can hear audio but no video.
I am assuming this is due to missing codecs, is there a way to add support so that I can play the videos?
EDIT: This is on OS X
QMediaPlayer can play any format that the platform's media service supports. You should install the right codecs for a video type to be played successfully. Try to install GStreamer codecs on Linux. If you are on Windows install KLite Codecs.
QtMultimedia's implemention is platform dependent (uses direct show on windows, gstream on linux etc). May be it is good to consider using libraries like QtAV or libVLC.
They work for most platforms and no additional codecs and plugins are required to install.
This question already has an answer here:
What is ffmpeg, avcodec, x264? [closed]
(1 answer)
Closed 9 years ago.
So I'm trying to compile the H.264 codec so that I can use it to enhance performance in NoMachine as per https://www.nomachine.com/AR10K00695
Instructions below deal with the following possible cases on server
host:
Case 1: You don't have x264 library already compiled
Case 2: You have x264 library already compiled
and on client host:
Case 1: You have FFmpeg already installed
Case 2: You don't have FFmpeg installed
Case 3: You have FFmpeg libraries already compiled
The weird thing is that it states that you compile x264 on the server and ffmpeg on the client. Shouldn't you have either have x264 compiled on both the server and the client or ffmpeg on the server and the client?
Why use two different codecs for the server and the client?
We rewrote the article since it was not doing a good job of explaining the subtleties we wanted to present. Encoder and decoder in FFmpeg are different codecs, developed by different developers and with different licenses. FFmpeg provides a H.264 decoder in the default build, but not the encoder. Additionally, when FFmpeg is built with the H.264 encoder, the default build links the encoder statically, so that other applications can't use it. This means that in most cases the encoder must be built separately.
Anyway this is not important for the end-users :-) If you want to use H.264 on the NoMachine client just install FFmpeg from the repository of your Linux distribution or install a Windows or Mac build from one of the sites providing it. If you want to use H.264 on the server, install a FFmpeg package including libx264 as a shared library or build it yourself using the instructions you find on the website.
Note also that NoMachine on Windows and Mac uses the codecs provided by the OS, which have the additional benefit of often being HW accelerated, with the FFmpeg SW codecs used as fallback in the case no suitable encoder or decoder can be initialized.
The NoMachine Team
I'm trying to find a cross platform audio library that will have the following abilities (in order of importance):
Full Windows, Mac, Linux support
C / C++ APIs
Free/cheap but commercially viable
MP3 Support
AAC Support
WMA Support
FLAC Support
OGG Support
ARM Linux support would be nice
Open Source
I've found several things like OpenAL, libao, Bass, etc. but they all seem to all either have a limitation of OS, codec or both. For the most part MP3 and AAC support are a must as I'm working on a media player and would like it to support those common formats.
Any suggestions?
You can take a look at GStreamer and FFmpeg.
EDIT:
Since you are willing to use Qt, you should definitely check Qt MultimediaKit, which is a part of the Qt Mobility project. Phonon is fading away because Qt is investing on MultimediaKit to replace it.
This example shows how to do simple audio playback. This example shows how to create a multimedia player. This example shows a more advanced music player, using Qt and QML.
I don't know if you are planning on using a framework like Qt.
This has a library called "Phonon" bundled, which is also really nice.
It is built on the corresponding native media framework, so QuickTime on Mac, Windows Media Player on Windows and GTK+ on Linux.
PulseAudio also looks promising without any framework.
Try out JUCE. It is like Qt in some respects, but much more audio-centric.I've been using it for some years now and it is well maintained and written.