Вопрос

I have an AVMutableComposition track which I am rotating 180 degrees as follows :

if (shouldRotate) {

    //Code to rotate original main video 180 degrees if required.
    CGAffineTransform transform = CGAffineTransformMakeRotation(M_PI);
    a_compositionVideoTrack.preferredTransform = transform;

}

This works well and when I view the video or upload to YouTube it is correctly rotated. However when I upload to Facebook the video is upside down - it seems that Facebook does not care about / read the preferredTransform flag.

Can anyone suggest how I might fix this ? Just for extra information I am using the Facebook SDK for iOS to upload the videos.

Thank you in advance !

EDIT Actually this seems to be a bug either on Facebook or in the Facebook sdk. If I rotate by 90 degrees it works. If anyone can shed any light please do.

Это было полезно?

Решение

This seems to be a bug - the only solution is to rotate the video once uploaded in Facebook itself.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top