Created
April 27, 2020 22:24
-
-
Save scaprile/786ffd80c27e46e2d90efbd61ac944a4 to your computer and use it in GitHub Desktop.
CentOS virtual camera on an Android tablet running IP Webcam. Uses gstreamer, v4l2loopback, snd-aloop
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
IPWEBCAM=http://192.168.69.245:8080 | |
DONE=`pactl list sinks short | grep -c alsa_output.hw_2_0` | |
if [ $DONE -eq 0 ]; then | |
sudo modprobe v4l2loopback | |
sudo modprobe snd-aloop | |
pactl load-module module-alsa-source device=hw:2,1 # Yes, hardcoded, sorry 'bout that | |
pactl load-module module-alsa-sink device=hw:2,0 | |
fi | |
gst-launch-1.0 souphttpsrc location="$IPWEBCAM/video" do-timestamp=true is-live=true ! queue ! multipartdemux ! jpegdec ! videoconvert ! v4l2sink device="/dev/video1" sync=false & | |
gst-launch-1.0 souphttpsrc location="$IPWEBCAM/audio.wav" is-live=true ! queue ! wavparse ! audioconvert ! pulsesink device="alsa_output.hw_2_0" sync=false & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment