FFMPEG Video Encoding Settings for iOS/iPhone/iPad

What is the recommended FFMPEG settings for encoding a video which can play on all apple devices, old and new.

I would like the format to be in mp4 so that the video file is also compatible to android, windows (phone / pc) and linux.


These are the current settings I have used and they do not work on iOS, These settings work great on Windows and Android but not on iOS.

Code Block
ffmpeg -i input_video.mp4 -c:v libx264 -crf 23 -profile:v baseline -level 3.0 -pix_fmt yuv420p -c:a aac -ac 2 -b:a 128k -movflags faststart -o output_video.mp4


I'm new to developing for iPhone/iOS.

so thanks in advance.

I tried all combinations and search through Google and StackOverflow with little help.

Finally I got h.265 work with this:

ffmpeg -i input.mov -vcodec hevc_videotoolbox -b:v 6000k -tag:v hvc1 -c:a eac3 -b:a 224k output.mov

from Brandur ( https://brandur.org/fragments/ffmpeg-h265 )

FFMPEG Video Encoding Settings for iOS/iPhone/iPad
 
 
Q