This is a sample android application for encoding AVC/HEVC streams with B-Frames enabled. It uses MediaRecorder APIs to record B-frames enabled video from camera2 input and MediaCodec APIs to encode reference test vector using input surface.
This page describes how to get started with the Encoder App.
This page describes how to get started with the Encoder App and how to run the tests for it.
# Getting Started
@@ -33,6 +33,17 @@ adb shell am start -n "com.android.media.samplevideoencoder/com.android.media.sa
After installing the app, a TextureView showing camera preview is dispalyed on one third of the screen. It also features checkboxes to select either avc/hevc and hw/sw codecs. It also has an option to select either MediaRecorder APIs or MediaCodec, along with the 'Start' button to start/stop recording.
# Running Tests
The app also contains a test, which will test the MediaCodec APIs for encoding avc/hevc streams with B-frames enabled. This does not require us to use application UI.
## Running the tests using atest
Note that atest command will install the SampleVideoEncoder app on the device.
Command to run the tests:
```
atest SampleVideoEncoder
```
# Ouput
@@ -40,3 +51,6 @@ The muxed ouptput video is saved in the app data at: