Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to record videos in HEVC in Android #83

Open
arianaa30 opened this issue Nov 3, 2021 · 0 comments
Open

How to record videos in HEVC in Android #83

arianaa30 opened this issue Nov 3, 2021 · 0 comments

Comments

@arianaa30
Copy link

I trying to write a simple video app in Android that captures video and saves it locally. Looking at the recorded videos on my device, apparently it uses H264 AVC1 codec by default. I know my particular device supports HEVC (Samsung S10). How can I record videos using H265 (probably first check if it supports HEVC through some API, then do it)?

This is what I use right now to capture video with camera. It doesn't specify the codec to use.

       private void recordVideo() {
            Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
    
            fileUri = getOutputMediaFileUri(MEDIA_TYPE_VIDEO);
    
            // set video quality
            intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1);
    
            intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri); // set the video file name
    
            // start the video capture Intent
            startActivityForResult(intent, CAMERA_CAPTURE_VIDEO_REQUEST_CODE);
        }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant