Using AVPlayer in a Mac app here to play random videos in fullscreen from a folder, but when I try to play .vob files or .mpg files I just get a black screen that lasts as long as the video lasts.
Does AVFoundation not support playback from these containers? I figured that since they were playable with stock QuickTime Player they would also work with AVPlayer.
The AVURLAsset class has a static methods that you can query for supported video UTIs:
+ (NSArray *)audiovisualTypes
On 10.9.1 it returns these system defined UTIs:
Here is an explanation of system UTIs. So it seems that at least the .mpg container should be supported.
According to wiki, .mpg files can contain MPEG-1 or MPEG-2 video, but only MPEG-2 video is supported. So maybe that's why the file loads but nothing is displayed.
QuickTime internally uses QTMovieModernizer in order to play videos in legacy formats (as mentioned in this WWDC session), so maybe you can look into that. It even has a method for determining if a file needs to be modernized:
+ requiresModernization:error: