Ahmet
Ahmet

Reputation: 11

iOS SDK mms video streaming

Basically, I want to stream and play a MMS video with iOS SDK. I can stream some videos with MPMovieplayer but not MMS or RSTP. I researched this, but I couldn't find a clear solution. Can anybody help me?

I tried VLC Mobile: http://wiki.videolan.org/MobileVLC Dropcam: https://github.com/dropcam/dropcam_for_iphone

But I am unable to use these options.

Upvotes: 1

Views: 2025

Answers (2)

Mat
Mat

Reputation: 7633

You can take a look at Apple Http Live Streaming. Some docs here.

Upvotes: 1

Tarum
Tarum

Reputation: 161

You should use ffmpeg library, as this library can connect any streaming server (supporting rtsp, mms, tcp, udp ,rtmp ...) and then draw pictures to the screen.. (for drawing you can use opengles or uiimage also works)

First of all, use avformat_open_input to connect to your ip address then use avcodec_find_decoder & avcodec_open2 to find codecs and to open them (you should call them for both audio & video)

Then, in a while loop read packets from server by using av_read_frame method When you get frame, if it is audio then sent it to AudioUnit or AudioQueue, if it is video, then convert it from yuv to rgb format by using sws_scale method and draw the picture to the screen.

That's all.

look at this wrapper also (http://www.videostreamsdk.com), it's written on ffmpeg library and supports iOS

Upvotes: 1

Related Questions