Composite Video Capture on a Mac

FFmpeg Notes (including install instructions): https://www.rickmakes.com/ffmpeg-notes/

HDMI to USB Video Capture Card 1080P: http://ebay.us/Mv0snK (eBay Affiliate)

HDMI to USB Video Capture Card 1080P (Amazon Affiliate)
➡️ Purchase here: https://amzlink.to/az0ERJOIiu3E2
UK: https://amzlink.to/az0Djrn3mt92V
CA: https://amzlink.to/az0XtwYyuS1vE
ES: https://amzlink.to/az0cGAOuYQm1x
FR: https://amzlink.to/az0Ujh0ZxjX0y
IT: https://amzlink.to/az0g9pB8v2rEs
DE: https://amzlink.to/az0GaAubd8C0T
AU: https://amzlink.to/az0sXMG9Cp6IH

Musoc Composite to HDMI Adapter (Amazon Affiliate)
US: https://amzlink.to/az0DZBoP7dAN6

Composite Video Capture Options (Mac/Windows): https://youtu.be/tsgD3x1N2KI

Audio/Video Playlist: https://www.youtube.com/playlist?list=PLErU2HjQZ_ZN4KVIf7ad7Y1CBlosKdZkd

Change aspect ratio without re-encoding
ffmpeg -i capture.mov -aspect 4:3 -vcodec copy capture43.mp4
Change aspect ratio and re-encode
ffmpeg -i capture.mov -aspect 4:3 -r 30 -vf "scale=640:480" -vcodec h264_videotoolbox -b:v 700k -s 640x480 -pix_fmt yuv420p capture43encode.mp4
Change aspect ratio, pad and re-encode
ffmpeg -i capture.mov -r 30 -aspect 16:9 -vf "scale=640:480,pad=854:480:107:0" -vcodec h264_videotoolbox -b:v 700k -s 854:480 -pix_fmt yuv420p capture43pad.mp4

Note: When I imported these .mp4 videos into Final Cut Pro, the audio wasn’t working on them. Audio would play fine in QuickTime Player. To fix the problem, when encoding, I used the “mov” extension instead of “mp4”.

Rolling “Live” Timelapse on Mac using FFmpeg and Amcrest IP Camera

Amcrest UltraHD 5MP POE Bullet IP Security Camera* (Amazon Affiliate)
US: https://amzlink.to/az0IoZeTR3Pte
*This camera is similar to the one used in the video.

FFmpeg notes (including FFmpeg install): https://www.rickmakes.com/ffmpeg-notes/

FFmpeg playlist: https://www.youtube.com/playlist?list=PLErU2HjQZ_ZOPDZ71Khzt5PX4X4j6flkg

Amcrest playlist: https://www.youtube.com/playlist?list=PLErU2HjQZ_ZNYE224qh9K0hhaaIxU-rta

Create RAM Disk (Mac only)
diskutil erasevolume HFS+ "tlramdisk" `hdiutil attach -nomount ram://409600`

A RAM disk is created to store the images. This reduces wear on the computer’s SSD or hard drive. The RAM disk size is 2048 * megabytes. 409600 is 200MB.

Create Image Download Script
nano rollingtimelapse.sh
#!/bin/bash

url=http://username:password@ip_address/cgi-bin/snapshot.cgi

fps=60
tl_length=5
image_count=$((fps*tl_length))

function download_image {
    # This loops until an image is saved as temp. This prevents the saving of empty image files. "temp" purposefully doesn't have an extension so it doesn't get picked up by ffmpeg.

    until [ -s "temp" ]
    do
        curl --digest -o "temp" $url
    done

    # "temp" is renamed to the current file

    mv "temp" $1
    echo $1
}

# Download image once and copy it image_count number of times to preload the image set

download_image `printf "%003d.jpg" 1`

for ((i=1; i<=image_count; i++)); do
    cp -v `printf "%003d.jpg" 1` `printf "%003d.jpg" $i`
done

# Continually download images in a loop

#initialsize the image_number

image_number=1

