Video playback on iPhone

Asked 1 years ago, Updated 1 years ago, 84 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.