WowzaMediaSystems / gocoder-sdk-samples-ios

Sample apps for iOS that demonstrate the capabilities of the Wowza GoCoder™ SDK.
https://www.wowza.com/products/gocoder/sdk
Other
37 stars 14 forks source link

camera preview frame inconsistencies #14

Open jarrodparkes opened 5 years ago

jarrodparkes commented 5 years ago

i'm trying to understand the camera preview size in the SDKSamplePlayerApp. i'm using an iPhone 8 with a screen resolution of 750x1334 when in portrait.

when you open the app the first time, the video settings are preset at 640x480 (Medium) 1.5mbps with the broadcast scale mode to Aspect Fit. attached is an image of what expect (750 x 562.5, PURPLE) versus what i'm seeing (750 x 1000, RED)

640-480-expectation

mrossesf commented 5 years ago

As I understand it, the 640x480 is when in landscape. When flipped to portrait, it becomes 480x640. Hence, the result of 750x1000 when using Aspect Fit.

jarrodparkes commented 5 years ago

@mrossesf if that were the case, then wouldn't flipping the default settings to 480x640 make the frame the correct size (indicated by the purple box)?

i've tried setting the video to 480x640. given your description, this would cause the portrait frame to become 750 x 562.5 (my expected outcome); however when i hold the phone in preview orientation while using those settings, the camera preview takes up the entire iPhone screen which is 750x1334 — this also seems completely wrong