swiftで動画を90度回転させたいのですが方法が分かりません。
下記のようにassartTrackを入れれば良いように思うのですが、特にAVMutableVideoCompositionLayerInstruction,AVMutableVideoCompositionLayerInstructionの使い方が分かりません。
var t: CGAffineTransform = trackVideo.preferredTransform
t.b = 1.0
t.c = -1.0
var a_videolayerInstruction: AVMutableVideoCompositionLayerInstruction =
AVMutableVideoCompositionLayerInstruction(assetTrack: assetTrack)
a_videolayerInstruction.setTransform(myTransform, atTime:kCMTimeZero)
a_videoInstruction.layerInstructions = ["a_videolayerInstruction"]
a_videoInstruction.timeRange = assetTrack.timeRange
何か参考になる情報でも幸いです。
国内、海外などのサイトも探しましたがswiftで直接コードになっているものを見つけることが出来ませんでした。
よろしくお願いします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。