Before posting my question, I tried with this post.
Currently I am migrating my project from MPMoviewPlayer
to AVPlayer
.
In that moment Video file not played if I changed name with French characters. AVURLAsset will return empty tracks array.
Also, asset.playable
returns NO
.
Here is my code :
NSURL *videoURL = [NSURL fileURLWithPath:videoFilePath];
videoURL = [NSURL fileURLWithPath:videoFilePath isDirectory:NO];
AVURLAsset *asset = [AVURLAsset URLAssetWithURL:videoURL options:nil];
if([asset tracksWithMediaType:AVMediaTypeVideo].count == 0) {
NSLog(@"No Video Track");
} else if([asset tracksWithMediaType:AVMediaTypeAudio].count == 0) {
NSLog(@"No Audio Track");
}
If you observe my File path Users/Axio-Mac/Library/Developer/CoreSimulator/Devices..../Library/Caches/AppFiles/première journée French_accent File name â ê i-xiufm2.mp4
you can see french accented characters. Is that the impact ?