fyhertz / libstreaming

A solution for streaming H.264, H.263, AMR, AAC using RTP on Android
Apache License 2.0
3.49k stars 1.08k forks source link

Streaming video is rotated #96

Closed serpro closed 9 years ago

serpro commented 9 years ago

I tried the example3 from your code, and the camera is rotated 90 CCW, but on Wowza the video is rotated 90 CW!. I used the code from here: http://stackoverflow.com/questions/3841122/android-camera-preview-is-sideways to fix the rotation in the preview, but the video on the server is still rotated (Tested with Nexus 7 Running Android Lollipop and OnePlus One Running 4.4.4).

Any suggestions?

tneginareb commented 9 years ago

Explore "libstreaming" library then go to:

  1. VideoStream.java class
  2. Find createCamera() method, replace "mCamera.setDisplayOrientation(mOrientation);" with mCamera.setDisplayOrientation(90);
  3. Find updateCamera(), replace "mCamera.setDisplayOrientation(mOrientation);" with "mCamera.setDisplayOrientation(90);"