Page 1 of 1

Getting an image out of the stream

Posted: 07 Jan 2009 09:46
by qubix
Hi!

I have a job assignment and I want to use VLC for it. I have to create a stream server, that would just stream video/audio inputs from input cards in realtime or near realtime (2 secs delay max).

I've read some great howtos and will start trying myself with the help of google first - no questions there :)

I've got one question. I will need to get a frame/image out of the stream every 5-10 seconds. Is that possible with VLC? Is it possible without disrupting the video stream? Where can I read more about it?

Regards

Re: Getting an image out of the stream

Posted: 07 Jan 2009 11:13
by Jean-Baptiste Kempf
Yes, you can.
Maybe the best way is to request a snapshot from VLC every 5 seconds.

Re: Getting an image out of the stream

Posted: 09 Jan 2009 11:00
by qubix
Thank you! I've searched and i found it!!!

Here is what I have:

Code: Select all

cvlc v4l2:// :v4l2-vdev="/dev/video0" -V image --image-out-format=png --image-out-width=-1 --image-out-height=-1 --image-out-prefix=aaaaaaa --image-out-ratio=25
and this gives me:

Code: Select all

[00000509] avcodec encoder error: cannot open encoder [00000509] main encoder error: no suitable encoder module for fourcc `png '. VLC probably does not support this image format.
every second. I guess that it is some silly dependency problem with png libs. I've got ubuntu 8.10.... and installed the VLC using apt-get.

On the other hand, this command works perfectly:

Code: Select all

cvlc v4l2:// :v4l2-vdev="/dev/video0" --sout '#transcode{vcodec=x264,vb=1000,scale=1}:std{access=mmsh,mux=asfh,dst=:1234}'
How can i check, which libs does VLC search for when trying to get png written? I've already installed sdl stuff, but it didn't help.

Regards.

Re: Getting an image out of the stream

Posted: 09 Jan 2009 14:09
by qubix
man pages and google are amazing.

I found out that my error was caused by using "--image-out-width=-1 --image-out-height=-1" - my card gives stupid dimensions of the frames. If I set those hard, it works. And I found that out just by adding -v.

solved.

Regards!