How to convert sequence of image file to video using c programming? - ffmpeg

I am working on a V4L2 camera driver.The webcam taking number of sequence of image files.Now I want to convert it into video (mp4) file.How it is possible using FFMPEG/GSTREAM using pure c source code instead of ubuntu terminal command ?

GStreamer can be used to write applications using C. There are application guides available on their documentation site. But you need few extra topics related GObject as well to start using the framework.
I would recommend to go through their documentation site.
https://gstreamer.freedesktop.org/documentation/tutorials/index.html?gi-language=c
It is not that hard if you read through the documentation and they have lots of plugins available to to achieve quite lots of things related to audio/video processing.

Related

How should one start with ffmpeg's API?

I'd like to make a real time streaming program that takes input from a webcamera, ffmpeg looks like a good library for encoding a stream of images but there is no documentation or community tutorials (there is just a doxygen API reference).Where should I start if there's no official documentation?

Simple effect processing in AudioKit example for MacOS files needed

I have a unique filter that I want to use while playing Audio files on MacOS and am trying to start based on an AudioKit example whereby I just replace a current effect with new code with my filtering. However, I can't find an example that is close to what I want and the amount of effort required to do from scratch is a bit too much. Is anyone aware of such examples that I can use? I've looked through all of the examples on AudioKit they either just play audio files or have effects but assume microphone data. Thanks
In the Developer directory of AudioKit you'll find an example called "ExtendingAudioKit" which is probably going to be your best template for how to set up a project that uses AudioKit for the base, but allows you to develop custom DSP external to AudioKit.

Speech to Text on UWP apps using Audio File as Input

I am having troubles finding the answer for this question on web.
The project I am developing demands that I could save a recorded audio file, and, after that, transcribe the audio to text for finding interesting predefined keywords.
I am using the Windows.Media.SpeechRecognition framework, and it works fine when you are transcribing the speech during the recording process. I can't find, in the same framework, a function which I can use with an audio file as input.
Does anybody know a good approach for this problem? Or another [free] framework for Windows Apps?
For online recognition and in particular in JS projects you can use directly Microsoft Cognitive Services, that are behind online recognition in the SpeechRecognition in Windows. It is free under some limits.
In particular here is open sourced wrapped for JavaScript on GitHub:Oxford.Speech.JS. It can deal with both wav-files and microphone. Sample code is designed like a website, but I'm pretty sure you can easily convert it into a HTML/JS-based UWP app.

Selecting a library / framework for video capture & recording

In one of the project that we have undertaken we are looking for a video capture & recording library. Our groundwork (based on google search) shows that vlc (libvlc), ffmpeg (libavcodec) and gstreamer are the three popular free and open source libraries / multimedia frameworks available for the same. How do these libraries compare on the following parameters:
Licensing policy to allow use within a commercial product without the need to open source any of the components of the product that is using the library
Ability to be used effectively in a multi-threaded environment (library should be inherently thread-safe)
Easy to use and maintain
Documentation: API should be well documented...this is relative...:)
Our primary intention is to be able to capture RTSP video streams (H.264/MPEG-2/MJPEG encoded), convert these streams to raw video / frames so that it can be used for analysis / processing and later on compress these frames and store it on the disk in the form of an MP4 file (using MPEG2 / H.264 encoding).
P.S. We understand that FFmpeg is also one of the components of vlc since vlc uses libavcodec library. Is the same true for gstreamer as well? Does it have any ffmpeg dependency?
Awaiting your responses.
Regards,
Saurabh Gandhi
I suggest you to use Gstreamer.
Gstremer is multimedia framework and it has so many plug-in for various task. Plugin are one type of library. And for Capturing rtsp , converting raw video , and muxing in mp4 all have i think you will easily find out the best plug-in in Gstermer. yOU just need to write one application for this.
1. Licensing policy to allow use within a commercial product without
the need to open source any of the components of the product that is
using the library
i dont know much about this
2. Ability to be used effectively in a multi-threaded environment
(library should be inherently thread-safe)
yea Gstremer internally take care for all threading.
3. Easy to use and maintain
yea Gstremer is easy to use and maintain
4. Documentation: API should be well documented...this is relative...:)
yea Gstremer has verry well managed documented API
No Gstermer framework has no dependency on ffmpeg.but Actualy gstremer has some plugin which are based on ffmpeg. that is gst-ffmpeg

How do I read a video camera in a win32 C program

I have this garden variety USB video camera, and it came with two mini-apps, one that just lets you see what the camera sees, and one that records to an .avi file.
But what's the API if I want to grab images from the camera in my own C program? I am making the assumptions that it's (1) possible and (2) desirable to make some call and have a 2D array of pixel information filled in.
What I really want to do is tinker with image processing algorithms, and for that I'd really like to get my code around some live data.
EDIT -
Having had a healthy exposure to Linux, I can grasp how (ideally/in theory) you could open() the device, use ioctl() to configure it, and read() the data. And I'm virtually certain that that's not how Windows is going to present the API. Not knowing what function names Windows might use for a video device API, or even if it has one, makes it difficult to look up, at least with the win32 api search capabilities that I have at my disposal.
You'll probably need the DirectShow API, provided that's how the camera operates. If the manufacturer created their own code path, you'll need their API.
Your first step, as pointed out by ChrisBD, is to check if Windows supports your device.
If that is the case you have three possible Windows APIs for capture:
DirectShow
VFW. Has more or less been replaced by DirectShow
MediaFoundation. Is the newest API that is intended to replace DirectShow. AFAIK not fully implemented yet and only available in Vista.
From the three DirectShow is the best choice. However, learning and using DirectShow is not a trivial task. An excellent example can be found here.
Another possibility is to use OpenCV. OpenCV is an image processing library, that you can also use for processing the images. OpenCV has an image capture API that provides a simpler abstraction and is easier to use than the Windows APIs.
The API is the way to go.
A good indication of whether the camera requires a bespoke one or not is to see if it is recognised by a PC without the manufacturer's applications installed. If windows has the drivers built in the you should be able to use the windows APIs to capture the images.
Alternatively if you know what compression codec has been used for the AVI file you could unpack it.
Ideally it would be good if you could capture the video in native (YUV, RGB15 or similar) format as then you can work on compression as well as manipulation.

Resources