大学生
最后登录1970-1-1
在线时间 小时
注册时间2024-7-27
|
系统信息:
复现方式:
使用 ffmpeg 对 yuv 视频进行编码
- cat@lubancat:~/workspace/endpoint$ ffmpeg -v debug -f lavfi -i testsrc2=s=1920x1080,format=nv12 -c:v hevc_rkmpp -qp_init 26 -profile:v main -level 4.1 -g:v 100 -vframes 5000 -y tmp.mp4
- ffmpeg version 6.1.1-3ubuntu5+git240504.09cd2a2~noble Copyright (c) 2000-2023 the FFmpeg developers
- built with gcc 13 (Ubuntu 13.2.0-23ubuntu4)
- configuration: --prefix=/usr --extra-version='3ubuntu5+git240504.09cd2a2~noble' --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --arch=arm64 --enable-gpl --disable-stripping --disable-omx --enable-gnutls --enable-libaom --enable-libass --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libharfbuzz --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-openal --enable-opencl --enable-opengl --enable-version3 --enable-rkmpp --enable-rkrga --disable-sndio --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-ladspa --enable-libbluray --enable-libjack --enable-libpulse --enable-librabbitmq --enable-librist --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libx264 --enable-libzmq --enable-libzvbi --enable-lv2 --enable-sdl2 --enable-libplacebo --enable-librav1e --enable-pocketsphinx --enable-librsvg --enable-libjxl --enable-shared
- WARNING: library configuration mismatch
- avcodec configuration: --prefix=/usr --extra-version='3ubuntu5+git240504.09cd2a2~noble' --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --arch=arm64 --enable-gpl --disable-stripping --disable-omx --enable-gnutls --enable-libaom --enable-libass --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libharfbuzz --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-openal --enable-opencl --enable-opengl --enable-version3 --enable-rkmpp --enable-rkrga --disable-sndio --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-ladspa --enable-libbluray --enable-libjack --enable-libpulse --enable-librabbitmq --enable-librist --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libx264 --enable-libzmq --enable-libzvbi --enable-lv2 --enable-sdl2 --enable-libplacebo --enable-librav1e --enable-pocketsphinx --enable-librsvg --enable-libjxl --enable-shared --enable-version3 --disable-doc --disable-programs --disable-static --enable-libaribb24 --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc --enable-libsmbclient
- libavutil 58. 29.100 / 58. 29.100
- libavcodec 60. 31.102 / 60. 31.102
- libavformat 60. 16.100 / 60. 16.100
- libavdevice 60. 3.100 / 60. 3.100
- libavfilter 9. 12.100 / 9. 12.100
- libswscale 7. 5.100 / 7. 5.100
- libswresample 4. 12.100 / 4. 12.100
- libpostproc 57. 3.100 / 57. 3.100
- Splitting the commandline.
- Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
- Reading option '-f' ... matched as option 'f' (force format) with argument 'lavfi'.
- Reading option '-i' ... matched as output url with argument 'testsrc2=s=1920x1080,format=nv12'.
- Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'hevc_rkmpp'.
- Reading option '-qp_init' ... matched as AVOption 'qp_init' with argument '26'.
- Reading option '-profile:v' ... matched as option 'profile' (set profile) with argument 'main'.
- Reading option '-level' ... matched as AVOption 'level' with argument '4.1'.
- Reading option '-g:v' ... matched as AVOption 'g:v' with argument '100'.
- Reading option '-vframes' ... matched as option 'vframes' (set the number of video frames to output) with argument '5000'.
- Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
- Reading option 'tmp.mp4' ... matched as output url.
- Finished splitting the commandline.
- Parsing a group of options: global .
- Applying option v (set logging level) with argument debug.
- Applying option y (overwrite output files) with argument 1.
- Successfully parsed a group of options.
- Parsing a group of options: input url testsrc2=s=1920x1080,format=nv12.
- Applying option f (force format) with argument lavfi.
- Successfully parsed a group of options.
- Opening an input file: testsrc2=s=1920x1080,format=nv12.
- [AVFilterGraph [url=home.php?mod=space&uid=5830]@[/url] 0xaaaae75c50a0] Setting 's' to value '1920x1080'
- [AVFilterGraph @ 0xaaaae75c50a0] Setting 'pix_fmts' to value 'nv12'
- detected 8 logical cores
- [Parsed_testsrc2_0 @ 0xaaaae75c6bb0] size:1920x1080 rate:25/1 duration:-1.000000 sar:1/1
- [AVFilterGraph @ 0xaaaae75c50a0] query_formats: 3 queried, 2 merged, 0 already done, 0 delayed
- [lavfi @ 0xaaaae75c4c90] All info found
- Input #0, lavfi, from 'testsrc2=s=1920x1080,format=nv12':
- Duration: N/A, start: 0.000000, bitrate: N/A
- Stream #0:0, 1, 1/25: Video: wrapped_avframe, 1 reference frame, nv12, 1920x1080 [SAR 1:1 DAR 16:9], 0/1, 25 fps, 25 tbr, 25 tbn
- Successfully opened the file.
- Parsing a group of options: output url tmp.mp4.
- Applying option c:v (codec name) with argument hevc_rkmpp.
- Applying option profile:v (set profile) with argument main.
- Applying option vframes (set the number of video frames to output) with argument 5000.
- Successfully parsed a group of options.
- Opening an output file: tmp.mp4.
- [out#0/mp4 @ 0xaaaae75c9170] No explicit maps, mapping streams automatically...
- [vost#0:0/hevc_rkmpp @ 0xaaaae75ca480] Created video stream from input stream 0:0
- [file @ 0xaaaae75cc170] Setting default whitelist 'file,crypto,data'
- Successfully opened the file.
- Stream mapping:
- Stream #0:0 -> #0:0 (wrapped_avframe (native) -> hevc (hevc_rkmpp))
- Press [q] to stop, [?] for help
- [graph 0 input from stream 0:0 @ 0xaaaae75ce4b0] Setting 'video_size' to value '1920x1080'
- [graph 0 input from stream 0:0 @ 0xaaaae75ce4b0] Setting 'pix_fmt' to value '23'
- [graph 0 input from stream 0:0 @ 0xaaaae75ce4b0] Setting 'time_base' to value '1/25'
- [graph 0 input from stream 0:0 @ 0xaaaae75ce4b0] Setting 'pixel_aspect' to value '1/1'
- [graph 0 input from stream 0:0 @ 0xaaaae75ce4b0] Setting 'frame_rate' to value '25/1'
- [graph 0 input from stream 0:0 @ 0xaaaae75ce4b0] w:1920 h:1080 pixfmt:nv12 tb:1/25 fr:25/1 sar:1/1
- [format @ 0xaaaae75ce820] Setting 'pix_fmts' to value 'gray|yuv420p|yuv422p|yuv444p|nv12|nv21|nv16|nv24|yuyv422|yvyu422|uyvy422|rgb24|bgr24|rgba|rgb0|bgra|bgr0|argb|0rgb|abgr|0bgr|drm_prime'
- [AVFilterGraph @ 0xaaaae75cc870] query_formats: 4 queried, 3 merged, 0 already done, 0 delayed
- [hevc_rkmpp @ 0xaaaae75ca7c0] Failed to init MPP context: -1
- [vost#0:0/hevc_rkmpp @ 0xaaaae75ca480] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height.
- Error while filtering: Generic error in an external library
- [vist#0:0/wrapped_avframe @ 0xaaaae75c9380] Decoder thread received EOF packet
- [vist#0:0/wrapped_avframe @ 0xaaaae75c9380] Decoder returned EOF, finishing
- [vist#0:0/wrapped_avframe @ 0xaaaae75c9380] Terminating decoder thread
- [out#0/mp4 @ 0xaaaae75c9170] sq: 0 EOF
- [out#0/mp4 @ 0xaaaae75c9170] sq: finish 0; head ts NOPTS
- [out#0/mp4 @ 0xaaaae75c9170] sq: finish queue
- [out#0/mp4 @ 0xaaaae75c9170] Nothing was written into output file, because at least one of its streams received no packets.
- frame= 0 fps=0.0 q=0.0 Lsize= 0kB time=N/A bitrate=N/A speed=N/A
- [AVIOContext @ 0xaaaae75cc1e0] Statistics: 0 bytes written, 0 seeks, 0 writeouts
- [in#0/lavfi @ 0xaaaae75c4b90] Terminating demuxer thread
- [in#0/lavfi @ 0xaaaae75c4b90] Input file #0 (testsrc2=s=1920x1080,format=nv12):
- [in#0/lavfi @ 0xaaaae75c4b90] Input stream #0:0 (video): 2 packets read (960 bytes); 1 frames decoded; 0 decode errors;
- [in#0/lavfi @ 0xaaaae75c4b90] Total: 2 packets (960 bytes) demuxed
- Conversion failed!
复制代码排除yuv文件问题: - x86 框架下使用相同文件可以进行编码.
- 替换为 libx264 可进行编码.
额外信息:
- cat@lubancat:~/workspace/endpoint$ sudo modprobe rk_hdmirx
- [sudo] password for cat:
- modprobe: FATAL: Module rk_hdmirx not found in directory /lib/modules/6.1.84
复制代码
|
|