while :
do
    # Reset image number when it is greater than image count

    if [ $image_number -gt $image_count ]
    then
        image_number=1
    fi

    # current_file is padded with 2 zeros to help with ordering in file system

    current_file=`printf "%003d.jpg" $image_number`

    download_image $current_file;

    image_number=$((image_number+1))

    sleep $tl_length

done

Type control-o to save control-x to exit.

Make Script Executable
chmod +x rollingtimelapse.sh
View Video without Re-encoding (mjpeg)
ffmpeg -framerate 60 -f image2 -stream_loop -1 -pattern_type glob -i '*.jpg' -c:v copy -b:v 10000k -r 60 -f mjpeg pipe:1|ffplay -i pipe:0
Play video and resize on the fly
ffmpeg -framerate 60 -f image2 -stream_loop -1 -pattern_type glob -i '*.jpg' -vf crop=in_w:in_w*9/16,scale=1920:1080,fps=fps=60 -c:v h264_videotoolbox -b:v 10000k -r 60 -pix_fmt yuv420p -f flv pipe:1|ffplay -i pipe:0
Play Video without Resizing
ffmpeg -framerate 60 -f image2 -stream_loop -1 -pattern_type glob -i '*.jpg' -vf fps=fps=60 -c:v h264_videotoolbox -b:v 10000k -r 60 -pix_fmt yuv420p -f flv pipe:1|ffplay -i pipe:0

If you aren’t using an Intel Mac, you can use “libx264” in place of “h264_videotoolbox”.

Tracking Planes with RTL-SDR and a Raspberry Pi running PiAware

RTL-SDR Blog V3 R820T2 (Amazon Affiliate)
US: https://amzlink.to/az0lCILmXsg2W
CA: https://amzlink.to/az00SXj304XA3 (dongle only)
UK: https://amzlink.to/az0QPIMIwF8el
IN: https://amzlink.to/az0qpgu1uTukV
AU: https://amzlink.to/az0cqXNCt06AS

Raspberry Pi (Amazon Affiliate)
➡️ Purchase here: https://amzlink.to/az0g1mNVmPoHn
UK: https://amzlink.to/az0PomlnEt5SC
CA: https://amzlink.to/az0DiN8Nn3a0q
ES: https://amzlink.to/az0EJBn77Kx6U
FR: https://amzlink.to/az0D9vAO9c6oj
IT: https://amzlink.to/az0IacDlkzUlJ
DE: https://amzlink.to/az0gJZ0joeiV5
IN: https://amzlink.to/az0EvJYL9uC71

Software Defined Radio Playlist: https://www.youtube.com/playlist?list=PLErU2HjQZ_ZPHRD_m-N5pzrPPdkXa8Fsf

Raspberry Pi Playlist: https://www.youtube.com/playlist?list=PLErU2HjQZ_ZPvIdR5BEqDgO7DsGAla_AZ

Set up Headless boot (do this after writing the image to the microSD Card

Create ssh or ssh.txt in boot directory.

Create wpa_supplicant.conf in boot directory file to set up Wifi.

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=<Insert 2 letter ISO 3166-1 country code here>

network={
 ssid="<Name of your wireless LAN>"
 psk="<Password for your wireless LAN>"
}

Instructions on FlightAware’s site: https://flightaware.com/adsb/piaware/install

Update Package List and Packages
sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove -y
Change Hostname
sudo raspi-config

Network Options > Hostname

Download PiAware Repository
wget https://flightaware.com/adsb/piaware/files/packages/pool/piaware/p/piaware-support/piaware-repository_3.8.1_all.deb
Install PiAware Repository
sudo dpkg -i piaware-repository_3.8.1_all.deb
Update Package List
sudo apt update
Install piaware and dump1090
sudo apt install piaware dump1090-fa
Enable Automatic and Manual Updates
sudo piaware-config allow-auto-updates yes
sudo piaware-config allow-manual-updates yes
Reboot System
sudo systemctl reboot
Open PiAware Web Interface
http://piaware.local:8080