您好!
我下载、编译、安装好了NVIDIA的ffmpeg,然后运行基于 NVDEC的硬件加速解码的ffmpeg命令,输出信息如下:
ffmpeg-4.2.7-nvidia/bin# ./ffmpeg -c:v h264_nvv4l2dec -i /home/working-video/700818_023723.h264 -r 30 -y /home/working-video/video-harddec-test/video-dec%03d.jpg
ffmpeg version 4.2.7 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 7 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)
configuration: --enable-nvv4l2dec --enable-libv4l2 --enable-shared --optflags=-O3 --extra-libs=‘-L/usr/lib/aarch64-linux-gnu/tegra -lnvbuf_utils’ --extra-cflags=‘-I /usr/src/jetson_multimedia_api/include/’ --enable-rpath --prefix=/opt/nvidia/ffmpeg-4.2.7-nvidia
Stream #0:0: Video: h264 (Constrained Baseline), yuv420p(progressive), 1920x1080, 25 fps, 25 tbr, 1200k tbn, 50 tbc
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
Stream mapping:
Stream #0:0 → #0:0 (h264 (h264_nvv4l2dec) → mjpeg (native))
Output #0, image2, to ‘/home/working-video/working-video-dec/video-harddec-test/video-dec%03d.jpg’:
Metadata:
encoder : Lavf58.29.100
Stream #0:0: Video: mjpeg, yuvj420p(pc), 1920x1080, q=2-31, 200 kb/s, 30 fps, 30 tbn, 30 tbc
Metadata:
encoder : Lavc58.54.100 mjpeg
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame= 3879 fps= 18 q=24.8 Lsize=N/A time=00:02:09.30 bitrate=N/A dup=658 drop=11 speed=0.609x
硬件解码速度:speed=0.609x
我运行sudo tegrastats,显示信息中出现了 NVDEC 665 NVDEC1 665 。说明NVDEC已经在运行了。
该命令显示信息如下:
nvidia-desktop:/home/nvidia# sudo tegrastats
RAM 11128/15822MB (lfb 800x4MB) SWAP 0/7911MB (cached 0MB) CPU [55%:1420,0%:1420,45%:1420,0%:1420,5%:1420,0%:1420] EMC_FREQ 2%:1866 GR3D_FREQ 0%:114 NVDEC 665 NVDEC1 665 VIC_FREQ 0%:115 APE 150 MTS fg 0% bg 1% AO:43.5C GPU:43C PMIC:50C AUX:43C CPU:44.5C
但是我接着运行ffmpeg的软解码命令,命令如下:
nvidia-desktop:/usr/local/bin# ffmpeg -i /home/working-video/700818_023723.h264 -r 30 -y /home/working-video/video-softdec-test/video-dec%03d.jpg
ffmpeg version 4.2.7 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 7 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)
configuration: --enable-nvv4l2dec --enable-libv4l2 --extra-libs=‘-L/usr/lib/aarch64-linux-gnu/tegra -lnvbuf_utils’ --extra-cflags=‘-I /usr/src/jetson_multimedia_api/include/’
Stream #0:0: Video: h264 (Constrained Baseline), yuv420p(progressive), 1920x1080, 25 fps, 25 tbr, 1200k tbn, 50 tbc
Stream mapping:
Stream #0:0 → #0:0 (h264 (native) → mjpeg (native))
Output #0, image2, to ‘/home/working-video/working-video-dec/video-softdec-test/video-dec%03d.jpg’:
Metadata:
encoder : Lavf58.29.100
Stream #0:0: Video: mjpeg, yuvj420p(pc), 1920x1080, q=2-31, 200 kb/s, 30 fps, 30 tbn, 30 tbc
Metadata:
encoder : Lavc58.54.100 mjpeg
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame= 3879 fps= 18 q=24.8 Lsize=N/A time=00:02:09.30 bitrate=N/A dup=646 drop=0 speed=0.615x
软件解码速度:speed=0.615x 大于 硬件解码速度:speed=0.609x
请问 这个问题是怎么解析???