Last active
August 22, 2021 12:05
-
-
Save Michcioperz/9b777aefa52c2c00b2e9abb9584e86d7 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env nix-shell | |
#!nix-shell -i sh -p websocat gst_all_1.gst-plugins-base gst_all_1.gst-plugins-good gst_all_1.gst-plugins-bad gst_all_1.gst-libav coreutils | |
set -ex | |
(lsmod | grep v4l2loopback >/dev/null) || sudo modprobe v4l2loopback video_nr=10 card_label=v4l2-iphone | |
websocat --binary ws://${IPAD:-shimarin}/ws | dd bs=8 skip=1 | gst-launch-1.0 fdsrc ! queue ! mpegvideoparse ! avdec_mpeg2video ! videoconvert ! videorate ! 'video/x-raw, format=YUY2, framerate=30/1' ! v4l2sink device=/dev/video10 sync=false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment