Using VLC with Wowza Pro (native RTP)

You can skip this whole SDP file mess. Follow the most recent instructions:

https://www.wowza.com/docs/how-to-use-vlc-as-a-live-stream-encoder-with-wowza-media-server-mpeg-ts)

Charlie

We would need more detail to help. What do you mean it doesn’t run? What are the error/warning messagess? What is happening in Wowza? How do you have Wowza setup?

Charlie

That is correct. Port sharing does not work for different streams sharing the same port. It is for binding to the same port more than once to receive the same stream.

Charlie

I have a problem getting this command line to work

vlc -vvv rtsp://81.140.146.206/mpeg4/1/media.amp --sout "#transcode{venc=x264,vcodec=x264,vb=500,scale=1,acodec=mp4a,ab=32,channels=2,samplerate=22100}:rtp{dst=127.0.0.1,sdp=http://127.0.0.1:9000/myStream.sdp}"

I can get it streaming with vlc 0.8.6i but vlc keeps loosing connection to the camera and stopping. It stops also if I just try playing back the original stream in vlc.

With vlc 0.9.6 I can playback the original stream without it stopping but vlc crashes when I try to use the command line to stream it.

Does anyone know if the command line has changed for the later versions?

Roger.

I think the problem with 0.8.6 is a firewall issue. My firewall was blocking the response from the get requests to the camera when vlc was trying to reset the timeout. Open the firewall or tunnel through http and it works.

The problem with 0.9.6 is a documented bug with that version where x264 encoding is broken.

I work ok with VLC in the Windows using the “vlc -vvv …” command .

Later I install the VLC to the linux, but I only could run VLC on the Xwindow GUI to play various video files, if I input the below command in text mode:

vlc -vvv /tmp/Extremists.m4v --sout "#transcode{venc=x264,vcodec=x264,vb=500,scale=1,acodec=mp4a,ab=32,channels=2,samplerate=22100}:rtp{dst=127.0.0.1,sdp=file:///$WMSCONFIG_HOME/content/Extremists.sdp}"

will get the message as follows:

VLC media player 0.8.6d Janus
starting VLC root wrapper... using UID 0 (root)
***************************************
* Running VLC as root is discouraged. *
***************************************
 It is potentially dangerous, and might not even work properly.
[00000001] main private debug: checking builtin modules
[00000001] main private debug: checking plugin modules
[00000001] main private debug: loading plugins cache file /root/.vlc/cache/plugins-04041e.dat
[00000001] main private debug: recursively browsing `modules'
[00000001] main private debug: recursively browsing `/usr/lib/vlc'
[00000001] main private debug: recursively browsing `plugins'
[00000001] main private debug: module bank initialized, found 222 modules
libhal.c 644 : Error connecting to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[00000001] main private warning: Unable to get HAL device properties
[00000001] main private debug: opening config file /root/.vlc/vlcrc
[00000001] main private debug: CPU has capabilities 486 586 MMX MMXEXT SSE SSE2 FPU
[00000001] main private debug: looking for memcpy module: 3 candidates
[00000001] main private debug: using memcpy module "memcpymmxext"
[00000284] main playlist debug: waiting for thread completion
[00000284] main playlist debug: thread 3083533232 (playlist) created at priority 0 (playlist/playlist.c:184)
[00000285] main private debug: waiting for thread completion
[00000285] main private debug: thread 3073043376 (preparser) created at priority 0 (playlist/playlist.c:210)
[00000286] main interface debug: looking for interface module: 1 candidate
[00000286] main interface debug: using interface module "hotkeys"
[00000286] main interface debug: thread 3062553520 (interface) created at priority 0 (interface/interface.c:231)
[00000288] main interface debug: looking for interface module: 1 candidate
[00000288] main interface debug: using interface module "screensaver"
[00000288] main interface debug: thread 3052063664 (interface) created at priority 0 (interface/interface.c:231)
[00000284] main playlist debug: adding playlist item `/tmp/Extremists.m4v' ( /tmp/Extremists.m4v )
[00000290] main interface debug: looking for interface module: 4 candidates
[00000290] skins2 interface error: Cannot open display
[00000290] skins2 interface error: cannot initialize OSFactory
Remote control interface initialized. Type `help' for help.
[00000290] main interface debug: using interface module "rc"
[00000290] main interface debug: thread 3041569712 (manager) created at priority 0 (interface/interface.c:216)
[00000284] main playlist debug: creating new input thread
[00000294] main input debug: waiting for thread completion
[00000294] main input debug: creating statistics handler
[00000296] main stream output debug: stream=`transcode'
[00000297] main private debug: looking for sout stream module: 1 candidate
[00000296] main stream output debug: stream=`rtp'
[00000300] main private debug: looking for sout stream module: 1 candidate
[00000294] main input debug: thread 3031079856 (input) created at priority 0 (input/input.c:265)
[00000300] main private debug: set sout option: sout-rtp-dst to 127.0.0.1
[00000300] main private debug: set sout option: sout-rtp-sdp to file:////usr/local/WowzaMediaServerPro/content/Extremists.sdp
[00000300] main private debug: using sout stream module "stream_out_rtp"
[00000297] main private debug: set sout option: sout-transcode-venc to x264
[00000297] main private debug: set sout option: sout-transcode-vcodec to x264
[00000297] main private debug: set sout option: sout-transcode-vb to 500
[00000297] main private debug: set sout option: sout-transcode-scale to 1
[00000297] main private debug: set sout option: sout-transcode-acodec to mp4a
[00000297] main private debug: set sout option: sout-transcode-ab to 32
[00000297] main private debug: set sout option: sout-transcode-channels to 2
[00000297] main private debug: set sout option: sout-transcode-samplerate to 22100
[00000297] stream_out_transcode private debug: codec audio=mp4a 22100Hz 2 channels 32Kb/s
[00000297] stream_out_transcode private debug: codec video=x264 0x0 scaling: 1.000000 500kb/s
[00000297] main private debug: using sout stream module "stream_out_transcode"
[00000294] main input debug: `/tmp/Extremists.m4v' gives access `' demux `' path `/tmp/Extremists.m4v'
[00000294] main input debug: creating demux: access='' demux='' path='/tmp/Extremists.m4v'
[00000302] main demuxer debug: looking for access_demux module: 2 candidates
status change: ( new input: /tmp/Extremists.m4v )
status change: ( audio volume: 256 )
status change: ( play state: 1 )
[00000294] main input debug: creating access '' path='/tmp/Extremists.m4v'
[00000305] main access debug: looking for access2 module: 5 candidates
[00000305] vcd access debug: trying .cue file: /tmp/Extremists.cue
[00000305] vcd access debug: could not find .cue file
[00000305] access_file access debug: opening file `/tmp/Extremists.m4v'
[00000305] main access debug: using access2 module "access_file"
 :
 :
[00000329] main encoder debug: looking for encoder module: 1 candidate
x264 [warning]: width or height not divisible by 16 (640x360), compression will suffer.
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities MMX MMXEXT SSE SSE2
[00000329] main encoder debug: using encoder module "x264"
[00000344] main private debug: looking for sout access module: 1 candidate
[00000344] main private debug: set sout option: sout-udp-raw to (null)
[00000344] main private debug: net: connecting to 127.0.0.1 port 1232
[00000346] main private debug: thread 26880944 (sout write thread) created at priority 0 (udp.c:268)
[00000344] access_output_udp private debug: udp access output opened(127.0.0.1:1232)
[00000344] main private debug: using sout access module "access_output_udp"
[00000300] stream_out_rtp private debug: access out udp{raw}:127.0.0.1:1232
[00000300] stream_out_rtp private debug: we found a startcode for NAL with TYPE:6
[00000300] stream_out_rtp private debug: we found a startcode for NAL with TYPE:7
[00000300] stream_out_rtp private debug: we found a startcode for NAL with TYPE:8
[00000300] stream_out_rtp private debug: maximum RTP packet size: 1450 bytes
[00000300] stream_out_rtp private debug: sdp=v=0
o=- 1223295593848183 1 IN IP4 127.0.0.1
s=NONE
t=0 0
a=tool:vlc 0.8.6d
c=IN IP4 127.0.0.1
m=video 1232 RTP/AVP 96
b=AS:500
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=4d4033;sprop-parameter-sets=Z01AM5p0BQF/y4CIAAAfSAAHUwR4wZU=,aO48gA==;
Segmentation fault

What dose it mean ?

I think you can set between 0 and 1. Default value is 0.1, reading here:

http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/NetStream.html#bufferTime

I think that Wowza takes the sdp stream and makes it available to many clients, but there is only one stream coming from VLC, and if you are playing it then Wowza will not get it and be able to stream it through to clients.

Richard

Are you using an ElasticIP? I think I got that exact error with ElasticIP, fixed it by using the whole public DNS.

Richard

Did you allow ports 50000 and 50001 in your EC2 default security group?

Richard

Great!, you’re welcome, glad to have helped.

Richard

Wowza can handle many streams, you don’t need another instance on the same machine.

Richard

Just give each one a unique name, vlc1.sdp, vlc2.sdp, etc.

Richard

Is this two instances of VLC on the same machine? Are there two cameras?

Richard

The first post of this thread is the VLC guide, and for that use case. What part is not working for you?

Flash Media Live Encoder, Quicktime Broadcaster and Wirecast are each much easier then VLC.

Richard

On my home router I forward ports from internet to source of rtsp stream, in my case an axis cam. Then I use the public IP of my router to access the stream from anywhere else.

Richard

Take a look at the Troubleshooting Live Streaming Issues post:

http://community.wowza.com/t/-/57

Richard

I don’t. VLC has a reputation for being difficult. I don’t think it is a Wowza issue.

Richard

Probably Wirecast is the best option, with mac and pc versions and many nice tv station features.

Quicktime Broadcaster is free, but mac only, good quality but basic, no tv station features.

fastvdo smartcapture pro is interesting, a hardware solution, plugs into usb with the form factor of a thumb drive, connects to analog devices.

Richard

Can you explain in more detail what you are doing now?

Richard