iPhone - IMA WAV ADPCM audio stream for iOS - iphone

I am trying to write an app for a school project that will play a video stream of the lab. They use Foscam cameras, and from what I understand they only stream audio in FFMPEG and VLC (a wrapper of FFMPEG and others, correct?). I can play the video stream in a UIWebView just fine, but I can't figure out how to get audio to work. I have read a bunch of post on here about the different audio stream options, but none support this format. I have also looked into VLCKit, but that seems to only work in OS X, not iOS.
Is there a Framework, or Kit that can stream IMA WAV ADPCM audio from a VLC/FFMPEG file, or does someone know of a better way to get audio from a Foscam?
EDIT - I know more about the stream and I have tried a few things. I tried AVPlayer, but discovered Audio FIle Stream and Audio Queue Services but can't find a good tutorial.
I also found THIS site, and tried the project with my stream and it did not work.

Related

ffmpeg with AudioUnit

What I have
My aim is to parse some media file using ffmpeg and provide video and audio playback. Which I do successfully using the OpenGL for video and AudioQueue for audio.
What I need to do
I need to change AudioQueue to Audio Unit service, because it does provide several nasty features for Audio manipulations.
Basically I'm confused on integration of Audio Units into ffmpeg run loop.
So would like to have some references/samples from you guys where Audio Unit is intergrated with ffmpeg media playback loop i.e. media packet extraction and its pushing into some buffer which Audio Unit can play.
Yes, i already used AudioUnit for playing a decoded audio using ffmpeg.
I took Novocaine project from github ( https://github.com/alexbw/novocaine ) and did a some changes (mostly threw code for input and OSX).
See KxAudioManager class from kxmovie project: https://github.com/kolyvan/kxmovie
If you plan to code for iOS, then note about need resampling sound to 44100Hz.
A many movies have audio streams with 48000 Hz sample rate.
And the best result I got: resample via swr_convert function from libswresample lib.

How to play AMR audio file on iPhone

I have tried using AVAudioPlayer , MPMoviePlayer to play AMR files but unable to play them. AVAudioPlayer play method always returns NO for AMR files and MPMoveiPlayer post MPMoviePlayerPlaybackDidFinishNotification as soon as it is played. Even tried to play play AMR with webview but without success.
Is there any other way to play AMR files. According to this post About AMR audio file playing issue on different devices iOS4.3 above does not support AMR ,but how can mail app can play AMR files?
I tried converting AMR to caf file using ExtAudioFile ,but I am getting an error code 1718449215 which I found out that it means kAudioFormatUnsupportedDataFormatError.
Even it is an old question, I still do not have an answer.
Instead, my way is converting to wave in advance, with the use of the following library from Github
https://github.com/justinjing/RecordWAVToAMRDemo/blob/master/AmrConvertAndRecord/VoiceConvert/VoiceConverter.mm

MJPG streaming with audio

I have a program on the server side that keeps generating a series of JPEG files, and I want to play these files on the client browser as a video stream, with a desired frame rates (this video should be playing while the new JPEG files are being generated). Meanwhile, I have a wav file that is handy and I want to play this wav file in the client side, when the streaming video is being played.
Is there anyway to do it? I have done a plenty of research but can't find a satisfactory solution -- they are either just for video streaming or just for audio streaming.
I know mjpg-streamer at http://sourceforge.net/projects/mjpg-streamer/ is capable of playing streaming videos in MJPG format from JPEG files, but it doesn't look like that it can play streaming audios.
I am very new to this area, so more detailed explanation will be extremely appreciated. Thank you so much!!!
P.S. a solution/library in C++ is preferred but anything else would help as well. I am working on linux.
The browser should be able to do this natively, no? Firefox can do this certainly, if you simply give it the correct url of the streaming mjpeg source. The mjpeg stream should be properally formatted.
I figured it out. The proper way of doing it is to use ffmpeg, libav and an RTMP server, such as red5.

iPhone: streaming WMA, MP3 and AAC

I need to create a simple media player that can stream internet radio stations in WMA, MP3 and AAC formats as part of a bigger app.
I was wondering if someone could please give me some pointers on where to start and how to go about tackling each of these formats? never really handled this topic before..
Thanks!
For audio streaming on the iPhone you'll have to use the AudioQueue framework. This framework has native support for mp3 and aac but is not easy to get started with. There's an open source project by Matt Gallagher that can play mp3 and aac audio streams by using the AudioQueue framework: AudioStreamer.
If you also need to play wma audio streams you have to use the open source FFmpeg library. Decoding wma audio streams with the FFmpeg library is not that hard but integration with the AudioQueue framework for playback is not that straightforward.
If you are familiar with handling this problem in a web app, you could try having a UIWebView in your app.

possible to stream wma sound files on iPhone/iPod touch?

i searched with keyword "wma" but couldn't find similar posts, so i start this post.
My goal is to download wma files from a known website and playback those files. These wma files are recorded radio programs, a sample link looks like: mms://media.chinabroadcast.cn/eng/music/morning/2010/0825a.wma. Online streaming is acceptable by my client.
Now i'm hitting the wall with wma sound file streaming and playback, i'm wondering if it's possible on iPhone/iPod Touch?
Is it possible to play .wma files on iOS devices?
No
iPhone (and all Apple iOS devices for that matter) are not capable of playing Windows Media Audio files. You'll need to transcode or restrict the audio types to mp3 or AAC.