Using VLC with Wowza Pro (native RTP)

roughly a 20mb upload 50mb download

After getting some help from Charlie I was directed to this forum: https://www.wowza.com/docs/troubleshoot-live-streaming It dealt with packet loss which is what was probably happening. I also had to change my keyframe settings and that did the trick. My stream is working perfectly from all our remote stream points.

Guys,

could anybody point me on how to do the above if Webcam(with VLC), Wowza and FlashClient are 3 different machines?

Thanks in advance

Charlie,

thanks for the fast response.

I’m not sure I understand how it works then…

If .sdp file is created on VLC side and I set path to it in Flash client app, how will Flash app know the address/port of the Wowza instance (I can imagine it takes address from the sdp file, but not the port)?

And how will Wowza know on which port to listen for the stream from the VLC?

Charlie,

unfortunately problem still appears.

As I said before in my setup I use VLC, Wowza and Client on 3 different machines.

Below are configs I’ve tried so far, maybe you could advise something.

  1. If I make .sdp file available via http on VLC side (port 9000) and on Client I set

Server: rtmp://wowza_ip/rtplive

Stream: http://vlc_ip:9000/vlc.sdp

Then Wowza server simply doesn’t get the SDP info and doesn’t open the ports to receive the stream from VLC.

  1. If I copy the vlc.sdp file to “/usr/local/WowzaMediaServerPro/content/” folder and set on Client:

Server: rtmp://wowza_ip/rtplive

Stream: vlc.sdp

Then Wowza receives the stream from VLC but doesn’t send it to Client (I look with tcpdump). They exchange some short packets (40-107 bytes) each 2-5 sec, nothing more.

I’ve tried both LiveVideoStreaming and NativeRTPVideoStreaming with the same result.

Thanks

Done,

thanks in advance

Does anybody know how to extract SDP data in server side application?

Charlie,

as far as I understand VLC (or any other plain RTP) stream gets received by Wowza only after client calls NetStream.play() and Wowza receives the stream until at least one client requests it.

If that’s correct there are few questions:

  • does it call OnPublish server side method after client calls NetStream.play?

  • is there a way to start publishing without calling NetStream.play on client side? In other words can I publish RTP stream from VLC to Wowza without sending it to client?

Thanks

On WinXP with VLC-0.9.2 I’ve used string sdp=“file://c:/Program Files/Video Chat/tmp/out.sdp” inside vlm file.

I can suggest you to use double quotes where you have spaces and first try to get screen output.

try to enable logging in VLC: --file-logging --logfile=".\vlc.log".

How many times did you instal VLC on this machine? If more then 1 you may try to remove module cache.

does it play the file if you open it from GUI?

Try to stream it from GUI and check the command line it creates

I’ve emailed you. Did you try to get the command string using GUI?

UPD: You have to experiment with VLC and it imho it behaves more predictable on Linux.

I would break it in simple steps (e.g. play file with GUI, play with CMD, stream with GUI, stream with CMD) and try it step by step for a few days.

VLC is really tricky - sometimes you have to use single or double quotes, etc. There’s a good forum and wiki on their site - try those also.

  1. I believe you should use vcodec=h264, not x264. I would also manually specify ports (both to be even, e.g. …dst=127.0.0.1,port-video=1234,port-audio=1236…)

  2. Try to switch some CPU features (SSE2 for example) off statically in VLC config - some of them usually cause crashes on Windows.

  3. VLC does transmit h264 stream via plain RTP (your case) or in MPEG-TS container.

someone can post a line command example of using vlc to transmite only the audio to a wowza server? I am playing the songs using an radio automation system, so, the audio must be captured from stereo mix of sound device.

Thanks,

Hi Charlie,

In my case, Wowza Server is not running on my desktop, so:

dst=ipofmywowza insted of 127.0.0.1

but about sdp ? how could be this ?

thanks,

Hi

I was going to send data of the streaming to global WowzaServer with VLC.

I run such an command.

it did not move.

vlc -vvv dshow:// :dshow-vdev="Video device" :dshow-adev="Audio device" :dshow-size="640x480" --sout "#transcode{venc=x264,vcodec=x264,vb=500,scale=1,acodec=mp4a,ab=32,channels=2,samplerate=22100}:rtp{dst=globalwowzaserver,sdp=file://globalwowzaserver/rtplive/vlc.sdp}"

Will what I take be possible in Wowza?

Is a command wrong?

M.Kagawa

Thanks for an reply

I tried it, but a .sdp file was not made in Server.

Must I put terminal and WowzaServer transmitting data in VLC in the same network?

M.Kagawa

Thanks

I understood.

I thought that I was lost when it was easily accessed Wowza Media Server by the outside with VLC.

Thank you.

M.Kagawa

Thanks for the rapid response :slight_smile:

It works fine now. Here’s the working command line…

[PHP]vlc test.flv --sout-ffmpeg-profile=low --sout ‘#duplicate{dst=“transcode{width=640,height=480,venc=x264,vcodec=x264,vb=300,acodec=mp4a,ab=128,channels=2,samplerate=44100}:duplicate{dst=rtp{dst=127.0.0.1,port-video=10000,port-audio=10002,sdp=file:///usr/local/WowzaMediaServerPro/content/vlc1.sdp}}”,dst=“transcode{width=320,height=240,venc=x264,vcodec=x264,vb=96,acodec=mp4a,ab=96,channels=2,samplerate=44100}:duplicate{dst=rtp{dst=127.0.0.1,port-video=10004,port-audio=10006,sdp=file:///usr/local/WowzaMediaServerPro/content/vlc2.sdp}}”,dst=“transcode{width=160,height=120,venc=x264,vcodec=x264,vb=16,acodec=mp4a,ab=16,channels=2,samplerate=11025}:duplicate{dst=rtp{dst=127.0.0.1,port-video=10008,port-audio=10010,sdp=file:///usr/local/WowzaMediaServerPro/content/vlc3.sdp}}”}’ vlc:quit[/PHP]

It would be nice to reduce the frame rate also for the narrow bandwidth streams. However the fps setting is ignored in 0.8.6. Hopefully, if this is fixed in future versions of VLC, then the following command would give better results…

[PHP]vlc test.flv --sout-ffmpeg-profile=low --sout ‘#duplicate{dst=“transcode{width=640,height=480,venc=x264,vcodec=x264,vb=300,fps=25,acodec=mp4a,ab=128,channels=2,samplerate=44100}:duplicate{dst=rtp{dst=127.0.0.1,port-video=10000,port-audio=10002,sdp=file:///usr/local/WowzaMediaServerPro/content/vlc1.sdp}}”,dst=“transcode{width=320,height=240,venc=x264,vcodec=x264,vb=96,fps=15,acodec=mp4a,ab=96,channels=2,samplerate=44100}:duplicate{dst=rtp{dst=127.0.0.1,port-video=10004,port-audio=10006,sdp=file:///usr/local/WowzaMediaServerPro/content/vlc2.sdp}}”,dst=“transcode{width=160,height=120,venc=x264,vcodec=x264,vb=16,fps=5,acodec=mp4a,ab=16,channels=2,samplerate=11025}:duplicate{dst=rtp{dst=127.0.0.1,port-video=10008,port-audio=10010,sdp=file:///usr/local/WowzaMediaServerPro/content/vlc3.sdp}}”}’ vlc:quit[/PHP]

Update: I found that the default AAC encoding profile doesn’t work correctly with the Flash AAC decoder. Using the option --sout-ffmpeg-profile=low seems to solve this problem.