A specific MP4 file is not playable with avfoundation in iOS I have an mp4 video file that I want to play it in iOS using avfoundation. Unfortunately, the file is not being played and save into the default gallery (photos) even it has h264 video codec and aac audio codec. And it is only playable when I reencode it using ffmpeg. I want to know why the file only becomes playable after reencoding the video?
Not Playable(originalFile.mp4) vs Playable File(outputFile.mp4) Information Comparison

File is playable with avfoundation when these commands are being applied:

ffmpeg -y -hide_banner -i originalFile.mp4 -f mp4 -vcodec h264 -vf scale=out_color_matrix=bt709 -color_primaries bt709 -color_trc bt709 -colorspace bt709 -b:v 5703k -acodec aac -b:a 249k outputFile.mp4

ffmpeg -y -hide_banner -i originalFile.mp4 -f mp4 -vcodec h264 -acodec aac outputFile.mp4


File is not playable with avfoundation when this command is being applied:

ffmpeg -y -hide_banner -i originalFile.mp4 -f mp4 -vcodec copy -acodec aac outputFile.mp4

originalFile.mp4 file link: https://drive.google.com/file/d/1-yZFL0EsLztMIfwU79Al6dv8gdwJyGAD/view?usp=sharing
ffprobe streams of both files are here
https://www.diffchecker.com/VgZL66QB
The original video is an old, interlaced format.  At least, according to the line that says, &quot;smpte170m/bt470bg/bt709.&quot;  The SMPTE standard is available for purchase here, but you can tell from the summary that it's interlaced.
The second ffmpeg command is copying the format without re-encoding, or handling the interlacing, which isn’t supported on iOS.  The first set of commands work because the video is being re-encoded. Whether or not the video is automatically being de-interlaced, I can’t say without seeing, but I doubt it.  See my answer to this question to judge for yourself.