Skip to content

Instantly share code, notes, and snippets.

@AlexRogalskiy
Forked from DamonOehlman/README.md
Created June 12, 2022 18:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlexRogalskiy/3ea710e42201fda69713de5a0dd12211 to your computer and use it in GitHub Desktop.
Save AlexRogalskiy/3ea710e42201fda69713de5a0dd12211 to your computer and use it in GitHub Desktop.
Video Loopback on Ubuntu 13.04

More generic instructions can be found here: https://github.com/umlaeute/v4l2loopback/wiki/Mplayer

Install v4l2loopback

git clone https://github.com/umlaeute/v4l2loopback
cd v4l2loopback
make
sudo make install
sudo modprobe v4l2loopback

Recompile the example for webcam support

mkfifo /tmp/pipe
videofile=~/media/ED_1024.avi; (examples/yuv4mpeg_to_v4l2 /dev/video0 < /tmp/pipe & ); mplayer $videofile -vf scale=480:360 -vo yuv4mpeg:file=/tmp/pipe

Source instructions: https://github.com/umlaeute/v4l2loopback/wiki/Mplayer#flash-webcam

Install gstreamer tools

sudo apt-get install gstreamer-tools

Run a test

gst-launch -v videotestsrc ! "video/x-raw-yuv,width=640,height=360,framerate=30/1,format=(fourcc)I420" ! v4l2sink device=/dev/video1

Ubuntu 13.04 Specific Notes

Need to install ges0.10-tools in addition to all previously mentioned gstreamer-* packages:

sudo apt-get install ges0.10-tools

Source: http://ubuntuforums.org/showthread.php?t=2143922

Additional Articles of Interest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment