I have a orange pi PC board that runs newest armbian 21.05 (kernel 5.10).
I create a h264 video from v4l usb camera successfully with
ffmpeg -f v4l2 -channel 0 -video_size 1280x720 -i /dev/video1 -pix_fmt nv12 -r 30 -b:v 64k -c:v libx264 test.mp4
but fps is low (10 - > 15 fps) and 100 % cpu load.
When i used Cedrus264 encoder with:
ffmpeg -f v4l2 -channel 0 -video_size 1280x720 -i /dev/video1 -pix_fmt nv12 -r 30 -b:v 64k -c:v cedrus264 test.mp4
ffmpeg failed:
sudo ffmpeg-3.1.4 -f v4l2 -channel 0 -video_size 1280x720 -i /dev/video0 -pix_fmt nv12 -r 22 -qp 30 -c:v cedrus264 -c:a None night_video_test4_1920x1080.mp4
[sudo] password for lam:
ffmpeg version 3.1.4 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8 (Ubuntu/Linaro 4.8.4-2ubuntu1~14.04.3)
configuration: --prefix=/usr --enable-nonfree --enable-gpl --enable-version3 --enable-vdpau --enable-libx264 --enable-libmp3lame --enable-libpulse --enable-libv4l2 --enable-libcedrus264
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 48.101 / 57. 48.101
libavformat 57. 41.100 / 57. 41.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 47.100 / 6. 47.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, start: 109.484156, bitrate: 147456 kb/s
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1280x720, 147456 kb/s, 10 fps, 10 tbr, 1000k tbn, 1000k tbc
File 'night_video_test4_1920x1080.mp4' already exists. Overwrite ? [y/N] y
[cedrus264 @ 0x16e0060] VE Open error.
Output #0, mp4, to 'night_video_test4_1920x1080.mp4':
Stream #0:0: Unknown: none
Metadata:
encoder : Lavc57.48.101 cedrus264
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (cedrus264))
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
ffmpeg was builed from FFmpeg-Cedrus, I spent 5 days for searching solutions.
Please help me!
Thanks all !