232114819 / spydroid-ipcamera

Automatically exported from code.google.com/p/spydroid-ipcamera
0 stars 0 forks source link

Camera stream rotated #63

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Phone on vertical position

What is the expected output? What do you see instead?
Camera feed is rotated by 90 degrees

What version of the product are you using? On what operating system?
Galaxy Nexus - 4.0.4
Sony Xperia S - 4.0.4

Please provide any additional information below.
No problem when phone is at horizontal position

Original issue reported on code.google.com by tassos.t...@gmail.com on 23 Jul 2012 at 9:46

GoogleCodeExporter commented 8 years ago
Check out line 239 in RtspServer.java (I am using spydroid 3.4)

// ROTATION
else if (param.getName().equals("rotation")) {
   streamManager.defaultVideoQuality.orientation = Integer.parseInt(param.getValue());
}

Original comment by ted.guen...@gmail.com on 24 Aug 2012 at 3:12

GoogleCodeExporter commented 8 years ago
Thanks for the answer. 
I am using 4.1 and there is no such parameter

Original comment by tassos.t...@gmail.com on 18 Oct 2012 at 5:14

GoogleCodeExporter commented 8 years ago
Yep, i removed it because it was useless, the stream can't be rotated with the 
MediaRecorder API: 

This is the doc for setOrientationHint: "This method will not trigger the 
source video frame to rotate during video recording, but to add a composition 
matrix containing the rotation angle in the output video if the output format 
is OutputFormat.THREE_GPP or OutputFormat.MPEG_4 so that a video player can 
choose the proper orientation for playback."

So it has to be rotated by whatever you're using on the client side.
For instance you can start VLC with "--video-filter=rotate --rotation-angle=90" 
to perform a 90 degree rotation.

Original comment by FyHertz on 19 Oct 2012 at 2:57