Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need to stream video from DVBViewer's Netstreamer plugin, and capturing its onscreen video output is too laggy.

Is there any virtual webcam software that accepts HTTP Live Streams as a video source?

share|improve this question

1 Answer 1

If you are on linux you could just use v4l2loopback with mplayer.

  1. Download it,
  2. compile it (make and su -c 'make install'),
  3. load the module with su -c 'modprobe v4l2loopback',
  4. then change one line in the file examples/yuv4mpeg_to_v4l2.c of the v4l2loopback source folder from

    v.fmt.pix.pixelformat = V4L2_PIX_FMT_YUV420;
    

    to

    v.fmt.pix.pixelformat = V4L2_PIX_FMT_YVU420;
    
  5. and do make in this folder.

  6. Then run it from the examples directory like this:

    mkfifo /tmp/pipe  # only needed once, as long as you do not delete the file /tmp/pipe
    ./yuv4mpeg_to_v4l2 < /tmp/pipe &
    mplayer movie.mp4 -vf scale=480:360 -vo yuv4mpeg:file=/tmp/pipe
    

    where you replace movie.mp4 with the name of your video file. And replace /dev/video0 with your loopback device.

MPlayer is able to play any webstreams, all kind of video files and so on. I just tested it with a file from http://www.tagesschau.de which is a german news site.

TS=$(wget "http://www.tagesschau.de/multimedia/video/" -q -O - | grep --regexp='http.*\.webm"' | sed -e 's%.*href="%%' -e 's%\.webm".*%\.webm%')
./yuv4mpeg_to_v4l2 < /tmp/pipe &
mplayer $TS -vf scale=480:360 -vo yuv4mpeg:file=/tmp/pipe
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.