0

I'm building a player for a video stream that is transported over HTTP. The source of the stream is a third-party provider and I have no control over them. It looks like their feed is almost compliant with decoders provided by AVFonudation and AVPlayer. But often there is a frame that breaks the built-in decoder and it never recovers. Same stream plays fine on the Mac with VLC Player or MPlayer.

Since there is an incompatibility between AVPlayer and the source of the feed, and considering how much of a black-box AVPlayer is, I am looking for a third-party library that I could use in my application instead of the rigid and undebuggable AVPlayer.

I know there is a port of VLC Player for iOS but it is very tricky to build it. I'm looking for something well documented and flexible like MPlayer but in a form of a library instead of a separate stand-alone application, like libvlc.

Any hints or links will be much appreciated.

evolvah
  • 625
  • 4
  • 15

1 Answers1

1

Turns out the good old FFMPEG can be compiled and used successfully on the iOS platform. Build is not very difficult if you are familiar with GCC tool chain and the arguments that it uses. Building it on OSX for armv7, armv7s, and i386 takes about 30 minutes. Then, you can use the result on real Apple hardware, as well as in iOS simulator.

Marrying ffmpeg and Apple proprietary interfaces for video and, especially, audio is a challenge but it is doable. I was able to get an iPad to decode the third-party stream that has video in H264 and audio in AAC with all the decoding being done in ffmpeg and a couple of simple hand-written adapters.

Besides, ffmpeg license is more flexible than VLC, and to some it may open up new possibilities.

evolvah
  • 625
  • 4
  • 15