Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: using ffmpeg on /dev/video




Nexus 7 writes:
 > 
 > 
 > I'd like to do quite the same thing but encode the live video to realmedia 
 > stream for webcasting.
 > what i'd like to know is when the /dev/video is available. I mean can I grab 
 > the video from it when i've booted the card and tuned to a chan or do I have 
 > to leave VDR or any other "DVB" software running to keep the/dev/video 
 > device "open" ?

The last tuner setting will remain even after you close the tuning
devices. If you use the r/n/tuxzap you won't have any problems,
because they don't open /dev/video. AFAIK you can also tell vdr not to
open /dev/video, so that you can leave the tuning applications on an
still open the v4l device.

 > 
 > also I'm not sure what's best.. geting the video from /dev/video or trying 
 > to get the MPEG Stream then decode it thru a software and encode it back to 
 > whatever format I need ?
 > 

If you don't want an MPEG sream it would be better to encode from
/dev/video, but only if you can do it in realtime. /dev/video has the
advantage that you can scale the picture to your desired size and you
can choose the color format (within the limits of the v4l drive).
If you want to be sure not to miss anything, it would be better to use
the MPEG stream, but your CPU will have to be even faster than in the
case of encoding from /dev/video.

 > then how do I get the "live" MPEG Stream properly ? what's the best way to 
 > manipulate the MPEG Stream on the fly ?

If you use ntuzap for tuning, you can use the -e option, so that you
get a transport stream from /dev/ost/dvr. You will have to leave
ntuxzap on, but you can just "cat /dev/ost/dvr > file" to get the
stream. The transport stream does not contain a PAT or PMT, so you
will have to know or find out the PIDs for video and audio.
In the mpegtools directory you can find some tools to convert the
transport stream. Some of them can be used on the fly, some can't.
 
For divx encoding you should use a program like ffmpeg that uses v4l,
i.e. /dev/video. You will save a lot of CPU power, if you don't have
to decode and maybe even rescale the MPEG stream.
At the moment you will only be able to use YUV422, I just checked in a
fix, so that ffmpeg works for me.

Marcus

-- 
---------------------------------------------------------------------
Dr. Marcus Metzler                             
mocm@netcologne.de                     http://www.metzlerbros.de
mocm@convergence.de                    http://www.convergence.de

Convergence Integrated Media GmbH          
Rosenthaler Str. 51                   
D-10178 Berlin                             
---------------------------------------------------------------------


-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.


Home | Main Index | Thread Index