I am a beginner developer want to develop a MP3 to AAC converter for Linux. But I don't know how to start as I havn't done any development in Linux before. I am using Ubuntu 10.04. Can anyone tell me how to start and from where? What libraries do I need?
Thanks
If you want to use an encoder, FAAC is open source, so you could write a program that uses it. Or check out the source code.
I.A.N.A.L. but, AAC is a patented technology, so you may have to pay fees to make a commercial project.
A good place to start learning how lots of Unix programs are written, is using the GNU toolchain, GCC, Make, Configure etc...
The ffmpeg libraries are a great swiss army knife for anything dealing with audio/video. In fact, you can use the ffmpeg command-line interface to easily convert between MP3 and AAC:
ffmpeg -i <path to MP3 file> <path to AAC file>
This requires that ffmpeg be compiled with FAAC and LAME support. I don't think Ubuntu's ffmpeg libraries include these by default for legal reasons, but there are ways to install MP3 and AAC enabled versions: http://gebaar.blogspot.com/2009/06/howto-easily-enable-mp3-mpeg4-aac-and.html
If you want to use ffmpeg's underlying libraries (libavcodec, libavformat, etc) to code it yourself: http://cekirdek.pardus.org.tr/~ismail/ffmpeg-docs/api-example_8c-source.html
Related
I have watches a way of doing this with audacity by using sound finder option. But since audacity is only gui it cannot be used with terminal commands. So is there a program that does the same work but in command interface like sox for example.
sox input.wav slice.wav silence 1 1.0 2% 1 3.0 2% : newfile : restart
Currently, Audacity does have experimental support for scripting.
The scripting module is an experimental GUI plug-in that allows Audacity to be driven from an external Perl or Python script. Commands are sent to Audacity over a named pipe. Any scripting language that supports named pipes can be used. External scripting is one of several ways to extend the functionality of Audacity.
Scripting support is currently considered experimental and is mainly intended for use by developers for the time being.
Feel free to try it out, but don't be too surprised if there are problems, or if the details of commands change between versions of Audacity.
Currently Windows or Linux are recommended. Mac requires more work to get anything useful at all.
There is a fuller list of limitations at the foot of this page.
Specifically, try out the ‘Menu Command’ option:
https://manual.audacityteam.org/man/scripting.html#MenuCommand
Currently what I have a Linux application that was written using Xlib and I needed to add video playing capabilities into it.
What libraries would you recommend that I could use for video decoding and rendering that works well with Xlib?
The options are plentiful.
xine-lib.
GStreamer (works best with glib-based programs).
Phonon (works best with Qt-based programs).
FFmpeg.
libVLC.
MPlayer + XEmbed.
Xine is probably the easiest (easier than FFmpeg, anyhow) without requiring anything beyond itself and Xlib. There's a short, complete example in under 180 lines of actual code.
muxine is a very small player that just creates a X11 window and play a given stream MRL. Source code: muxine.c.
You can compile muxine with:
gcc -Wall -O2 `xine-config --cflags`
-o muxine muxine.c `xine-config --libs`
On the other hand, using MPlayer+XEmbed is pretty easy too, much easier if you don't care to have much control over the video playback. Create a X11 window, and run mplayer -wid <window-id>.
You could try using either FFMpeg or Mplayer.
Is there Any open source, fast H263 decoder library for ARM9 than ffmpeg?
I've ported the Telenor H.263 decoder to ARM9. It seemed to run fine. Telenor doesn't distribute it any more, but the files here look like what I used.
may be x263 from Xirlink?
http://freshmeat.net/projects/helixplayer
http://freshmeat.net/projects/mediastreamer
http://sourceforge.net/projects/h263/
http://sourceforge.net/projects/mpeg4dec/
If any suits you say it!
Is there a freely available library to create a MPEG (or any other simple video format) out of an image sequence ?
It must run on Linux too, and ideally have Python bindings.
I know there's mencoder (part of the mplayer project), and ffmpeg, which both can do this.
ffmpeg is a great (open source) program for building all kinds of video, and converting one type of video (a sequence of images in this case) into other types of video.
Usually it is utilized from the command line, but that is really just a wrapper around its internal libraries. It is expressly available to be used from within another program.
There are also python bindings that wrap the c api, though this particular project doesn't seem to be getting the best support (there are probably other projects out there doing the same thing).
There's also this link where someone has used ffmpeg to do something similar to what you're looking for.
GStreamer is a popular choice. It's a full multimedia framework much like DirectShow or QuickTime, has the advantage of having legally licensed codecs available, and has excellent Python bindings.
in c++ OpenCV (open source Computer Vision library from Intel) let you create an AVI file and just push frames inside...
but it's like shooting with a cannon to a fly.
Not a library, but mplayer has the ability to encode JPEG sequences to any kind of format. It runs on Linux, Windows, BSD and other platforms and you can write a python script if you want to use it with python.
ffmpeg has an API and also python bindings, seems to be the way to go !
Thanks
ffmpeg minimal runnable C example
I have provided a full runnable example at: How to resize a picture using ffmpeg's sws_scale()?
What is the best way to transcode audio and video to show on the web?
I need to do it programmatically. I'd like to do something like YouTube or Google Video where users can upload whatever format they want, and I encode it to flv, mp3, and/or mp4. I could do it on our server, but I would rather use an EC2 instance or even a web service. We have a Windows 2008 server.
I strongly recommend ffmpeg. On Windows, I have found this site to host good binaries.
kind of depends on how much you want to spend. if this is a brand new (and mostly unfunded) idea, then go the ffmpeg route, but as you scale and look to iprove the quality, consider one of the more professional encoding tools that can be automated (Rhozet, Inlet, Digital Rapids are 3 options).
ffmpeg can do it, its a command-line tool that uses the libavcodec. Can handle conversion of most video formats. Its license is LPGL, if that suits your needs. You can utilize it as a separate process programmatically, or if you're feeling hardcore, you can use the libavcodec library yourself to encode directly.
When you want to transcode to Flv (which is probably the best for the web) then I use this line:
ffmpeg -hq -y -i $directory/$file -r 20 -s 300x200 -deinterlace -ar 22050 $directory/$file.flv 1>/dev/null 2>/dev/null
It works very well, under linux of course :-).
If you are looking for GPL'ed stuff:
For audio mucking about, try sox. Very powerful! It does a lot! It's included in most linux distributions.
There is also the famous LAME for mp3 [audio] encoding.
For video, mencoder is impressive! It's part of the mplayer package. It will handle conversions from most video formats. Far more than I ever dreamed existed. (For documentation, see Chapter 9. Basic usage of MEncoder and Chapter 10. Encoding with MEncoder.)
It's somewhat more limited about what it can create. But it does support mpeg4, mpeg2, dvd-mpeg, flv, and many others. (While I haven't tried flv myself, google shows other folks are using it.)
I have done things like jpeg + sound -> mpeg4 movie:
nice +20 $MENCODER mf://${JPEGFILE} -mf w=720:h=480:fps=1/${SOUNDLENGTH}:type=jpeg -audiofile ${SOUNDFILE} -ovc lavc -oac lavc -lavcopts vcodec=mpeg4 -ofps 30000/1001 -o ${MENU_MPG}
Or transcode arbitrarily formated video to dvd-compatible mpeg:
nice +20 $MENCODER -edl ${EDL} -ovc lavc -oac lavc -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=${VBITRATE}:keyint=18:acodec=ac3:abitrate=192:aspect=4/3:trell:mbd=2:dia=4:cmp=3:precmp=3:ildctcmp=3:subcmp=3:mbcmp=3:cbp:mv0:dc=10 -of mpeg -mpegopts format=dvd -vf scale=720:480,harddup -srate 48000 -af lavcresample=48000 -ofps 30000/1001 -o ./${INFILE}.reformatted ${FILEPATH}
-edl/-edlout [Edit Decision Lists] are used to snip out just the video sections I want.
${VBITRATE} is normally 5000 for DVD-mpeg-video. But if you flub it a bit you can squeeze more video onto a dvd. Assuming you can tolerate the artifacts.
scale=720:480,harddup -- Little issue with the scale being wrong for my dvdplayer, and harddup to resolve a sound-video desync issue on my "el cheapo" player.
(To playback on a widescreen player that wouldn't handle 4x3 video, I've used atrocities like "aspect=16/9", "-vf scale=560:480,expand=720:480,harddup". But in general you don't want to waste bits encoding black-bars.)
This is not the most efficient set of options to mencoder by far! It can be time consuming to run. But I had other goals in mind...
Do be aware that certain parts of ffmpeg are under GPL. I believe the libpostproc module is and if I recall correctly this is used in transcoding. Make sure this license is compatible with what you're doing.
I would take a look at Main Concept's Reference SDK:
http://www.mainconcept.com/site/developer-products-6/pc-based-sdks-20974/reference-sdk-21221/information-21243.html
It is built for transcoding and, since it is a licensed SDK it doesn't have any of the legal issues surrounding ffmpeg/libavcodec.
Rhozet Carbon Coder can handle a wide range of formats plus you can use plugins to alter the video (eg add a watermark)