blob: 688d497cb5c6cb3cfd3360f235fd35d952078e00 [file] [log] [blame] [view]
David Staessens38dba3c2020-05-26 08:56:271# Video Encoder tests
2The video encoder tests are a set of tests that validate various video encoding
David Staessensa3ed4f22020-05-29 05:20:503scenarios. They are accompanied by the video encoder performance tests that can
4be used to measure a video encoder's performance.
5
6These tests run directly on top of the video encoder implementation, and
David Staessens38dba3c2020-05-26 08:56:277don't require the full Chrome browser stack. They are built on top of the
8[GoogleTest](https://github.com/google/googletest/blob/master/README.md)
9framework.
10
11__Note:__ Currently these tests are under development and functionality is still
12limited.
13
14[TOC]
15
16## Running from Tast
17Running these tests from Tast is not supported yet.
18
19## Running manually
20To run the video encoder tests manually the _video_encode_accelerator_tests_
21target needs to be built and deployed to the device being tested. Running
22the video encoder tests can be done by executing:
23
24 ./video_encode_accelerator_tests [<video path>] [<video metadata path>]
25
26e.g.: `./video_encode_accelerator_tests bear_320x192_40frames.yuv.webm`
27
David Staessensa3ed4f22020-05-29 05:20:5028Running the video encoder performance tests can be done in a smilar way by
29building, deploying and executing the _video_encode_accelerator_perf_tests_
30target.
31
32 ./video_encode_accelerator_perf_tests [<video path>] [<video metadata path>]
33
34e.g.: `./video_encode_accelerator_perf_tests bear_320x192_40frames.yuv.webm`
35
David Staessens38dba3c2020-05-26 08:56:2736__Test videos:__ Various test videos are present in the
37[_media/test/data_](https://cs.chromium.org/chromium/src/media/test/data/)
38folder in Chromium's source tree (e.g.
39[_bear_320x192_40frames.yuv.webm_](https://cs.chromium.org/chromium/src/media/test/data/bear_320x192_40frames.yuv.webm)).
40These videos are stored in compressed format and extracted at the start of each
41test run, as storing uncompressed videos requires a lot of disk space. Currently
42only VP9 or uncompressed videos are supported as test input. If no video is
43specified _bear_320x192_40frames.yuv.webm_ will be used.
44
45__Video Metadata:__ These videos also have an accompanying metadata _.json_ file
46that needs to be deployed alongside the test video. The video metadata file is a
47simple json file that contains info about the video such as its pixel format,
48dimensions, framerate and number of frames. These can also be found in the
49_media/test/data_ folder (e.g.
50[_bear_320x192_40frames.yuv.webm.json_](https://cs.chromium.org/chromium/src/media/test/data/bear_320x192_40frames.yuv.webm.json)).
51If no metadata file is specified _\<video path\>.json_ will be used.
52
53## Command line options
54Multiple command line arguments can be given to the command:
55
David Staessens96a00082020-06-01 01:46:3656 --codec codec profile to encode, "h264 (baseline)",
57 "h264main, "h264high", "vp8" and "vp9"
David Staessensb0a95282020-06-11 00:46:3358
David Staessens38dba3c2020-05-26 08:56:2759 -v enable verbose mode, e.g. -v=2.
60 --vmodule enable verbose mode for the specified module,
61 e.g. --vmodule=*media/gpu*=2.
David Staessensb0a95282020-06-11 00:46:3362
David Staessens38dba3c2020-05-26 08:56:2763 --gtest_help display the gtest help and exit.
64 --help display this help and exit.
65
David Staessensb0a95282020-06-11 00:46:3366Non-performance tests only:
67
68 --disable_validator disable validation of encoded bitstream.
69
David Staessens38dba3c2020-05-26 08:56:2770## Source code
71See the video encoder tests [source code](https://cs.chromium.org/chromium/src/media/gpu/video_encode_accelerator_tests.cc).
David Staessensa3ed4f22020-05-29 05:20:5072See the video encoder performance tests [source code](https://cs.chromium.org/chromium/src/media/gpu/video_encode_accelerator_perf_tests.cc).
David Staessens38dba3c2020-05-26 08:56:2773