How to use mpeg.org's mpeg2v12 decoder API? - c

I have downloaded mpeg.org standard codec source code mpeg2v12 from
http://www.mpeg.org/MPEG/video/mssg-free-mpeg-software.html
I am now looking for examples of how to use it's decoder API to read some mpeg2 file. I appreciate any code sample you can provide. Thanks in advance.
Artur

Unfortunately the correct answer is You cannot do this!.
MSSG's code is stand alone application and not a decoder as a re-entrant library so it cannot be used by linking from other application.
You can however use libmpeg2. This is relatively easy to integrate with application and fully compliant.

Related

C api on capturing video stream from webcam using ffmpeg

I am a new user of ffmpeg. Ffmpeg has a good documentation on using it in command-line, but i am looking for some C API code.
I want to make a software using C, that would capture video stream from webcam and give me the video stream in raw format, that I would encode in a codec later.
I have visited this given link, but it provided only the command-line use, not the use of libraries provided by ffmpeg:
http://ffmpeg.org/trac/ffmpeg/wiki/How%20to%20capture%20a%20webcam%20input
I also visited this link, which gave me good idea on using the libavcodec, but no other tutorial is available :
ffmpeg C API documentation/tutorial
Please someone help me finding C api on video stream capturing from webcam using ffmpeg's library. Thanks in advance.
You are basically repeating the question you are referring to. FFmpeg is basically the name of the library and the ready to use tool (command line interface). Its back end is a set of libraries: libavcodec, libavformat, swscale etc.
There is no comprehensive documentation on these libraries, instead there are samples, there is mailing list and other sparse resources. Also, the libraries are open source and all these are quite usable once you get the pieces together. Specific questions on ffmpeg are asked/answered on StackOverflow as well.

sip parses and libraries?

gcc 4.4.4 c89
Does any one know any sdp parses. That I can link to my application. Currently we are developing a SIP project. However, we need to parse the SDP for incoming/answering.
However, we don't have much time to implement. So just wondering if there are some simple ones out there they are easy and quick to work with.
Our application is written in c.
Many thanks for any advice,
Check out FreeSDP. But it is distributed under GPL
My company, RADVISION, offers a full commercial SIP stack written in C that includes an SDP parser. It might not be exactly what you're looking for, but it might reduce your development effort even further: http://www.radvision.com/Products/Developer/VoIP-Developer-Tools/SIP-Developer-Suite/
I haven't looked into open source stacks, but I would suspect that most SIP stacks would include an SDP parser. They are pretty closely tied together.

Program visible to Linux as normal directory

I'm trying to write program to work as programmable directory, in other words: User, or other systems open that directory and read/write files or dirs. I try to create program to cache most used files in memory (less I/O to HDD), but right now I don't know how to achive that. There are probably some docs about this but I can't find them. I know that there is FUSE, NFS and others, but reading their source is quite difficult. If any one has info about implementation in C lang I'll be very grateful.
Sorry for my English..
FUSE has a C interface - take a look at their Hello World example.
If you want a simple implementation, try Python's FUSE library. A quick tutorial can be found here.
You could have a look at the GIO library — it's part of GTK, but can be used separately. The documentation is pretty thorough, and if you need to do some quick prototyping you can use the PyGTK GIO bindings to mess around before going back and writing it in C.
It's licensed under the LGPL.
If you find it easier to code in Python, it's possible to create a compiled program using cx_Freeze.

How do I encode video in Visual C?

I have a video decrypter library that can decode an obsolete video format, and returns video frames in BMP and audio in WAV through callback functions. Now I need to encode a new video in any standard format under windows.
What might be the standard way to do this? I am using Win32/C. I guess Windows has its own encoding library and drivers and I don’t need to use FFMPEG. Any pointer to an example code or at least to a library to look at will be greatly helpful.
Edit: I accept. FFMPEG is the easiest way to do it.
On Windows, you have two native choices.
The old Windows Multimedia library which is too ancient to seriously consider, but does have the Video Compression Manager.
And then there's DirectShow.
It's certainly doable through DirectShow, but you better enjoy COM programming and the concepts of Filters, Graphs, and Monikers (oh my). See this tutorial for a crash course:
Recompressing an AVI File
And the MSDN documentation.
A simpler approach is indeed to use an library like FFMPEG or VLC.
To save yourself heartache, I echo Frank's suggestion of just using FFMPEG. Executing a separate FFMPEG process with the correct arguments will 100% be the easiest way to achieve your goals of encoding.
Your other options include:
libavcodec - The central library used in FFMPEG. I warn there don't appear to be many Windows binaries of libavcodec available, so you'd probably have to compile your own, which, at minimum, would require a Cygwin or MingW set up.
ffdshow-tryouts - A video codec library implemented as a DirectShow filter based on libavcodec. They do seem to have an API for manipulating it, but it's a .NET library.
I would suggest looking at the VirtualDub source code. It's a well known encoder that uses VFW. You may be able to get some ideas from that software.

Where can I find an example unzipper using zlib?

I'm looking for a bare bones simple example C app for unpacking a zip file using zlib. It must support fairly new version of .zip and must have source right down to the zlib calls.
The zlib-bin source package on my system (linux) has some example programs called "minizip" and "miniunzip" which shows just that.
The zpipe.c example on the zlib.net web site is pretty straight forward. There is also a pretty good description of what it does.

Resources