views:

86

answers:

2

hi everyone, Is is possible to convert (jpg+mp3) into mp4 or mp4 into (jpg+mp3) in xcode programming? The file type is not necessary to be jpg or mp3, it could be any possible photo file type like jpg, png or bmp, and could be any possible audio file type like wav, caf or mp3.

Coud anyone give me a sample code or the reference documents?

thank you very much!!

Alex Lin

A: 

yes, i am developing an app by Xcode IDE. I just want to emphasize that my question is not to convert a mp4 captured by iPhone to (jpg+mp3) on PC or Mac. Thank you for your reply!

Alex
please don't reply to comments with an answer, reply by adding a comment bellow his comment.
Roman A. Taycher
A: 

Assuming this target Mac Os X, you'll want to use Quicktime/qtkit see the Quicktime reference.

Note I have no experience with this kind of thing or Quicktime, or Obj-C so these are mostly guesses.

The QTMovie seems to represent an arbitrary movie, to get pictures out you will probably want the getting Movie Images functions most of thos seem to return NSImage objects, I can't seem to find an authoratative answer on how to write that object to an image file but there are a few potential answers here. I'm even less sure about audio but I think yo get ask the QTMovie for its (QT)tracks then you you use the media function to determine whether its a video or audio. I'm not sure how to save that audio to a file.

Roman A. Taycher