Page 1 of 1
Streaming JPEG out to RTP
Posted: 20 Apr 2010 08:57
by Wallboy
I currently stream video out through RTP to an SDP file. I would like to know how I can do this with a single JPEG file. My batch file for video streaming is something like this:
Code: Select all
"C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" -vvv -I rc "file:///C:\video.avi" --sout="#transcode{vcodec=h264,vb=500,scale=1,acodec=mp4a,ab=32,channels=2,samplerate=22050}:rtp{dst=127.0.0.1,port=1234,sdp=file://C:\vlc.sdp}"
How would I modify this to stream a jpeg image and how do I set a duration for it? Thanks.
Re: Streaming JPEG out to RTP
Posted: 20 Apr 2010 11:04
by VLC_help
I don't think VLC has vcodec=jpg module.
Re: Streaming JPEG out to RTP
Posted: 20 Apr 2010 11:26
by Wallboy
I have been searching for how to do it and I came up with this:
Code: Select all
"C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" -vvv -I rc "fake://C:\image.jpg" --fake-duration 500000 --fake-width 320 --fake-height 180 --sout="#transcode{vcodec=h264,vb=100,width=320,height=180,acodec=none}:rtp{dst=127.0.0.1,port=1234,sdp=file://C:\vlc.sdp}" --loop --sout-keep
Seems to do the trick. If I make the image to big in pixels or bytes I start to get some "rc underflow" and "late picture skipped" warnigns? What are these? I need to figure out how to optimize for lowest possible bitrate. Would I need to make the JPG as small as I can in terms of bytes? What video codec would be best for a static image like this? Any other flags I should be adding/removing?
Re: Streaming JPEG out to RTP
Posted: 21 Apr 2010 12:14
by VLC_help
Those are just general desync warnings. Changing JPEG size isn't really good option, better thing is to adjust vb variable and resolution. H.264 is good option, good quality on low bitrates.
Re: Streaming JPEG out to RTP
Posted: 21 Apr 2010 13:13
by Wallboy
Thanks for the reply. As I am streaming that SDP file online, and having an upload bandwidth of only 640kbps keeps me pretty limited. I'm trying to adjust now for best bitrate without any hiccups. I've tried adding a --fake-fps flag and when I set it to 1 i get constant "late picture skipped" and the SDP doesn't playback even locally. Not until I up it to 5 FPS does it stop giving me errors/warnings and work. Not sure if I'm better off just leaving that flag off. Also trying to figure out how to have an audio file play in the background, but apparently input-slave is broken. Any other ways to do this?
Re: Streaming JPEG out to RTP
Posted: 22 Apr 2010 16:38
by VLC_help
VLC doesn't work correctly with low FPS input.