User Tools

Site Tools


projects:farmrobot:steuerungs-kamera

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
projects:farmrobot:steuerungs-kamera [2021/03/02 11:22]
nicolas-leon
projects:farmrobot:steuerungs-kamera [2021/03/14 17:51] (current)
jonas [Authors]
Line 3: Line 3:
 The FPV Camera serves a video stream as the first person view (FPV) of the Robot. This makes it possible to see the position of the Robot and anything in its way. The FPV Camera serves a video stream as the first person view (FPV) of the Robot. This makes it possible to see the position of the Robot and anything in its way.
  
-==== Hardware ====+===== Hardware =====
  
 A 3d Printed mount for the Bosch40x40 profile was made to stick a polie on it so that the camera gets a better view. The camera is set in a case which was designed with a litte roof to prevent raindrops on the lense. A 3d Printed mount for the Bosch40x40 profile was made to stick a polie on it so that the camera gets a better view. The camera is set in a case which was designed with a litte roof to prevent raindrops on the lense.
Line 13: Line 13:
 The following hardware is used for capturing and broadcasting the video stream: The following hardware is used for capturing and broadcasting the video stream:
   * Raspberry Pi 4B (8GB) by element14   * Raspberry Pi 4B (8GB) by element14
-  * Raspberry Pi CSI camera NoIR+  * element14 Raspberry Pi CSI camera v.2 NoIR
   * USB-C cable   * USB-C cable
   * Heatsinks   * Heatsinks
Line 20: Line 20:
   * SD-Card   * SD-Card
  
-==== Software ====+===== Software =====
  
 The SD-Card has been flashed with an Ubuntu 20.10 arm64-raspi OS. The SD-Card has been flashed with an Ubuntu 20.10 arm64-raspi OS.
Line 26: Line 26:
   * user name: pi   * user name: pi
   * password: farmrobot   * password: farmrobot
 +
 Its connectable via ethernet or build in wifi module. Its connectable via ethernet or build in wifi module.
  
Line 36: Line 37:
 ''sudo nano /boot/firmware/config.txt [gpu_mem=512 ; start_x=1]'' ''sudo nano /boot/firmware/config.txt [gpu_mem=512 ; start_x=1]''
  
-=== Setup ===+==== Setup ==== 
 + 
 +  sudo apt install v4l-utils 
 +  sudo apt install ffmpeg 
 +  sudo apt install openssh-server sudo ufw allow ssh ssh pi@farmrobot 
 +   
 +=== ffmpeg stream === 
 +Bash script ''stream.sh'': 
 +  ffmpeg -f v4l2 -input_format h264 -video_size 852x480 -framerate 5 -i /dev/video0> 
 +  -c:v h264 -preset veryfast -b:v 500k -maxrate 500k -bufsize 10k \ 
 +  -pix_fmt yuv420p -g 10 \ 
 +  -f flv "rtmp://ingest_server/streamkey"  
 + 
 + 
 +==== Optional v4l2m2m encoder on arm 64 bit OS ====
  
 Using v4l2m2m encoder to have arm64 hardware support to efficiently encode a efficient h.265 stream which is sent via rtmp to a server which reencodes to hls to view video stream in a browser. Using v4l2m2m encoder to have arm64 hardware support to efficiently encode a efficient h.265 stream which is sent via rtmp to a server which reencodes to hls to view video stream in a browser.
  
-ffmpeg is used for data conversion:+Building ffmpeg from source for the newest release and support for v4l_m2m hardware encoding on 64 bit arm.
  
-''cd/home/pi/ mkdir -p ~/ffmpeg_sources ~/ffmpeg_build mkdir -p ~/bin''+''cd/home/pi/ mkdir -p ~/ffmpeg_sources ~/ffmpeg_build ~/bin''
  
 (installing to /home/pi/bin/ to avoid conflicts with the system package folder) (installing to /home/pi/bin/ to avoid conflicts with the system package folder)
Line 183: Line 198:
   make install &&   make install &&
   hash -r   hash -r
 +  
 +  source ~/.profile
  
-  source ~/.profile +===== Authors ===== 
-  sudo apt install v4l-utils +* Jonas Geßmann, Environment & Energy, jonas.gessmann@protonmail.com \\ 
-  sudo apt install openssh-server sudo ufw allow ssh ssh pi@farmrobot +* Nicolas Wiehe
-   +
-=== ffmpeg stream === +
-Bash script ''stream.sh'': +
-  ffmpeg -f v4l2 -input_format h264 -video_size 852x480 -framerate 5 -i /dev/vide> +
-  -c:v h264 -preset veryfast -b:v 500k -maxrate 500k -bufsize 10k \ +
-  -pix_fmt yuv420p -g 10 +
-  -f flv "rtmp://ingest_server/streamkey" +
projects/farmrobot/steuerungs-kamera.1614684154.txt.gz · Last modified: 2021/03/02 11:22 by nicolas-leon