<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br><div><div>On Feb 27, 2012, at 3:41 PM, Barry Stump wrote:</div><blockquote type="cite"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; ">I am working on an iOS project similar to what you describe: H.264 video + AAC audio with Live555 and FFmpeg handling RTSP and video decoding (respectively).  I recommend basing your work on testRTSPClient.cpp, with an Objective-C++ wrapper class as the interface between the rest of your code and the C++ Live555 library.  You will need to create one or more custom subclasses of MediaSink to handle the media streams, with the data payload being delivered in the afterGettingFrame() functions.  For AAC, an RTSP frame of data is equivalent to Core Audio's concept of an audio "packet" not an audio "frame".  On the video side, at a minimum, you will need to add the MPEG start code 0x00000001 to each frame before you hand it off to FFmpeg to decode.  See the H264VideoFileSink.cpp file for an example of this.<div>

<br></div><div>The details of using FFmpeg inside iOS are beyond the scope of this list, but the Dropcam source code may be of help to you.  Note that it also uses Live555 for RTSP handling, but uses the deprecated synchronous methods.  You are better off following the testRTSPClient example for Live555.</div>

<div><br></div><div><a href="https://github.com/dropcam/dropcam_for_iphone" target="_blank">https://github.com/dropcam/dropcam_for_iphone</a></div><span class="HOEnZb"><font color="#888888"><div><br></div></font></span><div>
<span class="HOEnZb"><font color="#888888">-Barry</font></span><div><div class="h5"><br><br><div class="gmail_quote">On Fri, Feb 24, 2012 at 4:38 PM, Brad O'Hearne <span dir="ltr"><<a href="mailto:brado@bighillsoftware.com" target="_blank">brado@bighillsoftware.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I am reaching out to anyone out there who would be willing to give me some guidance with some issues I'm running into getting the Live555 library integrated into an app I'm writing. My use case is pretty simple to understand:<br>


<br>
I am writing a mobile app (on both iOS and Android, but for the purposes of discussion here, I am addressing iOS/Objective C first), and I need to consume an RTSP stream over the network, and render the stream to the device's screen. The stream is H.264. I am developing on and targeting only iOS 5. I cannot use built-in video-playback capabilities in iOS because they support HTTP LIVE Streaming but don't support RTSP; and in addition, it would seem that the iOS API controls the source endpoints in AVFoundation, so injecting there is not an option. In this use case, I need real-time video -- minimization of latency is paramount (i.e. I do not want latency due to buffering -- I'd rather drop frames than buffer).<br>


<br>
I seem to have gotten Live555 compiled properly on iOS 5 (to the best of my knowledge), and linked in with an iOS5 app. I can even run one of the sample clients and pull this RTSP stream, which outputs info to the console using a DummySink. I also have compiled ffmpeg on iOS 5, and have that linked into my project in Xcode. So I have both Live555 and ffmpeg libraries in my Xcode project now.<br>


<br>
What I need to do is take the data received over RTSP, decode the H.264 video, and then output it to the screen. It would seem that this wouldn't be too utterly terrible. However, referencing some of these libraries / headers inside Xcode, and trying to move some of this code around into a more Objective-C friendly fashion is giving me fits.<br>


<br>
If there is anyone out there familiar with using Live555 on iOS, or anyone who can give guidance here, I would very much appreciate it. Please feel free to reply here, or contact me offline as well at <a href="mailto:brado@bighillsoftware.com" target="_blank">brado@bighillsoftware.com</a>.<br>


<br>
Regards,<br>
<br>
Brad<br>
<br>
Brad O'Hearne<br>
Founder / Lead Developer<br>
Big Hill Software LLC<br>
<a href="http://www.bighillsoftware.com/" target="_blank">http://www.bighillsoftware.com</a><br>
<br>
<br>
_______________________________________________<br>
live-devel mailing list<br>
<a href="mailto:live-devel@lists.live555.com" target="_blank">live-devel@lists.live555.com</a><br>
<a href="http://lists.live555.com/mailman/listinfo/live-devel" target="_blank">http://lists.live555.com/mailman/listinfo/live-devel</a><br>
</blockquote></div><br></div></div></div>
</blockquote></div><br>
_______________________________________________<br>live-devel mailing list<br><a href="mailto:live-devel@lists.live555.com">live-devel@lists.live555.com</a><br>http://lists.live555.com/mailman/listinfo/live-devel<br></blockquote></div><br></div></body></html>