Hi,
We encode H.264 and H.265 in MMAPI, and find the H.265 encoding much faster than H.264. The H.265 encoding can up to 200 fps, but the H.264 only up to 140 fps, the video resolution is 1080p, both in slow preset.
I test it by 01_video_enocde as follows:
1.H.265
time ./video_encode /run/testa265.yuv 1920 1080 H265 1.265 -br 2000000 -p main -rc vbr -hpt 4
Failed to query video capabilities: Inappropriate ioctl for device
NvMMLiteOpen : Block : BlockType = 8
===== MSENC =====
NvMMLiteBlockCreate : Block : BlockType = 8
892744264
842091865
===== NVENC blits (mode: 1) into block linear surfaces =====
Could not read complete frame from input file
File read complete.
App run was successful frame cnt:1287
real 0m6.262s
user 0m3.568s
sys 0m2.380s
2.H.264
time ./video_encode /run/testa265.yuv 1920 1080 H264 1.264 -br 2000000 -p high -rc vbr -hpt 4
Failed to query video capabilities: Inappropriate ioctl for device
NvMMLiteOpen : Block : BlockType = 4
===== MSENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
875967048
842091865
===== MSENC blits (mode: 1) into tiled surfaces =====
Could not read complete frame from input file
File read complete.
App run was successful frame cnt:1287
real 0m8.866s
user 0m4.012s
sys 0m3.264s
The yuv file have 1287 fames, it is stored in “/run/”, this path is in RAM.
I have some questions:
- Why is the H.265 encoding much faster than H.264?
2.Is the h.265 encoder not set to the highest quality mode (slow preset)? I worry affects encoding quality.
Is there any advice?
Thanks!