This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
finalwidth=$(ffprobe -v error -select_streams v:0 -show_entries stream=width -of csv=p=0 $1) | |
finalheight=$(ffprobe -v error -select_streams v:0 -show_entries stream=height -of csv=p=0 $1) | |
halfwidth=$(echo "$finalwidth/2" | bc) | |
halfheight=$(echo "$finalheight/2" | bc) | |
x="x" | |
ffmpeg -i $1 -i $2 -i $3 -i $4 -filter_complex "nullsrc=size=$finalwidth$x$finalheight [base]; [0:v] setpts=PTS-STARTPTS, scale=$halfwidth$x$halfheight [upperleft]; [1:v] setpts=PTS-STARTPTS, scale=$halfwidth$x$halfheight [upperright]; [2:v] setpts=PTS-STARTPTS, scale=$halfwidth$x$halfheight [lowerleft]; [3:v] setpts=PTS-STARTPTS, scale=$halfwidth$x$halfheight [lowerright]; [base][upperleft] overlay=shortest=1 [tmp1]; [tmp1][upperright] overlay=shortest=1:x=$halfwidth [tmp2]; [tmp2][lowerleft] overlay=shortest=1:y=$halfheight [tmp3]; [tmp3][lowerright] overlay=shortest=1:x=$halfwidth:y=$halfheight" -c:v libx264 quad_vid.mp4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//this snippet of code is from inav-2.4.0-RC1/src/main/io/osd_dji_hd.c | |
case DJI_MSP_NAME: | |
{ | |
/* DIRECTION TO HOME, DIST TO HOME, SPEED, ALT */ | |
int speed = (int)(gpsSol.groundSpeed * 0.0223694); // centimeters per second to MPH | |
int altitude = (int)lrintf(getEstimatedActualPosition(Z) * 0.0328084); // centimeters to feet | |
static char dirAndDist[16]; | |
static char arrow[7]; |