Skip to content

Instantly share code, notes, and snippets.

@mallendeo
Created January 20, 2017 04:27
Show Gist options
  • Save mallendeo/885535e5654f5d23eb5e3ab1ca46efaf to your computer and use it in GitHub Desktop.
Save mallendeo/885535e5654f5d23eb5e3ab1ca46efaf to your computer and use it in GitHub Desktop.
Raspberry Pi Commands
/opt/vc/bin/raspivid -vf -hf -ih -t 0 -ISO 800 -ex night -w 720 -h 405 -fps 24 -b 1000000 -o - | tee output_original.h264 | ffmpeg -re -i - -codec:v libx264 -profile:v baseline -preset ultrafast -b:v 64k -maxrate 64k -bufsize 64k -vf scale=320:240 output_file.mp4 -y
/opt/vc/bin/raspivid \
-vf -hf -ih -t 0 -ISO 800 -ex night \
-w 720 -h 405 -fps 24 -b 1000000 -o - | \
gst-launch-1.0 -v fdsrc \
! h264parse \
! omxh264dec \
! omxh264enc \
! rtph264pay \
! udpsink host=127.0.0.1 port=5000
## Server
# save to file and stream with gstreamer
/opt/vc/bin/raspivid \
-vf -hf -ih -t 0 -ISO 800 -ex night \
-w 720 -h 405 -fps 24 -b 1000000 -o - | tee output_original.h264 | \
gst-launch-1.0 -v fdsrc \
! h264parse \
! rtph264pay config-interval=3 pt=96 \
! gdppay \
! tcpserversink host=192.168.0.122 port=5000
# TODO
/opt/vc/bin/raspivid \
-vf -hf -ih -t 0 -ISO 800 -ex night \
-w 720 -h 405 -fps 24 -b 1000000 -o - | tee output_original.h264 | \
gst-launch-1.0 -v fdsrc \
! omxh264enc \
! videoconvert ! videoscale ! video/x-raw,width=320 \
! rtph264pay config-interval=3 pt=96 \
! gdppay \
! tcpserversink host=192.168.0.122 port=5000
## Client
gst-launch-1.0 -v tcpclientsrc host=192.168.0.122 port=5000 \
! gdpdepay \
! rtph264depay \
! avdec_h264 \
! videoconvert \
! autovideosink sync=false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment