njovy / AppRTCDemo

Android AppRTC Demo of WebRTC project
535 stars 267 forks source link

How to handle output video rotation when do stream on android? #58

Closed AntonZorin closed 7 years ago

AntonZorin commented 7 years ago

Thanks for your sample code. Its great. My question is how to handle video rotation? Its ok when I do stream in landscape, but if I rotate the phone to portrait mode, output stream will be rotated by 90 degrees, but my local surfaceRender automatically rotates in right way. In your sample app there`s no problem with it. Can you help and tell where to dig to rotate output video?

AntonZorin commented 7 years ago

I figured out why this happens for wowza server. Maybe this will help someone. To fix issue, we need to remove string "a=extmap:4 urn:3gpp:video-orientation" from generated local sdp description and send offer with edited sdp description.