7
votes

im creating app with using camera in it to record video, and I have problem with Nexus 7 2012 (don't have this problem on 2013) that recorded video (preview works right) on it is vertically flipped (I mean when you keep it in portrait position), not like on other devices, which flip it horizontally. "setRotation" parameter depends from screen rotation on that moment. Does any body had this problem and have solution? Actually I always can hardcode extra rotation for video on nexus 7 2012, but this problem can be repeated on other devices

I've tried solution which I got below, to turn video just for this device

if (Build.PRODUCT.equals("grouper") || Build.PRODUCT.equals("tilapia"))
            angle-=180;

After this I've got results, that video is still flipped upside-down if you record in portrait, OK, it can be problem that I use bad product name. But, I've got information that if you record video in landscape, turned for 90 degrees clockwise, you get right results clockwise-correct And if you turn device not clockwise for 90 degrees it doesnt rotate video after not-clockwise-incorrect

This app works perfect on all other devices I've tested, even Nexus 7 2013, but it does this things on Nexus 7 2012. Does any body know any specific problems with this device?

1
It is not clear what your problem is. Maybe you can post some images to illustrate your question?Alex Cohn
can you add some code and maybe some images? i can not understanduser5365803

1 Answers

0
votes

Android has some fairly well documented and unresolved bugs around media recording and playback, particularly on older Nexus devices. Try setting an orientation hint for the Nexus 7 and others which have this problem. Also play the problem videos back on a PC in VLC for example to make sure it's not just the player that's an issue. The 2012 N7 is a bit of a dinosaur at this stage anyways :)

String model = android.os.Build.MODEL;
if (!model.equals("Whatever the N7 is actually called"))
{
    mMediaRecorder.setOrientationHint(90);
}

Here is more info regarding similar issues