I'm trying to read MXF files (from Avid) into an Objective-C project and analyze some frames from video. Preferably getting them into a CGImage or NSImage.
I've been exploring the mxflib, but find myself at a bit of a standstill. I'm used to the mechanics of the standard video methods within Obj-c, but this package is C++ and not exactly something I'm familiar with.
Does anyone have experience working with this library or another similar one? There's not much information available on the subject (at least not that I can understand). And I'm not quite sure where to begin.
Actually, I'd say you're looking at it from a not so good way, as the mxflib is prepared to handle standard MXF files, not really Avid ones.
In short, for this to work, you need to extend the library as per Avid specs (it can be done!) or go with AMT, for which I understand you need to engage Avid to have it.
Finally, I think you're stuck with C++! ;-)
Related
This is kind of a beginner question, so please let me know if this is appropriate for this website and if not, where else I should be asking this.
I've just gotten into the basics of C++ (pretty much what's being taught in this video from FreeCodeCamp: https://www.youtube.com/watch?v=vLnPwxZdW4Y). Obviously, not everything there is to know is discussed in this tutorial and I've been running into a couple of things in other demonstration vids that I don't quite get yet.
For example, this quick demonstration of how Tetris can be coded: https://www.youtube.com/watch?v=zH_omFPqMO4&t=0m25s) you can see him use the command 'RenderWindow', which apparently creates a new window the size of his choice (320*480 pixels in this case). This doesn't seem to be a standard function in C++, so I assume he somehow imported it. How can I do this myself? Does it have to with the file inclusions written at the top of the file (#include <SFML/Graphics.hpp>)? If so, how can I learn more about such files, where can I find them (is it anything like the Python Package Index, or interfaces in Java) and can I create them myself? Any general explanatory words on this?
Thanks in advance.
This doesn't seem to be a standard function in C++
That is correct. There are no functions for graphics nor window handling in C++.
so I assume he somehow imported it. How can I do this myself?
Usually, you would pick a library of your choice (there are many), or do it yourself by using whatever API your operating system provides.
Does it have to with the file inclusions written at the top of the file (#include <SFML/Graphics.hpp>)?
Yes, SFML is one of those libraries.
If so, how can I learn more about such files
You would go to the library's homepage and read the documentation.
where can I find them
Try searching the web for lists of libraries, articles, projects, etc.
is it anything like the Python Package Index
No, there is no standard one for C++. There are several package managers, build systems, etc. Popular libraries are in most of them and support one or more build systems.
This is my first post here. I am trying to write a program that plays background music, while still allowing for playing sound effects (i.e. music with gunshots). I wish to play multiple sounds at once WITHOUT using any other libraries or header files. I don't want to use anything besides what comes with Windows XP and my compiler. I don't want links to other libraries, I need example code showing how to do this using vanilla Windows. I am using Windows.h. I have done research into this, and have yet to find an answer that meets my needs. I have heard that multiple threads might be an answer, but cannot get them to work. I am relatively new to coding.
Thanks in advance!
I know you've said you want to keep it simple, but it sounds like you want to use DirectSound. It provides one primary buffer (good for your background music) and a series of secondary buffers (good for your sound effects). Its very easy to work with, and doesn't require much more than linking dsound.lib
Also, completely unhelpful: You should be sure to upgrade to Windows 7 or 8 before April. Microsoft will no longer support it and you'll be a great risk for exploitation.
I am a frustrated newbie of C++ who would like to do the simple task of extracting a pixel matrix from an image file, do some transformation, and then output the modified matrix to an image format of my choosing.
I've given libpng a try and it's API is a mess and hardly readable. Interestingly, some people said it's the best available for C++. I gave my software developer cousin a call and he told me to use OpenGL. So, I did some Googling and I still haven't found a straight answer.
It appears getting a simple "int* readPNG(char* path)" is too much to ask for when the likes of Java, Matlab, and python have these things included in their standard libraries. This is just ridiculous! How do you pros come by and what libraries do you use?
Also a few trivial C++ questions:
- Is there any way to organize classes in a hierarchy like how packages are used in Java? I tried filters in Visual C++ but they don't seem to be the same thing.
- Is there any way to get easily comprehensible stack traces for runtime failures?
Try OpenCV. It is an image processing library with very simple features for editing and saving the images. It will serve your purpose. It also comes with very elegant documentation.
I've found ImageMagick's Magick++ library to be the most useful tool for handling image formatted data programmatically.
C++ has namespaces like Java but they are much more difficult to use and may only make things less readable. As for stack traces, I recommend combing the existing stackoverflow answers for that. In short, it's not simple.
I suggest you improve your Google-fu. There are lots of image processing libraries for C++, including the Boost Generic Image Library, which is as close to standard as you'll get. If you don't have Boost installed and minimal fuss installing libraries, you can always try The CImg Library.
As for your other questions (e.g. stack traces), you'll need to ask separate questions.
I'd suggest Magick++, the C++ API to ImageMagick.
As for packages: you can use namespaces, but that's not nearly comparable to Java's packages (no package-level access etc). They're mostly what they're called: a means to organize names.
Stack traces are not trivial in C++. And there's no platform-independent way of implementing them that I'm aware of.
If you need these features, I just wonder why you don't stick with Java or Python or the likes ? ...
1) Try freeImage - very easy to use and the documentation is readable.
freeimage site
2) for stack traces: which environment are you working with? In Visual Studio there is Stack window (Debug/Windows/Call Stack - Alt 7),
You can also use DebugView and OutputDebugString - not really traces the stack, but can be very usable in debugging. .
I recommend DevIL (formerly known as OpenIL). It has read and write support for 17 formats, and supports many more for just reading.
This is my answer to my very own question here:
Some of the suggested libraries up there have issues with installation with Visual Studio 2010, offer practically no instructions for installation with Visual Studio (i.e. FreeImage), or simply have ridiculously messy API's (i.e. libpng).
If you are new to C/C++, please be careful about what library to choose. Even if there are technical forums roaming with gurus who knows all the answers, you are most likely on your own spending days experimenting and piecing up clues that experienced volunteers could've easily answered in 2 sentences (if they bothered).
Now, what works for me is the OpenCV image library (http://opencv.willowgarage.com/), which is introduced by Mister daerty0153 up there. When you go on the website, don't download the superpack from sourceforge. Instead, read the installation instructions (http://opencv.willowgarage.com/wiki/InstallGuide) and choose what platform you are using.
In my case, I use Visual Studio 2010 as my IDE and so this is the actual subpage that is relevant: http://opencv.willowgarage.com/wiki/VisualC%2B%2B
One problem I encountered is letting VS2010 recognize the .dll files and is not remedied by following those instructions. My solution was to copy all of them to my project folder and that solves all the problem. Some suggested it is a VS 2010 bug.
Hope it helps others suffering from the same situation.
I have searched high and low, and cannot find any decent MP3 decoders =/
I need one that will compile under gcc/linux.
The closest thing i could find was libmad, which has no documentation at all, and the only example I could find was the one on their home page, which is really complicated.
Does anyone know where I can find one?
I have used MAD (MPEG Audio Decoder) in the past with great results, so I would not give up on it so quickly. MAD is specialy designed for good performance on CPUs without floating-point operations, which is desirable while developing applications for mobile devices for example. I would like to recommend you to take a look on the source code of this project (GSPlayer). It is an audio player for Windows CE/Windows Mobile and it uses libmad. The code is fully functional, neat, and not too large, so it may help you to get an idea on how to use libmad on your own projects.
You may have to verify the license (GPL) for libmad though, since it may not suit your needs.
Have you looked at Lame?
Looking at its command-line page, I can see at least a few options that look promising, such as --decode and --mp3input. That would hint that the underlying library has the ability to do what you need, I would imagine. Whether or not it has nice, well-encapsulated C++ functions for decoding mp3s is another story.
As correctly noted in the comments, you should carefully examine the licensing and patent agreements.
ffmpeg should be able to handle MP3s without difficulty. How easy it is to actually access that functionality though, I cannot say.
have a look at this application, very easy to use,
programmed in C and works on windows/linux
http://sourceforge.net/projects/mp3decoder/
I have been looking at using CLIPS as an expert system for a simulator i am working on, and so i had a look at clipsmm. The only problem is that their sourceforge page has broken links and private forums.
I was just curious if anyone has had experience with clipsmm (i have learnt how to use CLIPS as a stand alone already), and i just need a little help getting the c++ wrapper working.
Any help that someone could give me would be great.
Thanks
-Craig
(sorry can't make custom tags for this so had to use generic ones)
mm is "minus minus", the standard trope for a C++ "founding" pkg (as in eg c-- itself). This is on the one hand in cognitive dissonance with its failure to be just standard C++ with no external dependencies and on the other hand consonant with its use of glibmm. It's vacuous and these dependencies are a major hassle, but I don't know of anything better for C++ encapsulation of CLIPS.
Well, I don't have direct experience, but I happen to have been the original author of a very similar set of wrappers for Ada.
I developed what I needed for a school project, and released it to the Public Domain in hopes that somebody else could build on it or find it useful. Some folks have used it, but not enough to support a full-fledged project. It looks like the userbase in the C++ realm isn't a lot better.
My suggestion to you would be to accquaint yourself with how your C++ compiler handles C bindings, download what code you can find, and dive right into it. You aren't likely to find a lot of very experienced help in a small niche like this.
If I'm wrong, I'm happy for you.