0

I have an issue with video recording on S4.

What I need is front facing recording with good quality/size ratio. What I do is set CameraProfile to QUALITY_480P and that is basically all (video size is about 3MB). Everything is working except on S4 which works only on QUALITY_HIGH (not even on QUALITY_LOW). What more same video length has over 50MB on high.

Preview on S4 is OK, but recorded video looks like the image below. All I do is basically this (I use cwac, but this is my debug code):

CamcorderProfile profile = CamcorderProfile.get(cameraId, 
    CamcorderProfile.QUALITY_HIGH);
recorder.setProfile(profile);

video output

Any way to fix this please?

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
bakua
  • 13,704
  • 7
  • 43
  • 62

1 Answers1

0

OK so I found that this happens when you try to record with front facing camera in portrait mode. What really messes up encoded video is recorder.setOrientationHint(). This line is kind of needed, without it the recorded video is 90 degrees rotated.

That means one issue is fixed. Now I need to how to rotate recoded video.

bakua
  • 13,704
  • 7
  • 43
  • 62
  • Hi, I did but I don't remember how. I assume that you are using CWAC. Try to use https://github.com/steelkiwi/AndroidRecording instead, just to check if it helps your case (if possible). – bakua Dec 29 '14 at 15:56
  • I had the same problem with my Galaxy Note 10.1 tablet using Android's camera api. However, setting the orientation worked. In my case it was due to the previewsize; initially I used getSupportedPreviewSizes().get(0) which worked, afterwards I tried to calculate te best preview size for my tablet's aspect ratio -> strange artifacts. – Matthias Nov 04 '15 at 20:28