Index: /OpenSceneGraph/trunk/src/osgPlugins/ffmpeg/FFmpegHeaders.hpp
===================================================================
--- /OpenSceneGraph/trunk/src/osgPlugins/ffmpeg/FFmpegHeaders.hpp (revision 9854)
+++ /OpenSceneGraph/trunk/src/osgPlugins/ffmpeg/FFmpegHeaders.hpp (revision 9865)
@@ -10,4 +10,5 @@
 #include <avcodec.h>
 #include <avformat.h>
+#include <avdevice.h>
 
 #ifdef USE_SWSCALE    
Index: /OpenSceneGraph/trunk/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp
===================================================================
--- /OpenSceneGraph/trunk/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp (revision 9854)
+++ /OpenSceneGraph/trunk/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp (revision 9865)
@@ -41,6 +41,10 @@
     virtual ReadResult readImage(const std::string & filename, const osgDB::ReaderWriter::Options * options) const
     {
+        if (filename.compare(0, 5, "/dev/")==0)
+        {
+            return readImageStream(filename, options);
+        }
+    
         const std::string ext = osgDB::getLowerCaseFileExtension(filename);
-
         if (! acceptsExtension(ext))
             return ReadResult::FILE_NOT_HANDLED;
@@ -53,9 +57,14 @@
             return ReadResult::FILE_NOT_FOUND;
 
-        osg::notify(osg::INFO) << "ReaderWriterFFmpeg::readImage " << path << std::endl;
+        return readImageStream(filename, options);
+    }
+    
+    ReadResult readImageStream(const std::string& filename, const osgDB::ReaderWriter::Options * options) const
+    {
+        osg::notify(osg::INFO) << "ReaderWriterFFmpeg::readImage " << filename << std::endl;
 
         osg::ref_ptr<osgFFmpeg::FFmpegImageStream> image_stream(new osgFFmpeg::FFmpegImageStream);
 
-        if (! image_stream->open(path))
+        if (! image_stream->open(filename))
             return ReadResult::FILE_NOT_HANDLED;
 
Index: /OpenSceneGraph/trunk/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp
===================================================================
--- /OpenSceneGraph/trunk/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp (revision 9826)
+++ /OpenSceneGraph/trunk/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp (revision 9865)
@@ -36,5 +36,4 @@
 
 
-
 bool FFmpegDecoder::open(const std::string & filename)
 {
@@ -44,7 +43,41 @@
         AVFormatContext * p_format_context = 0;
 
-        if (av_open_input_file(&p_format_context, filename.c_str(), 0, 0, 0) != 0)
-            throw std::runtime_error("av_open_input_file() failed");
-
+        if (filename.compare(0, 5, "/dev/")==0)
+        {
+            avdevice_register_all();
+        
+            osg::notify(osg::NOTICE)<<"Attempting to stream "<<filename<<std::endl;
+
+            AVFormatParameters formatParams;
+            memset(&formatParams, 0, sizeof(AVFormatParameters));
+            AVInputFormat *iformat;
+
+            formatParams.channel = 0;
+            formatParams.standard = 0;
+            formatParams.width = 640;
+            formatParams.height = 480;
+            formatParams.time_base.num = 1;
+            formatParams.time_base.den = 50;
+
+            iformat = av_find_input_format("video4linux2");
+            
+            if (iformat)
+            {
+                osg::notify(osg::NOTICE)<<"Found input format"<<std::endl;
+            }
+            else
+            {
+                osg::notify(osg::NOTICE)<<"Failed to find input_format"<<std::endl;
+            }
+
+            if (av_open_input_file(&p_format_context, filename.c_str(), iformat, 0, &formatParams) != 0)
+                throw std::runtime_error("av_open_input_file() failed");
+        }
+        else
+        {
+            if (av_open_input_file(&p_format_context, filename.c_str(), 0, 0, 0) !=0 )
+                throw std::runtime_error("av_open_input_file() failed");
+        }
+        
         m_format_context.reset(p_format_context);
 
