whitefox Posted August 8, 2020 Posted August 8, 2020 (edited) Hi, I try use image http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=3844 this only one image works HDMI input for HDMI output PC ffmpeg -f v4l2 -list_formats all -i /dev/video0 [video4linux2,v4l2 @ 0xab89b120] Raw : yuyv422 : YUYV 4:2:2 : [video4linux2,v4l2 @ 0xab89b120] Raw : yuyv422 : YUYV 4:2:2 : [video4linux2,v4l2 @ 0xab89b120] Raw : uyvy422 : UYVY 4:2:2 : [video4linux2,v4l2 @ 0xab89b120] Raw : yuv422p : Planar YVU 4:2:2 : [video4linux2,v4l2 @ 0xab89b120] Raw : Unsupported : Y/CbCr 4:2:2 : [video4linux2,v4l2 @ 0xab89b120] Raw : yuv420p : Planar YUV 4:2:0 : [video4linux2,v4l2 @ 0xab89b120] Raw : yuv420p : Planar YUV 4:2:0 : [video4linux2,v4l2 @ 0xab89b120] Raw : yuv420p : Planar YVU 4:2:0 : [video4linux2,v4l2 @ 0xab89b120] Raw : nv12 : Y/CbCr 4:2:0 : [video4linux2,v4l2 @ 0xab89b120] Raw : Unsupported : Y/CrCb 4:2:0 : [video4linux2,v4l2 @ 0xab89b120] Raw : gray : 8-bit Greyscale : [video4linux2,v4l2 @ 0xab89b120] Raw : Unsupported : 16-bit A/XYUV 4-4-4-4 : [video4linux2,v4l2 @ 0xab89b120] Raw : Unsupported : Y/CbCr 4:4:4 : [video4linux2,v4l2 @ 0xab89b120] Compressed: mjpeg : JFIF JPEG : [video4linux2,v4l2 @ 0xab89b120] Raw : rgb565le : 16-bit RGB 5-6-5 : [video4linux2,v4l2 @ 0xab89b120] Raw : bayer_grbg8 : 8-bit Bayer GRGR/BGBG : also tried images 1. OrangePi_rk3399_ubuntu_bionic_desktop_linux4.4.179_v1.3 from https://drive.google.com/drive/folders/17t3rWNuvG5i72UgrwfgEuevrEFS9Txo4 2. Armbian_20.05.4_Orangepi-rk3399_focal_current_5.4.46 from https://dl.armbian.com/orangepi-rk3399/archive/ and try encoding to h264 use preset ultrafast 720p work without h264_rkmpp ffmpeg -f v4l2 -pix_fmt nv12 -framerate 25 -s 1280x720 -framerate 25 -re -i /dev/video0 -pix_fmt yuv420p -vsync 2 -c:v libx264 -preset ultrafast -profile:v baseline -r 25 -g 50 -sc_threshold 0 -threads 0 -an -bsf:v h264_mp4toannexb -f mpegts "udp://192.168.1.85:10000?pkt_size=1316» https://yadi.sk/i/68YnUz6nDLhK6g 1080p after 15 seconds board rebooted ffmpeg -f v4l2 -pix_fmt nv12 -framerate 25 -s 1920x1080 -framerate 25 -re -i /dev/video0 -pix_fmt yuv420p -vsync 2 -c:v libx264 -preset ultrafast -profile:v baseline -r 25 -g 50 -sc_threshold 0 -threads 0 -an -bsf:v h264_mp4toannexb -f mpegts "udp://192.168.1.85:10000?pkt_size=1316" Then a try install ffmpeg with h264_rkmpp how I did it from armbian kernel But from this kernel rockcip_mpp not compiled need kernel headers video/rk_vpu_service [ 5%] Building C object mpp/hal/dummy/CMakeFiles/hal_dummy.dir/hal_dummy_dec_api.c.o /tmp/rockchip_mpp/mpp/hal/worker/mpp_device/mpp_device.c:24:34: fatal error: video/rk_vpu_service.h: No such file or directory #include <video/rk_vpu_service.h> ^ compilation terminated. mpp/hal/worker/mpp_device/CMakeFiles/mpp_device.dir/build.make:62: recipe for target 'mpp/hal/worker/mpp_device/CMakeFiles/mpp_device.dir/mpp_device.c.o' failed make[2]: *** [mpp/hal/worker/mpp_device/CMakeFiles/mpp_device.dir/mpp_device.c.o] Error 1 CMakeFiles/Makefile2:3081: recipe for target 'mpp/hal/worker/mpp_device/CMakeFiles/mpp_device.dir/all' failed make[1]: *** [mpp/hal/worker/mpp_device/CMakeFiles/mpp_device.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 5%] Building C object mpp/hal/dummy/CMakeFiles/hal_dummy.dir/hal_dummy_enc_api.c.o [ 16%] Built target osal Makefile:127: recipe for target 'all' failed make: *** [all] Error 2 Then I try connect my Nikon D5300 to hdmi in ffmpeg is not responding and board not responding root@linaro-alip:/home/linaro# ffmpeg -f v4l2 -pix_fmt nv12 -framerate 25 -s 1280x720 -framerate 25 -re -i /dev/video0 -pix_fmt yuv420p -vsync 2 -c:v libx264 -preset ultrafast -profile:v baseline -r 25 -g 50 -sc_threshold 0 -threads 0 -an -bsf:v h264_mp4toannexb -f mpegts "udp://192.168.1.85:10000?pkt_size=1316" ffmpeg version 3.2.15-0+deb9u1 Copyright (c) 2000-2020 the FFmpeg developers [video4linux2,v4l2 @ 0xab784270] The driver does not permit changing the time per frame [video4linux2,v4l2 @ 0xab784270] Time per frame unknown Input #0, video4linux2,v4l2, from '/dev/video0': Duration: N/A, bitrate: N/A Stream #0:0: Video: rawvideo (NV12 / 0x3231564E), nv12, 1280x720, 1000k tbr, 1000k tbn, 1000k tbc [libx264 @ 0xab787250] using cpu capabilities: ARMv6 NEON [libx264 @ 0xab787250] profile Constrained Baseline, level 3.1 Output #0, mpegts, to 'udp://192.168.1.85:10000?pkt_size=1316': Metadata: encoder : Lavf57.56.101 Stream #0:0: Video: h264 (libx264), yuv420p, 1280x720, q=-1--1, 25 fps, 90k tbn, 25 tbc Metadata: encoder : Lavc57.64.101 libx264 Side data: cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1 Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264)) Press [q] to stop, [?] for help frame= 0 fps=0.0 q=0.0 Lsize= 0kB time=00:00:00.00 bitrate=N/A speed= 0x video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used) where can i get normal support hdmi-in ? See https://medium.com/@poddingue/stream-for-cheap-rk3399-and-ffmpeg-part-i-149f330bd127 https://trac.ffmpeg.org/wiki/Capture/Webcam#Linux Edited August 9, 2020 by whitefox
whitefox Posted August 8, 2020 Author Posted August 8, 2020 4 hours ago, whitefox said: Hi, I try use image http://www.orangepi.org/orangepibbsen/forum.php?mod=viewthread&tid=3844 this only one image works HDMI input for HDMI output PC ffmpeg -f v4l2 -list_formats all -i /dev/video0 [video4linux2,v4l2 @ 0xab89b120] Raw : yuyv422 : YUYV 4:2:2 : [video4linux2,v4l2 @ 0xab89b120] Raw : yuyv422 : YUYV 4:2:2 : [video4linux2,v4l2 @ 0xab89b120] Raw : uyvy422 : UYVY 4:2:2 : [video4linux2,v4l2 @ 0xab89b120] Raw : yuv422p : Planar YVU 4:2:2 : [video4linux2,v4l2 @ 0xab89b120] Raw : Unsupported : Y/CbCr 4:2:2 : [video4linux2,v4l2 @ 0xab89b120] Raw : yuv420p : Planar YUV 4:2:0 : [video4linux2,v4l2 @ 0xab89b120] Raw : yuv420p : Planar YUV 4:2:0 : [video4linux2,v4l2 @ 0xab89b120] Raw : yuv420p : Planar YVU 4:2:0 : [video4linux2,v4l2 @ 0xab89b120] Raw : nv12 : Y/CbCr 4:2:0 : [video4linux2,v4l2 @ 0xab89b120] Raw : Unsupported : Y/CrCb 4:2:0 : [video4linux2,v4l2 @ 0xab89b120] Raw : gray : 8-bit Greyscale : [video4linux2,v4l2 @ 0xab89b120] Raw : Unsupported : 16-bit A/XYUV 4-4-4-4 : [video4linux2,v4l2 @ 0xab89b120] Raw : Unsupported : Y/CbCr 4:4:4 : [video4linux2,v4l2 @ 0xab89b120] Compressed: mjpeg : JFIF JPEG : [video4linux2,v4l2 @ 0xab89b120] Raw : rgb565le : 16-bit RGB 5-6-5 : [video4linux2,v4l2 @ 0xab89b120] Raw : bayer_grbg8 : 8-bit Bayer GRGR/BGBG : also tried images 1. OrangePi_rk3399_ubuntu_bionic_desktop_linux4.4.179_v1.3 from https://drive.google.com/drive/folders/17t3rWNuvG5i72UgrwfgEuevrEFS9Txo4 2. Armbian_20.05.4_Orangepi-rk3399_focal_current_5.4.46 from https://dl.armbian.com/orangepi-rk3399/archive/ and try encoding to h264 use preset ultrafast 720p work without h264_rkmpp ffmpeg -f v4l2 -pix_fmt nv12 -framerate 25 -s 1280x720 -framerate 25 -re -i /dev/video0 -pix_fmt yuv420p -vsync 2 -c:v libx264 -preset ultrafast -profile:v baseline -r 25 -g 50 -sc_threshold 0 -threads 0 -an -bsf:v h264_mp4toannexb -f mpegts "udp://192.168.1.85:10000?pkt_size=1316» https://yadi.sk/i/68YnUz6nDLhK6g 1080p after 15 seconds board rebooted ffmpeg -f v4l2 -pix_fmt nv12 -framerate 25 -s 1920x1080 -framerate 25 -re -i /dev/video0 -pix_fmt yuv420p -vsync 2 -c:v libx264 -preset ultrafast -profile:v baseline -r 25 -g 50 -sc_threshold 0 -threads 0 -an -bsf:v h264_mp4toannexb -f mpegts "udp://192.168.1.85:10000?pkt_size=1316" Then a try install ffmpeg with h264_rkmpp how I did it from armbian kernel But from this kernel rockcip_mpp not compiled need kernel headers video/rk_vpu_service [ 5%] Building C object mpp/hal/dummy/CMakeFiles/hal_dummy.dir/hal_dummy_dec_api.c.o /tmp/rockchip_mpp/mpp/hal/worker/mpp_device/mpp_device.c:24:34: fatal error: video/rk_vpu_service.h: No such file or directory #include <video/rk_vpu_service.h> ^ compilation terminated. mpp/hal/worker/mpp_device/CMakeFiles/mpp_device.dir/build.make:62: recipe for target 'mpp/hal/worker/mpp_device/CMakeFiles/mpp_device.dir/mpp_device.c.o' failed make[2]: *** [mpp/hal/worker/mpp_device/CMakeFiles/mpp_device.dir/mpp_device.c.o] Error 1 CMakeFiles/Makefile2:3081: recipe for target 'mpp/hal/worker/mpp_device/CMakeFiles/mpp_device.dir/all' failed make[1]: *** [mpp/hal/worker/mpp_device/CMakeFiles/mpp_device.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 5%] Building C object mpp/hal/dummy/CMakeFiles/hal_dummy.dir/hal_dummy_enc_api.c.o [ 16%] Built target osal Makefile:127: recipe for target 'all' failed make: *** [all] Error 2 Then I try connect my Nikon D5300 to hdmi in ffmpeg is not responding and board not responding in user manual writen Quote Hdmi in only supports receiving input signals of 1080p60, and connects the hdmi output port of other devices to the hdmi in interface of RK3399 maybe at the camera signal 1080p50 root@linaro-alip:/home/linaro# ffmpeg -f v4l2 -pix_fmt nv12 -framerate 25 -s 1280x720 -framerate 25 -re -i /dev/video0 -pix_fmt yuv420p -vsync 2 -c:v libx264 -preset ultrafast -profile:v baseline -r 25 -g 50 -sc_threshold 0 -threads 0 -an -bsf:v h264_mp4toannexb -f mpegts "udp://192.168.1.85:10000?pkt_size=1316" ffmpeg version 3.2.15-0+deb9u1 Copyright (c) 2000-2020 the FFmpeg developers [video4linux2,v4l2 @ 0xab784270] The driver does not permit changing the time per frame [video4linux2,v4l2 @ 0xab784270] Time per frame unknown Input #0, video4linux2,v4l2, from '/dev/video0': Duration: N/A, bitrate: N/A Stream #0:0: Video: rawvideo (NV12 / 0x3231564E), nv12, 1280x720, 1000k tbr, 1000k tbn, 1000k tbc [libx264 @ 0xab787250] using cpu capabilities: ARMv6 NEON [libx264 @ 0xab787250] profile Constrained Baseline, level 3.1 Output #0, mpegts, to 'udp://192.168.1.85:10000?pkt_size=1316': Metadata: encoder : Lavf57.56.101 Stream #0:0: Video: h264 (libx264), yuv420p, 1280x720, q=-1--1, 25 fps, 90k tbn, 25 tbc Metadata: encoder : Lavc57.64.101 libx264 Side data: cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1 Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264)) Press [q] to stop, [?] for help frame= 0 fps=0.0 q=0.0 Lsize= 0kB time=00:00:00.00 bitrate=N/A speed= 0x video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used) where can i get normal support hdmi-in ? See https://medium.com/@poddingue/stream-for-cheap-rk3399-and-ffmpeg-part-i-149f330bd127 https://trac.ffmpeg.org/wiki/Capture/Webcam#Linux 1
whitefox Posted August 9, 2020 Author Posted August 9, 2020 I read carefully user manual and found it #Dont supports imultaneous HDMI and Screen for HDMI IN Using HDMI IN with HDMI port CONFIG_VIDEO_TC358749XBG=y #CONFIG_ROCKCHIP_DW_MIPI_DSI=y #CONFIG_DRM_PANEL_SIMPLE=y I did so and went to rebuild kernel image git clone --depth 1 https://github.com/armbian/build cd build ./compile.sh # in dialog menu # U-boot and kernel packages -> Show a kernel configuration menu before compilation # then in kernel configuration menu use save config -> edit via vi -> laod config ___ ____ _ ____ _ ____________ ___ ___ / _ \| _ \(_) | _ \| |/ /___ /___ // _ \ / _ \ | | | | |_) | | | |_) | ' / |_ \ |_ \ (_) | (_) | | |_| | __/| | | _ <| . \ ___) |__) \__, |\__, | \___/|_| |_| |_| \_\_|\_\____/____/ /_/ /_/ Welcome to Armbian Focal with Linux 4.4.213-rk3399 System load: 0.19 0.14 0.06 Up time: 1 min Memory usage: 3 % of 3809MB IP: 192.168.1.90 CPU temp: 55°C Usage of /: 19% of 15G Last login: Sat Aug 8 18:47:55 2020 from 192.168.1.85 root@orangepi-rk3399:~# v4l2-ctl --list-devices rkisp10_selfpath (platform:rkisp10-000): /dev/video0 /dev/video1 /dev/video2 /dev/video3 root@orangepi-rk3399:~# root@orangepi-rk3399:~# ffmpeg -f v4l2 -list_formats all -i /dev/video0 ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 9 (Ubuntu 9.3.0-10ubuntu2) configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --arch=arm64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared 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 [video4linux2,v4l2 @ 0x5594189760] Raw : yuyv422 : YUYV 4:2:2 : [video4linux2,v4l2 @ 0x5594189760] Raw : yuyv422 : YUYV 4:2:2 : [video4linux2,v4l2 @ 0x5594189760] Raw : uyvy422 : UYVY 4:2:2 : [video4linux2,v4l2 @ 0x5594189760] Raw : yuv422p : Planar YVU 4:2:2 : [video4linux2,v4l2 @ 0x5594189760] Raw : Unsupported : Y/CbCr 4:2:2 : [video4linux2,v4l2 @ 0x5594189760] Raw : yuv420p : Planar YUV 4:2:0 : [video4linux2,v4l2 @ 0x5594189760] Raw : yuv420p : Planar YUV 4:2:0 : [video4linux2,v4l2 @ 0x5594189760] Raw : yuv420p : Planar YVU 4:2:0 : [video4linux2,v4l2 @ 0x5594189760] Raw : nv12 : Y/CbCr 4:2:0 : [video4linux2,v4l2 @ 0x5594189760] Raw : Unsupported : Y/CrCb 4:2:0 : [video4linux2,v4l2 @ 0x5594189760] Raw : gray : 8-bit Greyscale : [video4linux2,v4l2 @ 0x5594189760] Raw : Unsupported : 16-bit A/XYUV 4-4-4-4 : [video4linux2,v4l2 @ 0x5594189760] Raw : Unsupported : Y/CbCr 4:4:4 : [video4linux2,v4l2 @ 0x5594189760] Compressed: mjpeg : JFIF JPEG : [video4linux2,v4l2 @ 0x5594189760] Raw : rgb565le : 16-bit RGB 5-6-5 : [video4linux2,v4l2 @ 0x5594189760] Raw : bayer_grbg8 : 8-bit Bayer GRGR/BGBG : /dev/video0: Immediate exit requested root@orangepi-rk3399:~# Profit ! but it's too early to rejoice ffmpeg and gstreamer not runing Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... Setting pipeline to PLAYING ... New clock: GstSystemClock ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device '/dev/video0' failed during initialization Additional debug info: gstv4l2object.c(3782): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Call to S_FMT failed for NV12 @ 1920x1080: Bad address Execution ended after 0:00:00.117020985 Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline .. Parsing a group of options: input url /dev/video0. Applying option hwaccel (use HW accelerated decoding) with argument vaapi. Applying option f (force format) with argument v4l2. Applying option pix_fmt (set pixel format) with argument nv12. Applying option s (set frame size (WxH or abbreviation)) with argument 1920x1080. Applying option r (set frame rate (Hz value, fraction or abbreviation)) with argument 30. Successfully parsed a group of options. Opening an input file: /dev/video0. [video4linux2,v4l2 @ 0x5595907930] fd:3 capabilities:84200001 [video4linux2,v4l2 @ 0x5595907930] Current input_channel: 0, input_name: tc358749xbg, input_std: 0 /dev/video0: Bad address 1
Werner Posted August 9, 2020 Posted August 9, 2020 Maybe you wanna to share your success by commiting a PR to https://github.com/armbian/build/blob/master/config/kernel/linux-rk3399-legacy.config ? 1
whitefox Posted August 10, 2020 Author Posted August 10, 2020 On 8/9/2020 at 10:05 AM, Werner said: Maybe you wanna to share your success by commiting a PR to https://github.com/armbian/build/blob/master/config/kernel/linux-rk3399-legacy.config ? I don’t think this is a good idea as it will probably break someone's LCD There is also a chance of managing such settings through dts file
Recommended Posts