Streaming JPEG out to RTP

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
Wallboy
Blank Cone
Blank Cone
Posts: 10
Joined: 20 Apr 2010 08:53

Streaming JPEG out to RTP

Postby Wallboy » 20 Apr 2010 08:57

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.

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: Streaming JPEG out to RTP

Postby VLC_help » 20 Apr 2010 11:04

I don't think VLC has vcodec=jpg module.

Wallboy
Blank Cone
Blank Cone
Posts: 10
Joined: 20 Apr 2010 08:53

Re: Streaming JPEG out to RTP

Postby Wallboy » 20 Apr 2010 11:26

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?

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: Streaming JPEG out to RTP

Postby VLC_help » 21 Apr 2010 12:14

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.

Wallboy
Blank Cone
Blank Cone
Posts: 10
Joined: 20 Apr 2010 08:53

Re: Streaming JPEG out to RTP

Postby Wallboy » 21 Apr 2010 13:13

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?

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: Streaming JPEG out to RTP

Postby VLC_help » 22 Apr 2010 16:38

VLC doesn't work correctly with low FPS input.


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 23 guests