Ich habe mich mit verschiedenen Aspekten des Problems der Steuerung der Videoausrichtung während und nach der Aufnahme auf einem iOS-Gerät beschäftigt. Dank vorheriger Antworten und Dokumentation von Apple konnte ich es herausfinden. Aber jetzt, da ich etwas Video auf eine Website pushen möchte, stoße ich auf bestimmte Probleme. Ich habe dieses Problem insbesondere in this question skizziert, und the proposed solution stellt sich heraus, dass die Ausrichtung Optionen während der Videokodierung festgelegt werden müssen.iOS AVFoundation: Einstellung der Ausrichtung des Videos
Das mag sein, aber ich habe keine Ahnung, wie man das macht. Die Dokumentation zur Einstellung der Ausrichtung bezieht sich auf die richtige Einstellung für die Anzeige auf dem Gerät, und ich habe den Hinweis found here. implementiert. Dieser Hinweis behandelt jedoch nicht die korrekte Ausrichtung von Nicht-Apple-Software wie VLC oder dem Chrome-Browser .
Kann jemand einen Einblick geben, wie man die Ausrichtung auf dem Gerät richtig einstellt, so dass es für alle Anzeigesoftware korrekt angezeigt wird?
Die aktuellen Daten hat immer statisch Orientierung während der Aufnahme. Die Ausrichtung wird im 'preferredTransform'-Wert gespeichert. Also, ich denke, Sie müssen Video exportieren, um die Daten zu drehen. Ich würde mir 'AVAssetExportSession'' AVMutableVideoComposition' 'setTransform: atTime:' anschauen, das könnte helfen. – Davyd
Ich habe eine technische Support-Anfrage in Apple, um dies herauszufinden. Aber ich werde einen Blick darauf werfen, wie Sie vorschlagen. Wäre das ein separater Kodierungsschritt, nachdem das Video aufgenommen wurde? Das könnte rechenintensiv sein ... –
Ja, das wäre ein zusätzlicher Schritt. Es kann jedoch nicht so teuer sein, wenn Sie exportieren, ohne die ursprüngliche Codierung zu ändern. Lassen Sie es mich wissen, wenn Sie eine bessere Lösung finden. – Davyd