[pvrusb2] streaming through windows share

Felix Lighter felix.lighter at gmail.com
Tue Oct 9 12:50:25 CDT 2007


The ideal mechanism would be a named pipe, but I don't know whether
those even span nfs, let alone samba.

eg. from linux:
# mkfifo video_relay
# cat > /dev/video0 > video_relay

from lucky win32:
C:\NET\> vlc video_relay


On 10/9/07, Matt Nyerges <mnyerges at gmail.com> wrote:
> >
> > > Hi,
> > >
> > > Is it possible, or can anyone think of anyway /dev/video0 can be
> > > streamed through windows share?
> > >
> > > For example:
> > > 1) Share the /dev directory on a linux box.
> > > 2) On a windows desktop, access the shared /dev directory and
> > > double-click on 'video0'.
> > > 3) Start watching a live stream.
> > >
> > > Of course the above doesn't work.
> > >
> > > I am able to stream /dev/video0 through VLC, but i'm wondering if
> > > there is a way to do it through windows shares.
> >
> > Ryan:
> >
> > That's an interesting idea.
> >
> > However that's really a question for Samba (the entity I presume you are
> > using to share the "files" with Windows).  I suspect that this would not
> > be likely to work since the concept of devices masquerading as files is
> > completely alien to the Windows file sharing world.  Samba can't really
> > treat a character device (which is what /dev/video0 is) in the way it
> > would probably need to in order to support attached SMB clients.  File
> > locking isn't going to work, for example.  Opening the file for writing
> > isn't going to work either.  And forget about trying to lseek() such a
> > file, which is really a sequential device under the hood.
> >
> > If you can teach Samba how to export a character device so that it is
> > read-only, can't be locked, and can't be seeked, then you might have a
> > chance here.  However even that might not be enough because a streaming
> > character device doesn't have the concept of a file size and needing to
> > know that might also be a showstopper.
> >
> >   -Mike
> >
> > Ryan,
>
> I don't know how much disk space you have on your computer, but you might
> try sharing a directory using Samba (like /home/username/videos), and then
> run a "cat /dev/video0 > /home/username/videos/livetv.mpg".
>
> Then on your Windows box try to access livetv.mpg on that share.  This way
> you could also seek in your stream (pause, rewind, etc.).
>
> The only drawback I see is disk space usage and that while cat'ing the video
> the file livetv.mpg may be locked and inaccessible from the Windows share.
>
> -Matt
> _______________________________________________
> pvrusb2 mailing list
> pvrusb2 at isely.net
> http://www.isely.net/cgi-bin/mailman/listinfo/pvrusb2
>


More information about the pvrusb2 mailing list