Getting an image out of the stream

About encoding, codec settings, muxers and filter usage
qubix
New Cone
New Cone
Posts: 5
Joined: 07 Jan 2009 09:41

Getting an image out of the stream

Postby qubix » 07 Jan 2009 09:46

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
--
qubix

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Getting an image out of the stream

Postby Jean-Baptiste Kempf » 07 Jan 2009 11:13

Yes, you can.
Maybe the best way is to request a snapshot from VLC every 5 seconds.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

qubix
New Cone
New Cone
Posts: 5
Joined: 07 Jan 2009 09:41

Re: Getting an image out of the stream

Postby qubix » 09 Jan 2009 11:00

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.
--
qubix

qubix
New Cone
New Cone
Posts: 5
Joined: 07 Jan 2009 09:41

Re: Getting an image out of the stream

Postby qubix » 09 Jan 2009 14:09

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!
--
qubix


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 0 guests