rFlex / SCRecorder

iOS camera engine with Vine-like tap to record, animatable filters, slow motion, segments editing
Apache License 2.0
3.06k stars 583 forks source link

Video orientation wrong with SCSwipeableFilterView #307

Closed Bragegs closed 8 years ago

Bragegs commented 8 years ago

Hey! Trying to show video from imagepicker with SCSwipeableFilterView in a portrait only app.

imagePicker: image

Initiating SCRecorder with these two: recorder.autoSetVideoOrientation = false; recorder.videoOrientation = AVCaptureVideoOrientation.Portrait;

Getting video from imagepicker //VideoURL from imagePicker; let segment = SCRecordSessionSegment(URL: videoURL, info: nil); self.session.addSegment(segment); Showing video with this code with scplayer and scswipeablefilterview

let videoAsset = segment.asset; player.setSmoothLoopItemByAsset(videoAsset, smoothLoopCount: 5);

SCPlayer with SCSwipeableView: image

printing the asset video orientation gives me uilandscaperight, it is saved from snapchat. Anyone knows what I am doing wrong? (And does anyone have experience in rotating avassets?)

mitchellporter commented 8 years ago

@Bragegs If the issue was closed because you solved the problem, then you should post a quick solution so that in the future other devs can save time.

Bragegs commented 8 years ago

Instead of needing to have the right orientation when the view appears, I added functionality to rotate the video if the user wants to. Made a document on how I did it. Feel free to improve

Note on rotating and exporting

khush004 commented 5 years ago

@Bragegs Can you please provide solution? as I am facing the same issue.