Video playback on iPhone

Asked 2 years ago, Updated 2 years ago, 98 views

I'd like to play a file encoded by ffmpeg from a video obtained by a raspy camera on my iPhone, but can I play an mp4 file generated by ffmpeg?
Since the iPhone can play mp4 format, do I need a decoder to make an application for playback on the iPhone side?
If necessary, please let me know which decoder you can use.

ios iphone

2022-09-30 19:16

1 Answers

Simply pass the file path to the MPMoviePlayerViewController and use QuickTime to play standard video files.

MPMoviePlayerViewController*controller=[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL fileURLWithPath:filePath]];
controller.moviePlayer setMovieSourceType:MPMovieSourceTypeFile;
[controller.moviePlayer setRepeatMode:YES];
controller.moviePlayer prepareToPlay;
self presentMoviePlayerViewControllerAnimated: controller;


2022-09-30 19:16

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.