1
votes

In my project I used ffmpeg library for udp-streaming or remote play for mp4 video file.

But usually I also used to use AVPlayer https://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVPlayer_Class/index.html for playing mp4 or phasset.

Would it be possible or someone make it to play remote mp4 video with AVPlayer?

If it is NOT possible, Could you please explain for me why?

Thanks.

SOLVED

It is possible as @Andrey mentioned. and I used https://developer.apple.com/library/ios/samplecode/AVPlayerDemo/History/History.html#//apple_ref/doc/uid/DTS40010101-RevisionHistory-DontLinkElementID_1 sample code.

1
It's totally possible to play remote mp4 with AVPlayer. Just provide a url in the AVPlayer instance. However, I don't understand how you relate ffmpeg to AVPlayer in your question.Andrey
@Andrey Ok, I found it and it really works. In my project I used ffmpeg library to show udp streaming camera preview from server and in video player also. As you know FFmpeg can decode any codec and at the first time I thought the video from the server can't played with AVPlayer because of codec problem so I implemented it with ffmpeg.Hwangho Kim
Great! AVPlayer is very powerful.. so you don't need to mess with a lower level decoding items.Andrey
@Andrey Right. But if someday I need to make a video player which supports several codec then I should use ffmpeg and OpenGL...Hwangho Kim
I had to use ffmpeg for encoding of livestream from camera in order to send data to our backend. Never had to use it for actual playback so far.Andrey

1 Answers

1
votes

It's totally possible to play remote mp4 with AVPlayer. Just provide a url in the AVPlayer instance.