I need to create application on C++ for video conversion, and I can't use ffmpeg.exe.
I need to do it programmatically, but I don't know how can I do it, and I didn't find any examples on Internet.
May be somebody know something about my task? Thank you.
ffmpeg is an open source project. The transcoding engine used by ffmpeg is in the libraries libavcodec (for the codecs) and libavformat (for the containers). You can write your conversion as calls into these libraries, without the ffmpeg command line application.
Here is a tutorial on using these libraries.
Good luck.
Here's another good ffmpeg tutorial. Looking at the actual source code for ffmpeg would also help.
An updated version of the tutorial source is here.
Related
I want to find the corresponding c/c++ program for the ffmpeg command line:
ffmpeg -i sample.mp4 -an -vcodec libx264 -crf 23 outfile.h264
which convert a sample.mp4 file to outfile.h264, and
ffplay outfile.h264
What I am doing is to combine the ffmpeg program with my udp socket program to do a real-time video transmission. beacause it is 'real-time', so I want to find the ffmpeg program cut it at the frame encoding step instead of writing the frames into output file, and send frame by frame and also read frame by frame at the server side.
My questions are:
1.What c/c++ program is actually running when I use the above command line?
2.where can i find the c/c++ program?
ffmpeg is running. Same as any other program, there's an actual file on "the path" called ffmpeg. Use which ffmpeg or where ffmpeg to find it. On the systems at my university it is in /usr/pkg/bin/ffmpeg, but /usr/bin/ffmpeg is probably more typical.
The program itself is the ffmpeg file. If you mean the source code for the program, that is most likely not installed on your computer - you'll need to download it from somewhere (such as from the official FFmpeg website).
Note that FFmpeg is both a program and a set of libraries (libavformat, libavcodec, libavutil, etc). Most of the work is done in the libraries; the ffmpeg program itself just glues them together depending on the command line options.
As such, a more useful approach might be to learn how to use libavformat and libavcodec (and whichever other FFmpeg libraries) to do what you want. The documentation at http://ffmpeg.org/documentation.html doesn't seem to go into much detail; you might want to search for some tutorials.
I need to run AprilTags C++ algorithm on gumstix using DSP image library. Without DSP, Algorithm is eating up 85% cpu with 4fps. I am trying to get TI Image Library IMGLIB on Gumstix with Yocto Project. I could not find any resources or hints how to do it.
It would be great if I can get some inputs on how to proceed with getting imglib on gumstix using yocto project/open-embedded
Should I write a recipe with bitbake or is there any other way to get IMGLIB on Gumstix?
Try to bitbake the TI Image Library IMGLIB, and you should obtain
a library and modules DSPlink, CMem, etc which should be used to
communicate with the Gumstix DSP. In your application you link
to the library (e.g. specify its path in the makefile) and add
the include header (.h) in your application source code. That
is the theory anyway. I have bitbaked it and trying to use IMGLIB
now. Can report some progress. What OS/kernel you are using ?
Brahim
I'm a beginner in GStreamer programming.
I created a pipeline for playing media in a file.
I would like to use libogg.so for decoding the ogg format files rather than libgstogg.so.
How can i use the this decoder in my pipeline?
Everybody is beginner in gstreamer programming it seems :)
You will have to write a program, may be C program and link it against libogg.so rather than libgstogg.so
You can achieve above easily using cmake
To be confirm what lib the program picked for linking,
You may try renaming libgstogg or
Running strace to see which location the binary picked the file
Create a shared library of your program and run ldd
you seem to miss some basic concepts here:
gstreamer is a framework to build media pipelines from elements
elements are defined via a plugin-system. the plugin-files are shared-objects (.so) files
you cannot use just any shared-object as a plugin (gstreamer will not recognize e.g. libc.so as a plugin - simply because libc.so does not provide a gstreamer plugin)
so in your special case you want to exchange libgstogg.so by libogg.so.
now libgstogg.so is a shared object, that provides the ogg family of gstreamer plugins.
on the other side libogg.so is an implementation of an ogg muxer/demuxer that has nothing to do with gstreamer.
if you want to use libogg.so you will have to create your own gstreamer-plugin that uses libogg.so. check the documentation on how to do that.
before you do so, check what libgstogg.so actually does. you will disover, that it provides a gstreamer plugin that uses libogg.so to do the actual muxing/demuxing. it is really just the bridge that you are looking for:
$ ldd /usr/lib/x86_64-linux-gnu/gstreamer-0.10/libgstogg.so | grep ogg
libogg.so.0 => /usr/lib/x86_64-linux-gnu/libogg.so.0 (0x00007fc3f9ae7000)
Can you advice me any lib, which can help me to capture rtsp stream from ip camers. I have already used ffmpeg and openCV for this task, but ffmpeg has problems with working with AXIS IP-cameras, and openCV can't give me compressed data befor decompressing it (but i have to keep them cmpressed in archive). I develop on windows and Qt, if there are some ready binary lib files, it will be great, becouse, lots of libs if so complicated to build. Thank you for help!
Try your hand with the Red5 server.You will get what you want.Cheers
Read more at: http://red5wiki.com/wiki/SteamStream
I'm trying to write a small, cross-platform comic book reader (Qt / C++). I don't care what's already out there, I know there are some.
My problem is that I need to read the comic book formats, which are renamed rar and zip files.
The documentation is very... nonexistent? There's no "hello archive" document anywho.
How can I set this up?
If It makes it easier to assume I'm on any particular OS, do so. I'm switching between Kubuntu, OSX, and Win7 constantly for dev work.
I've been working on a simple C++ wrapper for the 7zip SDK, which you can find here. It currently only supports Windows and the specific needs I had, but I'd be happy to make some alterations and/or accept contributions. It can extract 7zip and Zip files in a few lines of code, using the 7z.dll. RAR shouldn't be difficult to add since the DLL supports it.
7z should actually come with both source for a commandline variant and a GUI variant, you could dig into to those and see how they do the compression, else you could use unRar and see if that has any examples(unfortunatly I can't check due to the download being blocked where I am).
Poking around the LMZA SDK a bit I came across this:
ANSI-C LZMA Decoder
~~~~~~~~~~~~~~~~~~~
Please note that interfaces for ANSI-C
code were changed in LZMA SDK 4.58. If
you want to use old interfaces you can
download previous version of LZMA SDK
from sourceforge.net site.
To use ANSI-C LZMA Decoder you need
the following files:
1) LzmaDec.h + LzmaDec.c + Types.h
LzmaUtil/LzmaUtil.c is example
application that uses these files.