11-20-2020, 10:07 AM
(This post was last modified: 11-20-2020, 10:08 AM by vfr400racer.
Edit Reason: typo
)
(11-19-2020, 11:42 PM)sawdust Wrote: Hi thereDaniel's ffmpeg command tries to stream to a rtmp server. Daniel's rtmp server listens at IP 192.168.1.89.
I downloaded the 2020-11-07 NixOS image for a new Pinecube, and seem to have an issue recording from CSI camera.
Using the README's Additional Notes, the first `media-ctl` command is accepted, but the second `ffmpeg` produces a couple of warnings and fatal "Connection refused" messages.
The console output:
Code:[0;nixos@nixos: ~nixos@nixos:~]$ ifconfig eth0 eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.89 netmask 255.255.0.0 broadcast 192.168.10.255 inet6 fe80::fc4b:a0ff:fe6e:967c prefixlen 64 scopeid 0x20<link> ether fe:4b:a0:6e:96:7c txqueuelen 1000 (Ethernet) RX packets 4265 bytes 259345 (253.2 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 240 bytes 11889 (11.6 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 39 [0;nixos@nixos: ~nixos@nixos:~]$ media-ctl --set-v4l2 '"ov5640 1-003c":0[fmt:UYV /15]'8/640x480@1/ [0;nixos@nixos: ~nixos@nixos:~]$ ffmpeg -s 640x480 -r 15 -i /dev/video0 -vcodec //192.168.1.89/live/pinecube ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 9.3.0 (GCC) configuration: --disable-static --prefix=/nix/store/s1isxzyg45p5nmhnns8m8fk78m cmvqky-ffmpeg-4.3.1-armv7l-unknown-linux-gnueabihf --arch=armv7l --target_os=lin ux --enable-gpl --enable-version3 --enable-shared --enable-pic --enable-runtime- cpudetect --enable-hardcoded-tables --enable-pthreads --disable-w32threads --dis able-os2threads --enable-network --enable-pixelutils --enable-ffmpeg --disable-f fplay --enable-ffprobe --enable-avcodec --enable-avdevice --enable-avfilter --en able-avformat --enable-avresample --enable-avutil --enable-postproc --enable-swr esample --enable-swscale --disable-doc --enable-bzlib --enable-gnutls --enable-f ontconfig --enable-libfreetype --enable-libmp3lame --enable-iconv --enable-libth eora --enable-libssh --disable-vaapi --disable-libdrm --disable-vdpau --enable-l ibvorbis --disable-libvpx --enable-lzma --disable-opengl --disable-libmfx --disa ble-libaom --disable-libpulse --enable-libsoxr --enable-libx264 --enable-libxvid --enable-zlib --enable-libopus --enable-libspeex --enable-libx265 --enable-libd av1d --disable-debug --enable-optimizations --disable-extra-warnings --disable-s tripping --cross-prefix=armv7l-unknown-linux-gnueabihf- --enable-cross-compile libavutil 56. 51.100 / 56. 51.100 libavcodec 58. 91.100 / 58. 91.100 libavformat 58. 45.100 / 58. 45.100 libavdevice 58. 10.100 / 58. 10.100 libavfilter 7. 85.100 / 7. 85.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 7.100 / 5. 7.100 libswresample 3. 7.100 / 3. 7.100 libpostproc 55. 7.100 / 55. 7.100 [video4linux2,v4l2 @ 0x7c370] ioctl(VIDIOC_G_PARM): Inappropriate ioctl for devi ce [video4linux2,v4l2 @ 0x7c370] Time per frame unknown [ 263.240190] alloc_contig_range: [46c80, 46cf1) PFNs busy Input #0, video4linux2,v4l2, from '/dev/video0': Duration: N/A, start: 263.387902, bitrate: N/A Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480, 15.08 tb r, 1000k tbn, 1000k tbc [tcp @ 0x81100] Connection to tcp://192.168.1.89:1935 failed: Connection refused [rtmp @ 0x80c10] Cannot open connection tcp://192.168.1.89:1935 rtmp://192.168.1.89/live/pinecube: Connection refused [0;nixos@nixos: ~nixos@nixos:~]$
Any ideas on how to resolve this?
Thanks in advance.
Regards
You can either setup a rtmp server (there is a rtmp module for nginx available), or, for testing purposes, dump the video stream to a local file.
In the this case, you replace "rtmp://192.168.1.200/live/pinecube" with "mycamera.avi" or something similar.

