c/c++/objective-c library for encoding mpegs - iphone

I am looking to encode a jpg sequence into an mpeg format on an iphone project I am working on. My google searches are coming up pretty short. Does anyone happen to know of a library that would let me do something like this?

have a look at ffmpeg
(more characters required)

Related

Native swift zip decompression

I would like to implement zip decompression without using external frameworks. I think that Compression framework from iOS SDK should be ok for this, but I'm not sure. I was looking for some examples on how to extract files using this but found nothing. I wan't to extract all files from zip to some directory (not Data object). Can someone help me starting this? Maybe some tutorials I haven't found? Any help will be appreciated.
zlib, which is already there, provides the raw decompression and CRC calculation engines. From there you can write your own code to interpret the zip file structure, which is documented in the PKWare appnote. It is relatively straightforward.

Take screenshot of audio stream

Alright, what I need is a command-line application that allows you to take a screenshot of a file's audio stream.
For example it should be run like this:
app.exe "C:/artist-title.mp3" "C:/mp3Stream.jpg"
app.exe "C:/artist-title.wav" "C:/wavStream.jpg"
It only has to be able to capture mp3 streams, other streams are a bonus.
Preferably all audio channels are listed in the image, but if all channels are combined into one mono stream it would work just as good for me.
So, is there such a application out there? So that I don't re-invent the wheel.
If not does anyone have tips on how I should go about writing such a application myself? Preferably in Java. I can handle programming pretty well but I'm not exactly an expert on the MP3/WAV formats.
Why do I need it...? Well, it's more fun to link to a file online with some sort of preview image besides the link. It gives you a hint of the audio character before you listen to it (is it loud? does it look like "bit music"? does it have any parts that are more quiet than others? etc).
Never mind, I wrote my own little application in Java.
It was a piece of cake once I found this excellent guide:
http://codeidol.com/java/swing/Audio/Build-an-Audio-Waveform-Display/
Although you can't download the source from that page (as far as I can tell, though he makes it apparent that you should be able to) he does provide some very useful key lines of code that makes it easy to puzzle together the application.
Adding a little bit of help (easy stuff). You can get a graphics object from doing so:
BufferedImage img = new BufferedImage(500, 100, BufferedImage.TYPE_INT_RGB);
Graphics2D gfx = (Graphics2D) img.getGraphics();
And once you have drawn everything you need on the gfx you can save it to disk just by one line:
ImageIO.write(img, "jpg", new File("waveform.png"));
It's hard to get it to look very good though. Doesn't look as nice as for example Audacity. Guess they have spent more time on it than a few hours though.
The biggest pain about this is however that Java don't support MP3 import. They really should get around to that.
So to get the waveform of MP3s I first convert them into WAV using "javazoom.jl.decoder.Decoder.java", it's on their website. Very easy to use, just give the input path and the output path and it's done.
javazoom dot net (couldn't post more than one "hyperlink" on this website)
The big downside of this is of course that a huuge WAV file has to be created, and woe be unto thee if the MP3 happens to be 15 minutes or so... The WAV will be over 100 MiB (maybe even 200 MiB, haven't found out since I got a Java-out-of-memory-error, even though I gave the VM 512mb).
MP3 support in Java today please. Guess the reason they don't have it is because of copyright issues. Copyright really is slowing man down.
Also take a look at http://www.jsresources.org/
It provides a pretty good FAQ section about everything Audio in Java, and some example applications.

how to unicode commentting a mp3 using LAME encoder

I want to add some comments to my mp3s but my comments all are in non-latin characters like arabic.
I have written a shell program to get the comments from user in windows but since LAME.exe is a console program I don't know how to convert these non-latin character to something meaningful for LAME.
so is there any way to add these kind of comments using LAME.exe?
regards.
I think you're going to have real trouble doing it on the Windows command line, as everything will be working in the system default code page (ANSI) and not Unicode. You won't be able to use Arabic at all unless you're on an Arabic Windows install (ANSI=code page 1256; settable in the region options), and even then I'm not sure it'll actually use the right encoding.
In any case lame.exe is not a good choice for editing tags, as it's an audio encoder, which will decode and re-encode the MP3, causing quality loss.
There are many graphical apps that will batch re-tag MP3s. If you want a scriptable solution you're probably better off with a higher-level language/library that supports Unicode better than the Windows command line/bat files (eg Python + Mutagen, but there are many possibilities depending on what languages you're familiar with).

How can I parse raw email source and extract the HTML part?

In my iPhone app, I'm handed the raw source of an email, in RFC822 (or "eml") format. I'd like the HTML part of this message (if one exists).
Rather than attempting to parse it out myself and converting escape chars and so on, I thought I'd check to see if anyone knows of an objective-c library to do this for me.
In .NET, I've always used the Mailbee classes for anything email related, but I can't seem to find anything similar for cocoa.
You may have a look at the Pantomime framework for Mac OS X. It provides a full fledged email package, including RFC822 parsing. It can be downloaded directly from here.
As far as I know it has not been ported to iPhone, but it should give you a good starting point.
Claus

Converting hebrew text to an image using imagemagick

I need to convert text to an image. Using imagemagick I can get this done.
However, part or all of the text could be in Hebrew (an RTL language).
This means the words in Hebrew are rendered backwards.
If I was assured that the text was only Hebrew, I would have just reversed the text before sending it to ImageMagick. However, this solution won't work if part of the text is in English.
Does anyone have any idea how this can be done?
P.S. I'm not committed to using ImageMagick, if a better way comes up.
However, the solution should work for both Linux and Windows (I might be able to live with a non-windows solution, but a multi OS solution is preferable).
Thanks,
Niv
i see this link
http://www.experts-exchange.com/Software/Photos_Graphics/Web_Graphics/Q_21766928.html
they suggest
Maybe Unifier (http://www.melody-soft.com/html/unifier.html) or Encoding Master (http://www.elfdata.com/encodingmaster/index.html)
Sounds like your real issue is to re-order the bidirectional text for imagemagick. A job for the Unicode bidirectional algorithm. See http://unicode.org/reports/tr9/ That report lists two reference implementations. Or see this one: http://fribidi.org/