Created
February 27, 2020 16:22
-
-
Save ianmackinnon/cf8a4d6cdb08852a818fc34bd4e1882f to your computer and use it in GitHub Desktop.
Capture Nikon D90 with `gphoto2` and stream from Raspberry Pi over RTP using GStreamer
This file contains hidden or 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
port=5000 | |
gst-launch-1.0 -e -v udpsrc port=${port} ! \ | |
application/x-rtp, media=video, encoding-name=H264 ! \ | |
rtph264depay ! \ | |
queue ! \ | |
avdec_h264 ! \ | |
autovideosink sync=false |
This file contains hidden or 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
# The D90 Live View is 640x426 at around 24fps | |
# The bottom 3 rows are magenta | |
# If we crop the 3 top and bottom rows we get 640x420 | |
port=5000 | |
host=192.168.1.127 # <- Set **client** IP here | |
gphoto2 --capture-movie --stdout | gst-launch-1.0 -v -e \ | |
fdsrc ! \ | |
image/jpeg,framerate='(fraction)'24/1,width=640,height=426 ! \ | |
jpegdec ! \ | |
videocrop top=3 bottom=3 ! \ | |
queue ! \ | |
x264enc pass=qual quantizer=35 tune=zerolatency ! \ | |
rtph264pay ! \ | |
udpsink host=${host} port=${port} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment