Streaming dshow to RTP

About encoding, codec settings, muxers and filter usage
karl_frode
New Cone
New Cone
Posts: 9
Joined: 15 Apr 2010 11:05

Streaming dshow to RTP

Postby karl_frode » 15 Apr 2010 11:31

Hello!

I am having problems streaming live from a direct show device to rtp. It works fine if I mux the streams to a ts stream, but I cannot get it to work to send audio on one port and video on another port. Streaming a file the same way works great. I use the following commands.

This code does not work, it just streams the audio and with a packet capture I see packets received only on port 40004.

Code: Select all

vlc -vvv -I rc dshow:// :dshow-vdev="Decklink Video Capture" :dshow-adev="Decklink Audio Capture" :dshow-caching=2000 :dshow-chroma=UYVY :dshow-fps=25 --sout #duplicate{dst=display}, dst={transcode{width=320,venc=x264{keyint=50,level=3.0,profile=baseline,nocabac,me=umh,merange=26, subme=10,vbv-maxrate=180,vbv-bufsize=1000,vbv-init=0.9,qpstep=2}vcodec=x264,vb=150,scale=1,acodec=mp4a, ab=56,channels=2,samplerate=32000,audio-sync}:rtp{port-video=40002,port-audio=40004,dst=192.168.0.104,sdp=file://c:\share\live-min.sdp}}}
When streaming a file instead the same command works great and data is received on separate ports.

Code: Select all

vlc -vvv -I rc "c:\share\down.mp4" --sout #transcode{width=320, venc=x264{keyint=50,level=3.0,profile=baseline,nocabac,me=umh,merange=26,subme=10, vbv-maxrate=180,vbv-bufsize=1000,vbv-init=0.9,qpstep=2}vcodec =x264,vb=150,scale=1,acodec=mp4a,ab=56,channels=2,samplerate=32000} :rtp{port-video=40002,port-audio=40004,dst=192.168.0.104,sdp=file://c:\share\live-min.sdp}
But I don't see that the problem should be with the capture device because this command also works great and both audio and video is received, although in a ts stream on the same port.

Code: Select all

vlc -vvv -I rc dshow:// :dshow-vdev="Decklink Video Capture" :dshow-adev="Decklink Audio Capture" :dshow-caching=2000 :dshow-chroma=UYVY :dshow-fps=25 --sout #duplicate{dst=display},dst={transcode{width=320,venc=x264{keyint=50,level=3.0,profile=baseline, nocabac,me=umh,merange=26,subme=10,vbv-maxrate=180,vbv-bufsize=1000,vbv-init=0.9,qpstep=2}vcodec=x264,vb=150,scale=1,acodec=mp4a, ab=56,channels=2,samplerate=32000,audio-sync}:rtp{mux=ts,port=40000,dst=192.168.0.104,sdp=file://c:\share\live-min.sdp}}}
Am I missing something in the command? Any help would be appreciated!
Thank you!

edit: I am using VLC 1.0.5 btw.

karl_frode
New Cone
New Cone
Posts: 9
Joined: 15 Apr 2010 11:05

Re: Streaming dshow to RTP

Postby karl_frode » 16 Apr 2010 15:01

I just tested stream the muxed ts stream locally to 127.0.0.1:10000 and open another instance of vlc to restream it without ts capsulation, and that works....

So if I run two instances of vlc like this:

First instance:

Code: Select all

vlc.exe -vvv -I rc dshow:// :dshow-vdev="Decklink Video Capture" :dshow-adev="Decklink Audio Capture" :dshow-caching=2000 :dshow-chroma=UYVY :dshow-fps=25 :sout=#transcode{width=320,venc=x264{keyint=50,level=3.0,profile=baseline,nocabac,me=umh,merange=26,subme=10,vbv-maxrate=180,vbv-bufsize=1000,vbv-init=0.9,qpstep=2}vcodec=x264,vb=150,scale=1,acodec=mp4a,ab=56,channels=2,samplerate=32000,audio-sync}:rtp{port=10000,mux=ts,dst=127.0.0.1}
Second instance:

Code: Select all

vlc -vvv -I rc rtp://@:10000 :sout=#rtp{dst=192.168.0.104,port-video=10004,port-audio=10008,sdp=file://c:\share\live-min.sdp}
Then I receive a rtp stream with audio on port 10008 and video on port 10004.

But if I stream directly with this command and only one instance, I only receive audio on port 10008.

Code: Select all

vlc.exe -vvv -I rc dshow:// :dshow-vdev="Decklink Video Capture" :dshow-adev="Decklink Audio Capture" :dshow-caching=2000 :dshow-chroma=UYVY :dshow-fps=25 :sout=#transcode{width=320,venc=x264{keyint=50,level=3.0,profile=baseline,nocabac,me=umh,merange=26,subme=10,vbv-maxrate=180,vbv-bufsize=1000,vbv-init=0.9,qpstep=2}vcodec=x264,vb=150,scale=1,acodec=mp4a,ab=56,channels=2,samplerate=32000,audio-sync}:rtp{dst=192.168.0.104,port-video=10004,port-audio=10008,sdp=file://c:\share\live-min.sdp}
Is anybody experiencing this? Does anybody have suggestions on how to make it work in just one instance without ts mux?
Thank you!


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 20 guests