Video recorded from HDMI input shrinks to portrait view size

Which version of system do you use? Khadas official images, self built images, or others?

Latest official: vim4-android-11-64bit-v240620.img.xz

Please describe your issue below:

Hi,
when I record a video in an app (sport.video) in landscape, the stored video shrinks/distorts to portrait view ratio. I tried every orientation (with/without auto-rotate, different device orientations), but the video always gets stored in portrait size:

The app forces to record in landscape.
To test other views, I used an app to force the recording in other orientations. Recording in landscape had no effect and had the same result as above. Recording in portrait had a similar effect to the video, it expands/distorts the video to landscape size (already while recording).

Is there maybe a setting where I can set the camera orientation?

Thank you for your help.

Best regards
Thomas

This is the preview while recording:

hi @Thomas_S,

You can refer to the code here to use HDMIN.

The recording setting direction can be add in the Camera2Activity.java file.

mMediaRecorder.setVideoEncodingBitRate(810241920);
mMediaRecorder.setVideoFrameRate(30);
Size size = getMatchingSize();
mMediaRecorder.setVideoSize(size.getWidth(),size.getHeight());

// mMediaRecorder.setOrientationHint(90);

Surface surface = new Surface(mTextureView.getSurfaceTexture());
mMediaRecorder.setPreviewDisplay(surface);
mMediaRecorder.setOutputFile(file.getAbsolutePath());

Demo provides two ways to use HDMI-IN.
(1) Use Camera2 API interface. The Camera interface can capture and record input video data. Up to 1080P@60.
(2) Use Tv API interface. The Tv interface can only display input video data and does not support setting resolution.

Hi @william.lin,

Thank you for the quick response.

The app was not developed by me and so far I have never received a response from the developer. So I don’t have much hope that something will be adjusted in the app itself as it is not a problem with other android mobile phones.

Is there anything else I could do?

You can try changing the angle of the system camera.
Perhaps the app has made adjustments based on the camera angle.

I tried it with different devices (Laptop and Camcorder) but the orientation of the camera/output has no effect to how the video is stored.