瑞萨RZ/G2L是一款工业领域高性能、超高效的芯片,具备丰富多媒体功能,显示、摄像头、音频接口资源丰富,满足人机交互和图像采集需求,适用于工业HMI、医疗、工业自动化、电力、显控终端等场景。
本篇就以搭建ffmpeg开发环境以及性能的测试为例,体验该开发板在多媒体等领域的应用。
以下基于WIN11+WSL2环境进行开发,需要安装必备的工具链比如aarch64-linux-gnu-等,这些不再赘述。
git clone https://github.com/FFmpeg/FFmpeg.git
cd FFmpeg/
(注意要先创建/home/lhj/opt/ffmpeg/board文件夹)
WARNING: aarch64-linux-gnu-pkg-config not found, library detection may fail.
make
make install
文件如下
lhj@lhj:~/FFmpeg$ tree /home/lhj/opt/ffmpeg/board/
/home/lhj/opt/ffmpeg/board/
|-- bin
| |-- ffmpeg
| `-- ffprobe
|-- include
| |-- libavcodec
| | |-- ac3_parser.h
| | |-- adts_parser.h
| | |-- avcodec.h
| | |-- avdct.h
| | |-- avfft.h
| | |-- bsf.h
| | |-- codec.h
| | |-- codec_desc.h
| | |-- codec_id.h
| | |-- codec_par.h
| | |-- d3d11va.h
| | |-- defs.h
| | |-- dirac.h
| | |-- dv_profile.h
| | |-- dxva2.h
| | |-- jni.h
| | |-- mediacodec.h
| | |-- packet.h
| | |-- qsv.h
| | |-- vdpau.h
| | |-- version.h
| | |-- version_major.h
| | |-- videotoolbox.h
| | |-- vorbis_parser.h
| | `-- xvmc.h
| |-- libavdevice
| | |-- avdevice.h
| | |-- version.h
| | `-- version_major.h
| |-- libavfilter
| | |-- avfilter.h
| | |-- buffersink.h
| | |-- buffersrc.h
| | |-- version.h
| | `-- version_major.h
| |-- libavformat
| | |-- avformat.h
| | |-- avio.h
| | |-- version.h
| | `-- version_major.h
| |-- libavutil
| | |-- adler32.h
| | |-- aes.h
| | |-- aes_ctr.h
| | |-- ambient_viewing_environment.h
| | |-- attributes.h
| | |-- audio_fifo.h
| | |-- avassert.h
| | |-- avconfig.h
| | |-- avstring.h
| | |-- avutil.h
| | |-- base64.h
| | |-- blowfish.h
| | |-- bprint.h
| | |-- bswap.h
| | |-- buffer.h
| | |-- camellia.h
| | |-- cast5.h
| | |-- channel_layout.h
| | |-- common.h
| | |-- cpu.h
| | |-- crc.h
| | |-- csp.h
| | |-- des.h
| | |-- detection_bbox.h
| | |-- dict.h
| | |-- display.h
| | |-- dovi_meta.h
| | |-- downmix_info.h
| | |-- encryption_info.h
| | |-- error.h
| | |-- eval.h
| | |-- ffversion.h
| | |-- fifo.h
| | |-- file.h
| | |-- film_grain_params.h
| | |-- frame.h
| | |-- hash.h
| | |-- hdr_dynamic_metadata.h
| | |-- hdr_dynamic_vivid_metadata.h
| | |-- hmac.h
| | |-- hwcontext.h
| | |-- hwcontext_cuda.h
| | |-- hwcontext_d3d11va.h
| | |-- hwcontext_drm.h
| | |-- hwcontext_dxva2.h
| | |-- hwcontext_mediacodec.h
| | |-- hwcontext_opencl.h
| | |-- hwcontext_qsv.h
| | |-- hwcontext_vaapi.h
| | |-- hwcontext_vdpau.h
| | |-- hwcontext_videotoolbox.h
| | |-- hwcontext_vulkan.h
| | |-- imgutils.h
| | |-- intfloat.h
| | |-- intreadwrite.h
| | |-- lfg.h
| | |-- log.h
| | |-- lzo.h
| | |-- macros.h
| | |-- mastering_display_metadata.h
| | |-- mathematics.h
| | |-- md5.h
| | |-- mem.h
| | |-- motion_vector.h
| | |-- murmur3.h
| | |-- opt.h
| | |-- parseutils.h
| | |-- pixdesc.h
| | |-- pixelutils.h
| | |-- pixfmt.h
| | |-- random_seed.h
| | |-- rational.h
| | |-- rc4.h
| | |-- replaygain.h
| | |-- ripemd.h
| | |-- samplefmt.h
| | |-- sha.h
| | |-- sha512.h
| | |-- spherical.h
| | |-- stereo3d.h
| | |-- tea.h
| | |-- threadmessage.h
| | |-- time.h
| | |-- timecode.h
| | |-- timestamp.h
| | |-- tree.h
| | |-- twofish.h
| | |-- tx.h
| | |-- uuid.h
| | |-- version.h
| | |-- video_enc_params.h
| | `-- xtea.h
| |-- libswresample
| | |-- swresample.h
| | |-- version.h
| | `-- version_major.h
| `-- libswscale
| |-- swscale.h
| |-- version.h
| `-- version_major.h
|-- lib
| |-- libavcodec.a
| |-- libavdevice.a
| |-- libavfilter.a
| |-- libavformat.a
| |-- libavutil.a
| |-- libswresample.a
| |-- libswscale.a
| `-- pkgconfig
| |-- libavcodec.pc
| |-- libavdevice.pc
| |-- libavfilter.pc
| |-- libavformat.pc
| |-- libavutil.pc
| |-- libswresample.pc
| `-- libswscale.pc
`-- share
|-- doc
| `-- ffmpeg
| |-- bootstrap.min.css
| |-- community.html
| |-- default.css
| |-- developer.html
| |-- faq.html
| |-- fate.html
| |-- ffmpeg-all.html
| |-- ffmpeg-bitstream-filters.html
| |-- ffmpeg-codecs.html
| |-- ffmpeg-devices.html
| |-- ffmpeg-filters.html
| |-- ffmpeg-formats.html
| |-- ffmpeg-protocols.html
| |-- ffmpeg-resampler.html
| |-- ffmpeg-scaler.html
| |-- ffmpeg-utils.html
| |-- ffmpeg.html
| |-- ffprobe-all.html
| |-- ffprobe.html
| |-- general.html
| |-- git-howto.html
| |-- libavcodec.html
| |-- libavdevice.html
| |-- libavfilter.html
| |-- libavformat.html
| |-- libavutil.html
| |-- libswresample.html
| |-- libswscale.html
| |-- mailing-list-faq.html
| |-- nut.html
| |-- platform.html
| `-- style.min.css
|-- ffmpeg
| |-- examples
| | |-- Makefile
| | |-- README
| | |-- avio_http_serve_files.c
| | |-- avio_list_dir.c
| | |-- avio_read_callback.c
| | |-- decode_audio.c
| | |-- decode_filter_audio.c
| | |-- decode_filter_video.c
| | |-- decode_video.c
| | |-- demux_decode.c
| | |-- encode_audio.c
| | |-- encode_video.c
| | |-- extract_mvs.c
| | |-- filter_audio.c
| | |-- hw_decode.c
| | |-- mux.c
| | |-- qsv_decode.c
| | |-- qsv_transcode.c
| | |-- remux.c
| | |-- resample_audio.c
| | |-- scale_video.c
| | |-- show_metadata.c
| | |-- transcode.c
| | |-- transcode_aac.c
| | |-- vaapi_encode.c
| | `-- vaapi_transcode.c
| |-- ffprobe.xsd
| |-- libvpx-1080p.ffpreset
| |-- libvpx-1080p50_60.ffpreset
| |-- libvpx-360p.ffpreset
| |-- libvpx-720p.ffpreset
| `-- libvpx-720p50_60.ffpreset
`-- man
|-- man1
| |-- ffmpeg-all.1
| |-- ffmpeg-bitstream-filters.1
| |-- ffmpeg-codecs.1
| |-- ffmpeg-devices.1
| |-- ffmpeg-filters.1
| |-- ffmpeg-formats.1
| |-- ffmpeg-protocols.1
| |-- ffmpeg-resampler.1
| |-- ffmpeg-scaler.1
| |-- ffmpeg-utils.1
| |-- ffmpeg.1
| |-- ffprobe-all.1
| `-- ffprobe.1
`-- man3
|-- libavcodec.3
|-- libavdevice.3
|-- libavfilter.3
|-- libavformat.3
|-- libavutil.3
|-- libswresample.3
`-- libswscale.3
19 directories, 235 files
lhj@lhj:~/FFmpeg$
make clean
./configure --disable-x86asm --prefix=/home/lhj/opt/ffmpeg/win --enable-shared
make -j8 && make install
文件如下
lhj@lhj:~/FFmpeg$ tree /home/lhj/opt/ffmpeg/win/
/home/lhj/opt/ffmpeg/win/
|-- bin
| |-- ffmpeg
| |-- ffplay
| `-- ffprobe
|-- include
| |-- libavcodec
| | |-- ac3_parser.h
| | |-- adts_parser.h
| | |-- avcodec.h
| | |-- avdct.h
| | |-- avfft.h
| | |-- bsf.h
| | |-- codec.h
| | |-- codec_desc.h
| | |-- codec_id.h
| | |-- codec_par.h
| | |-- d3d11va.h
| | |-- defs.h
| | |-- dirac.h
| | |-- dv_profile.h
| | |-- dxva2.h
| | |-- jni.h
| | |-- mediacodec.h
| | |-- packet.h
| | |-- qsv.h
| | |-- vdpau.h
| | |-- version.h
| | |-- version_major.h
| | |-- videotoolbox.h
| | |-- vorbis_parser.h
| | `-- xvmc.h
| |-- libavdevice
| | |-- avdevice.h
| | |-- version.h
| | `-- version_major.h
| |-- libavfilter
| | |-- avfilter.h
| | |-- buffersink.h
| | |-- buffersrc.h
| | |-- version.h
| | `-- version_major.h
| |-- libavformat
| | |-- avformat.h
| | |-- avio.h
| | |-- version.h
| | `-- version_major.h
| |-- libavutil
| | |-- adler32.h
| | |-- aes.h
| | |-- aes_ctr.h
| | |-- ambient_viewing_environment.h
| | |-- attributes.h
| | |-- audio_fifo.h
| | |-- avassert.h
| | |-- avconfig.h
| | |-- avstring.h
| | |-- avutil.h
| | |-- base64.h
| | |-- blowfish.h
| | |-- bprint.h
| | |-- bswap.h
| | |-- buffer.h
| | |-- camellia.h
| | |-- cast5.h
| | |-- channel_layout.h
| | |-- common.h
| | |-- cpu.h
| | |-- crc.h
| | |-- csp.h
| | |-- des.h
| | |-- detection_bbox.h
| | |-- dict.h
| | |-- display.h
| | |-- dovi_meta.h
| | |-- downmix_info.h
| | |-- encryption_info.h
| | |-- error.h
| | |-- eval.h
| | |-- ffversion.h
| | |-- fifo.h
| | |-- file.h
| | |-- film_grain_params.h
| | |-- frame.h
| | |-- hash.h
| | |-- hdr_dynamic_metadata.h
| | |-- hdr_dynamic_vivid_metadata.h
| | |-- hmac.h
| | |-- hwcontext.h
| | |-- hwcontext_cuda.h
| | |-- hwcontext_d3d11va.h
| | |-- hwcontext_drm.h
| | |-- hwcontext_dxva2.h
| | |-- hwcontext_mediacodec.h
| | |-- hwcontext_opencl.h
| | |-- hwcontext_qsv.h
| | |-- hwcontext_vaapi.h
| | |-- hwcontext_vdpau.h
| | |-- hwcontext_videotoolbox.h
| | |-- hwcontext_vulkan.h
| | |-- imgutils.h
| | |-- intfloat.h
| | |-- intreadwrite.h
| | |-- lfg.h
| | |-- log.h
| | |-- lzo.h
| | |-- macros.h
| | |-- mastering_display_metadata.h
| | |-- mathematics.h
| | |-- md5.h
| | |-- mem.h
| | |-- motion_vector.h
| | |-- murmur3.h
| | |-- opt.h
| | |-- parseutils.h
| | |-- pixdesc.h
| | |-- pixelutils.h
| | |-- pixfmt.h
| | |-- random_seed.h
| | |-- rational.h
| | |-- rc4.h
| | |-- replaygain.h
| | |-- ripemd.h
| | |-- samplefmt.h
| | |-- sha.h
| | |-- sha512.h
| | |-- spherical.h
| | |-- stereo3d.h
| | |-- tea.h
| | |-- threadmessage.h
| | |-- time.h
| | |-- timecode.h
| | |-- timestamp.h
| | |-- tree.h
| | |-- twofish.h
| | |-- tx.h
| | |-- uuid.h
| | |-- version.h
| | |-- video_enc_params.h
| | `-- xtea.h
| |-- libswresample
| | |-- swresample.h
| | |-- version.h
| | `-- version_major.h
| `-- libswscale
| |-- swscale.h
| |-- version.h
| `-- version_major.h
|-- lib
| |-- libavcodec.a
| |-- libavcodec.so -> libavcodec.so.60.6.100
| |-- libavcodec.so.60 -> libavcodec.so.60.6.100
| |-- libavcodec.so.60.6.100
| |-- libavdevice.a
| |-- libavdevice.so -> libavdevice.so.60.2.100
| |-- libavdevice.so.60 -> libavdevice.so.60.2.100
| |-- libavdevice.so.60.2.100
| |-- libavfilter.a
| |-- libavfilter.so -> libavfilter.so.9.4.100
| |-- libavfilter.so.9 -> libavfilter.so.9.4.100
| |-- libavfilter.so.9.4.100
| |-- libavformat.a
| |-- libavformat.so -> libavformat.so.60.4.100
| |-- libavformat.so.60 -> libavformat.so.60.4.100
| |-- libavformat.so.60.4.100
| |-- libavutil.a
| |-- libavutil.so -> libavutil.so.58.3.100
| |-- libavutil.so.58 -> libavutil.so.58.3.100
| |-- libavutil.so.58.3.100
| |-- libswresample.a
| |-- libswresample.so -> libswresample.so.4.11.100
| |-- libswresample.so.4 -> libswresample.so.4.11.100
| |-- libswresample.so.4.11.100
| |-- libswscale.a
| |-- libswscale.so -> libswscale.so.7.2.100
| |-- libswscale.so.7 -> libswscale.so.7.2.100
| |-- libswscale.so.7.2.100
| `-- pkgconfig
| |-- libavcodec.pc
| |-- libavdevice.pc
| |-- libavfilter.pc
| |-- libavformat.pc
| |-- libavutil.pc
| |-- libswresample.pc
| `-- libswscale.pc
`-- share
|-- doc
| `-- ffmpeg
| |-- bootstrap.min.css
| |-- community.html
| |-- default.css
| |-- developer.html
| |-- faq.html
| |-- fate.html
| |-- ffmpeg-all.html
| |-- ffmpeg-bitstream-filters.html
| |-- ffmpeg-codecs.html
| |-- ffmpeg-devices.html
| |-- ffmpeg-filters.html
| |-- ffmpeg-formats.html
| |-- ffmpeg-protocols.html
| |-- ffmpeg-resampler.html
| |-- ffmpeg-scaler.html
| |-- ffmpeg-utils.html
| |-- ffmpeg.html
| |-- ffplay-all.html
| |-- ffplay.html
| |-- ffprobe-all.html
| |-- ffprobe.html
| |-- general.html
| |-- git-howto.html
| |-- libavcodec.html
| |-- libavdevice.html
| |-- libavfilter.html
| |-- libavformat.html
| |-- libavutil.html
| |-- libswresample.html
| |-- libswscale.html
| |-- mailing-list-faq.html
| |-- nut.html
| |-- platform.html
| `-- style.min.css
|-- ffmpeg
| |-- examples
| | |-- Makefile
| | |-- README
| | |-- avio_http_serve_files.c
| | |-- avio_list_dir.c
| | |-- avio_read_callback.c
| | |-- decode_audio.c
| | |-- decode_filter_audio.c
| | |-- decode_filter_video.c
| | |-- decode_video.c
| | |-- demux_decode.c
| | |-- encode_audio.c
| | |-- encode_video.c
| | |-- extract_mvs.c
| | |-- filter_audio.c
| | |-- hw_decode.c
| | |-- mux.c
| | |-- qsv_decode.c
| | |-- qsv_transcode.c
| | |-- remux.c
| | |-- resample_audio.c
| | |-- scale_video.c
| | |-- show_metadata.c
| | |-- transcode.c
| | |-- transcode_aac.c
| | |-- vaapi_encode.c
| | `-- vaapi_transcode.c
| |-- ffprobe.xsd
| |-- libvpx-1080p.ffpreset
| |-- libvpx-1080p50_60.ffpreset
| |-- libvpx-360p.ffpreset
| |-- libvpx-720p.ffpreset
| `-- libvpx-720p50_60.ffpreset
`-- man
|-- man1
| |-- ffmpeg-all.1
| |-- ffmpeg-bitstream-filters.1
| |-- ffmpeg-codecs.1
| |-- ffmpeg-devices.1
| |-- ffmpeg-filters.1
| |-- ffmpeg-formats.1
| |-- ffmpeg-protocols.1
| |-- ffmpeg-resampler.1
| |-- ffmpeg-scaler.1
| |-- ffmpeg-utils.1
| |-- ffmpeg.1
| |-- ffplay-all.1
| |-- ffplay.1
| |-- ffprobe-all.1
| `-- ffprobe.1
`-- man3
|-- libavcodec.3
|-- libavdevice.3
|-- libavfilter.3
|-- libavformat.3
|-- libavutil.3
|-- libswresample.3
`-- libswscale.3
19 directories, 261 files
lhj@lhj:~/FFmpeg$
将生成的bin文件复制到windows下
将生成的lib文件复制到windows下
再将上述lib文件*.a,通过ssh登录使用rz导入到开发板的/usr/lib目录下
将ffmpeg和ffprobe通过ssh登录使用rz导入到开发板~目录下
chmod +x ffmpeg ffprobe
root@myir-yg2lx:~# chmod +x ffmpeg ffprobe
root@myir-yg2lx:~# ./ffmpeg
ffmpeg version N-109968-gcc76e8340d Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
configuration: --cross-prefix=aarch64-linux-gnu- --enable-cross-compile --target-os=linux --cc=aarch64-linux-gnu-gcc --arch=arm64 --prefix=/home/lhj/opt/ffmpeg/board --enable-ffmpeg --disable-armv5te --disable-armv6 --disable-armv6t2
libavutil 58. 3.100 / 58. 3.100
libavcodec 60. 6.100 / 60. 6.100
libavformat 60. 4.100 / 60. 4.100
libavdevice 60. 2.100 / 60. 2.100
libavfilter 9. 4.100 / 9. 4.100
libswscale 7. 2.100 / 7. 2.100
libswresample 4. 11.100 / 4. 11.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg'
root@myir-yg2lx:~# ./ffprobe
ffprobe version N-109968-gcc76e8340d Copyright (c) 2007-2023 the FFmpeg developers
built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
configuration: --cross-prefix=aarch64-linux-gnu- --enable-cross-compile --target-os=linux --cc=aarch64-linux-gnu-gcc --arch=arm64 --prefix=/home/lhj/opt/ffmpeg/board --enable-ffmpeg --disable-armv5te --disable-armv6 --disable-armv6t2
libavutil 58. 3.100 / 58. 3.100
libavcodec 60. 6.100 / 60. 6.100
libavformat 60. 4.100 / 60. 4.100
libavdevice 60. 2.100 / 60. 2.100
libavfilter 9. 4.100 / 9. 4.100
libswscale 7. 2.100 / 7. 2.100
libswresample 4. 11.100 / 4. 11.100
Simple multimedia streams analyzer
usage: ffprobe [OPTIONS] INPUT_FILE
You have to specify one input file.
Use -h to get full help or, even better, run 'man ffprobe'.
root@myir-yg2lx:~#
https://www.sample-videos.com/index.php#sample-mp4-video下下测试mp4视频
这里下载的是big_buck_bunny_720p_10mb.mp4。
cd ~
导入视频big_buck_bunny_720p_10mb.mp4到开发板。
root@myir-yg2lx:~# ffmpeg -benchmark -i big_buck_bunny_720p_10mb.mp4 -f null -
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 8.3.0 (GCC)
configuration: --disable-stripping --enable-pic --enable-shared --enable-pthreads --cross-prefix=aarch64-poky-linux- --ld='aarch64-poky-linux-gcc -mtune=cortex-a55 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/recipe-sysroot' --cc='aarch64-poky-linux-gcc -mtune=cortex-a55 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/recipe-sysroot' --cxx='aarch64-poky-linux-g++ -mtune=cortex-a55 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/recipe-sysroot' --arch=aarch64 --target-os=linux --enable-cross-compile --extra-cflags=' -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map==/usr/src/debug/ffmpeg/4.2.2-r0 -fdebug-prefix-map==/usr/src/debug/ffmpeg/4.2.2-r0 -fdebug-prefix-map=/recipe-sysroot= -fdebug-prefix-map=/recipe-sysroot-native= -mtune=cortex-a55 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/recipe-sysroot' --extra-ldflags='-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fstack-protector-strong -Wl,-z,relro,-z,now' --sysroot=/recipe-sysroot --libdir=/usr/lib64 --shlibdir=/usr/lib64 --datadir=/usr/share/ffmpeg --disable-mipsdsp --disable-mipsdspr2 --cpu=generic --pkg-config=pkg-config --disable-static --enable-alsa --enable-avcodec --enable-avdevice --enable-avfilter --enable-avformat --enable-avresample --enable-bzlib --disable-libfdk-aac --enable-gpl --disable-libgsm --disable-indev=jack --disable-libvorbis --enable-lzma --disable-libmfx --disable-libmp3lame --disable-openssl --enable-postproc --disable-sdl2 --disable-libspeex --enable-swresample --enable-swscale --enable-libtheora --disable-vaapi --disable-vdpau --disable-libvpx --enable-libx264 --disable-libx265 --disable-libxcb --disable-outdev=xv --enable-zlib
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'big_buck_bunny_720p_10mb.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time : 1970-01-01T00:00:00.000000Z
encoder : Lavf53.24.2
Duration: 00:01:02.32, start: 0.000000, bitrate: 1347 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 959 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
creation_time : 1970-01-01T00:00:00.000000Z
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 383 kb/s (default)
Metadata:
creation_time : 1970-01-01T00:00:00.000000Z
handler_name : SoundHandler
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> wrapped_avframe (native))
Stream #0:1 -> #0:1 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, null, to 'pipe:':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.29.100
Stream #0:0(und): Video: wrapped_avframe, yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc (default)
Metadata:
creation_time : 1970-01-01T00:00:00.000000Z
handler_name : VideoHandler
encoder : Lavc58.54.100 wrapped_avframe
Stream #0:1(und): Audio: pcm_s16le, 48000 Hz, 5.1, s16, 4608 kb/s (default)
Metadata:
creation_time : 1970-01-01T00:00:00.000000Z
handler_name : SoundHandler
encoder : Lavc58.54.100 pcm_s16le
frame= 1557 fps= 41 q=-0.0 Lsize=N/A time=00:01:02.31 bitrate=N/A speed=1.65x
video:815kB audio:35052kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
bench: utime=32.622s stime=2.285s rtime=37.798s
bench: maxrss=28804kB
lhj@lhj:~$ ffmpeg -benchmark -i big_buck_bunny_720p_10mb.mp4 -f null -
ffmpeg version N-109734-g806ecace91 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
configuration: --disable-x86asm
libavutil 57. 44.100 / 57. 44.100
libavcodec 59. 60.100 / 59. 60.100
libavformat 59. 37.100 / 59. 37.100
libavdevice 59. 8.101 / 59. 8.101
libavfilter 8. 56.100 / 8. 56.100
libswscale 6. 8.112 / 6. 8.112
libswresample 4. 9.100 / 4. 9.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'big_buck_bunny_720p_10mb.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time : 1970-01-01T00:00:00.000000Z
encoder : Lavf53.24.2
Duration: 00:01:02.31, start: 0.000000, bitrate: 1347 kb/s
Stream #0:0[0x1](und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], 959 kb/s, 25 fps, 25 tbr, 12800 tbn (default)
Metadata:
creation_time : 1970-01-01T00:00:00.000000Z
handler_name : VideoHandler
vendor_id : [0][0][0][0]
Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 383 kb/s (default)
Metadata:
creation_time : 1970-01-01T00:00:00.000000Z
handler_name : SoundHandler
vendor_id : [0][0][0][0]
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> wrapped_avframe (native))
Stream #0:1 -> #0:1 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, null, to 'pipe:':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf59.37.100
Stream #0:0(und): Video: wrapped_avframe, yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 25 tbn (default)
Metadata:
creation_time : 1970-01-01T00:00:00.000000Z
handler_name : VideoHandler
vendor_id : [0][0][0][0]
encoder : Lavc59.60.100 wrapped_avframe
Stream #0:1(und): Audio: pcm_s16le, 48000 Hz, 5.1, s16, 4608 kb/s (default)
Metadata:
creation_time : 1970-01-01T00:00:00.000000Z
handler_name : SoundHandler
vendor_id : [0][0][0][0]
encoder : Lavc59.60.100 pcm_s16le
frame= 1557 fps=0.0 q=-0.0 Lsize=N/A time=00:01:02.29 bitrate=N/A speed=67.5x
video:730kB audio:35052kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
bench: utime=5.981s stime=0.833s rtime=0.929s
bench: maxrss=94204kB
lhj@lhj:~$
可以看到开发板720p,40帧处理没问题。
和PC相比差距10多倍,这相对于桌面级的DDR,SSD和CPU的综合环境来说,开发板的性能已经非常不错了。
|
开发板 |
PC |
|
CPU |
1/2xCortex-A55@1.2GHz |
th Gen Intel(R) Core(TM) i5-12500H 2.50 GHz |
|
maxrss |
28804kB |
94204kB |
|
utime |
32.622s |
5.981s |
|
Stime |
2.285s |
0.833s |
|
Rtime |
37.798s |
0.929s |
|
本文进行了ffmpeg开发环境的搭建,并在开发板上测试了ffmpeg的性能。综上可以看出开发板的多媒体性能也是不错的,页非常适合多媒体终端的应用场景。