You are not logged in.

#1 2010-08-19 06:05:27

fiod
Member
Registered: 2007-04-02
Posts: 205

Linking a video file to /dev/video?

Hi,

I've got a program using the web camera of the computer via /dev/video.
I want to run the program such that /dev/video will provide video from a file, rather than from the web camera (or any other /dev/video0,video1 or whatever).

Anyone got a clue?

Thanks a lot
fiod

Offline

#2 2010-08-19 13:04:11

tsv
Member
From: UK
Registered: 2008-12-03
Posts: 71
Website

Re: Linking a video file to /dev/video?

I don't know of any way of doing exactly as you ask, but if the program is open source it shouldn't be too hard to point the code at a "normal" file rather than a device.

Offline

#3 2010-08-19 13:26:15

hbekel
Member
Registered: 2008-10-04
Posts: 311

Re: Linking a video file to /dev/video?

Sounds like a video loopback device such as the one provided by ALVD is what you're looking for.

Offline

#4 2010-08-19 22:39:53

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,294

Re: Linking a video file to /dev/video?

Unfortunately, its not as easy as one would think.  Unlike audio, you cannot just stream to the device node. 

Search for  v4l2 (video for linux 2)
VLC and mplayer handle v4l very well.

edit fixed typo

Last edited by ewaller (2010-08-19 22:40:49)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB