Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Recently, I completed an audio decoding task using Apple Core Audio C++ API.
Now I am interested in decoding and getting raw uncompressed data of frames of a video file again with native OSX API with C++ (the analog of DirectShow or Media Foundation on Windows OS).
I have looked at available APIs (AVFoundation, Core Video, etc.) but couldn't find the framework which will do the job and is accessible through C++.
So my question which is the most suitable framework to pick up for this task?
You can read raw video data from a file using AVFoundation's AVAssetReader.
You create an AVAssetReader, add a AVAssetReaderTrackOutput with nil output settings then call copyNextSampleBuffer() until finished.
However, unless you've got very specific needs, you're unlikely to find the raw codec video data very useful. Are you trying to display the video? In that case AVPlayerLayer / AVPlayer (AVFoundation once again) are probably what you're looking for. If you want something lower level, CoreMedia/VideoToolbox may be for you. AVFoundation is an objective c framework so you'll be using objective-c++, while CoreMedia and VideoToolbox are C frameworks.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I have raw audio data and I want to create a corresponding aac/m4a/mp4 file using Media Foundation.
This article describes all the settings and configurations.
I wonder if there is an example code or tutorial that shows how to do that?
I found this tutorial, but unfortunately, this is not raw data to mp4 file, but mp4 to another mp4 tutorial (changing the properties of an already existing file).
Thanks.
AAC file is basically the file with raw data. You don't need API to create such file, just write the data using file I/O functions. There is a delicate aspect about things like ADTS headers, but in general it is as simple as that.
With Media Foundation you can produce MP4 files, and most suitable API for that is Sink Writer. Apparently, raw data alone is insufficient to produce as you have to provide additional mandatory information, such as at the very least basic properties of the encoding. Once you are through with this, you write your AAC data in chunks and the API formats it as an MP4/M4A file. I am not aware of a tutorial which does exactly this, but it's a pretty straightforward use of the API.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I want to play a video of some type/format in my c++ program, i have installed Allegro 4.2.2 and Allegro5 along with both MSVC10 and MSVC13, i don't want to use any other library as they are a bit difficult to understand, if there is an easier way then tell me else tell me how to accomplish this task with Allegro?
As of Allegro5.1, there is a video
addon (it is not available in
5.0).
There is an
example
included in the allegro5 repository demonstrating how to use it.
The general gist is:
Invoke al_init_video_addon
Open the video with al_open_video
Start the video with al_start_video
Get the current frame as a bitmap with al_get_video_frame
Draw that bitmap with the usual bitmap drawing functions (al_draw_*_bitmap)
Repeat 4-5 during your game loop, then invoke al_close_video when you are done.
In the example they use al_draw_scaled_bitmap to scale the bitmap to the
screen; just take a look at the comments.
Note that you will need to link the video addon when linking your program
(-lallegro_video).
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Is this possible at all ?
I would like to use Juce to create spotify free and opensource audio plugins (EQ, limiter and stuff like that).
If I my understanding is correct, you can use libspotify to develop your own client, or you can use spotify API to interact with spotify's own client, but only in Javascript.
Is there any way (preferably cross platform), to develop a c++ plugin for the official spotify client ?
In a word, no — Spotify doesn't provide a native plugin API like that. However, you could properly apply filters to the audio after it's left Spotify — i.e., at the system level.
Actually, after some more research, there is a way but it's a bit of a hack and it's not cross-platform. You can create a proxy library for Direct Sound, which does the sound processing then forwards the audio to the real direct sound library.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I working on a Metro Style application that need to render PDF documents (only viewing). I am looking for a library to render a .pdf document on the screen, preferably one I can include in my "commercial" app (pdf viewing is only a side functionality). Unfortunately, Windows 8 (atleast in the Dev Preview) does not have native PDF support :(
Any suggestions for a library? I am writing my app in C++/Cx.
Minor addition: Third-party options shall not use APIs that are not allowed in Metro Style apps. :-/
Alternatively, I need a PDF parser and I will try to create my own Direct2D renderer (might work ok for simple PDFs).
You could use Ghostscript, or MuPDF, I'm sure there are others. Both will require programming on your part. Both are available under commercial licences as well as GPL.
Windows 8.1 (Blue) will include PDF viwer and editor APIs (WinRT based). Therefore, this seems to be the easiest solution for my scenario.
Here's a list of development libraries on wikipedia that lists the different license types and languages alongside. Quite useful, though probably not exhaustive.
At the time of writing, ones that much your requirements of C++, Windows with a commercial license are:
Adobe PDF Library
LEADTOOLS
PDFTron
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I am looking for a library to record images from a webcam and sound from the microphone and generate a video file (avi, mpeg or any other format).
I would prefer a cross-paltform solution (Windows, MAC and Linux) and something in C/C++ or Python.
Any recommendation and/or sample code?
Update: Folowing #Rory reccommendtation, i found this example of webcam viewser with Python and gstreamer. Unfortunately it requires v4l2src plugin which is not provided (correct me if I am wrong) with the Winodws build. Which plugin should be used on Windows?
gstreamer is an open source multimedia framework with C & Python bindings.