From http://www.jwz.org/xscreensaver/xscreensaver-5.33.tar.gz
[xscreensaver] / driver / xscreensaver-getimage-video
index cc8d99d3545196cf590d16c91d8398d6805cddb7..dbc89866d2aa6aaeb200222511790df3225963d4 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl -w
-# Copyright © 2001-2013 Jamie Zawinski <jwz@jwz.org>.
+# Copyright © 2001-2015 Jamie Zawinski <jwz@jwz.org>.
 #
 # Permission to use, copy, modify, distribute, and sell this software and its
 # documentation for any purpose is hereby granted without fee, provided that
@@ -30,7 +30,7 @@ require 5;
 use strict;
 
 my $progname = $0; $progname =~ s@.*/@@g;
-my $version  = q{ $Revision: 1.22 $ }; $version =~ s/^[^0-9]+([0-9.]+).*$/$1/;
+my $version  = q{ $Revision: 1.23 $ }; $version =~ s/^[^0-9]+([0-9.]+).*$/$1/;
 
 my $tmpdir   = $ENV{TMPDIR} || "/tmp";
 my $tmpfile  = sprintf("%s/xssv.%08x.ppm", $tmpdir, rand(0xFFFFFFFF));
@@ -64,11 +64,14 @@ my @programs = (
   "motioneye -j $tmpfile",                     # Sony Vaio MotionEye
                                                # (hardware jpeg encoder)
 
-  "vidcat -b -f ppm -s 640x480 > $tmpfile 2>-",        # w3cam/ovcam
+  "vidcat -b -f ppm -s 640x480 > $tmpfile 2>&-", # w3cam/ovcam
 
   "vidtomem -f $tmpfile 2>&- " .               # Silicon Graphics
        "&& mv $tmpfile-00000.rgb $tmpfile",
 
+  # Maybe this works?
+  # "ffmpeg -i /dev/video0 -ss 00:00:01 -vframes 1 $tmpfile 2>&-",
+
   # "mplayer -really-quiet tv://0 " .          # Maybe works with some cams?
   #         "-ao null -vo pnm -frames 1 2>&- " .
   #    "&& mv 00000001.ppm $tmpfile",