Using VLC with Wowza Pro (native RTP)

I changed StreamType back to “rtp-live”. That works as before. But I’m not able to get the edge to work. I added Repeater URL rtmp://orgin in Application.xml and set the StreamType to “liverepeater-edge” I tried both http and local file for sdp file. Does the repeater URL need to be rtmp://orgin/liverepeater instead of just server name? I don’t know how the edge server is going to know that it’s a SDP file stream at the origin server. The user’s guide example just has stream name “mycoolevent” I tried using sdp filename. but …

Thanks

Thank you!!

It works with a small correction:

Edge:

Liverepeater with stream type changed from “live-repeater-edge” to “liverepeater-edge”

FYI, when I ran with stream type “live-repeater-edge” I got "Stream Not Found. NullPointer Exception from MediaStreamMap.getStream.

Thanks for this tutorial Charlie, it works great with FlowPlayer. I’ve tested this on localhost but now I would like to test it online.

Let’s say I’m streaming from A (my machine) to B (WMS hosted online). I need to publish vlc.sdp from A to B. You previously said this :

Yes, they need to be in the same network. VLC needs to be able to save the SDP file to the server running Wowza Pro…

Another option is to have VLC make the sdp information available at a url. The format is something like this:

sdp=“http://[vlc-ip-address]:9000/streamtest/mystream.sdp”

Where [vlc-ip-address] is the ip address of the machine running VLC.

The you would use a stream name in Flash of:

rtplive:http://[vlc-ip-address]:9000/streamtest/mystream.sdp

Charlie

I don’t understand http part. Why [vlc-ip-address] ? Why 9000 ? How vlc can make mystream.sdp available at this URL ?

Can I upload vlc.sdp somewhere via ftp ?

The vlc.sdp publishing is only made at RTP streaming start ? Is it updated lately ?

How can it work if both servers are not in same network ?

Thank you.

Is there an IRC for wowza?

Would be great !

@charlie : I tried to create SDP file from outside VLC and it works great.

It seems only an ID changed between 2 SDP file creation. Using the same ID does not seem to be a problem.

But now, there’s something strange, sth like Lukasz has mentionned already.

Using nativertp sample html page, there’s no image shown but sound is ok.

I also record a TS file and image is here. Anything changed with 1.6.0 about VLC/RTP trick ?

Thank you.

EDIT: My bad, it works now …

Set the key frame interval to 2 seconds (keyint=2,idrint=2).

VLC waits for an amount of frames for “keyint” and “idrint” settings, not an amount of seconds.

Setting these to 2 means insert a keyframe or an IDR frame every 2 frames which is certainly too much for the encoder.

Of course, I guess you’re not using fps = 1 :wink:

If you take a look to above given link :

Item options are:

o keyint= allows to set the maximal amount of frames between 2 key frames;

o idrint= allows to set the maximal amount of frames between 2 IDR frames;

o bframes= allows to set the amount of B frames between an I and a P frame;

o qp= allows to specify a fixed quantizer (between 1 and 51);

o qp-max= allows to set the maximum value for the quantizer;

o qp-min= allows to set the minimum value for the quantizer;

o cabac enables the CABAC (Context-Adaptive Binary Arithmetic Coding) algorithm (slower, but enhances quality);

o loopfilter enables deblocking loop filter;

o analyse enables the analyze mode;

o frameref= allows to set the number of previous frames used as predictors;

o scenecut= allows to control how aggressively the encoder should insert extra I-frame, on scene change.

Could we use all these parameters with WMS ? For recorded and live streams ?

Also, I’m trying to find the default values for all these (keyint seems to be at 250). If one knows …

Thank you.

I confirm : keyint default value is 250 in VLC.

Interesting stuff from Adobe :

Keyframes

Keyframes are complete video frames (or images) that are inserted at consistent intervals in a video clip. The frames between the keyframes contain information on movement and scene changes that occurs between keyframes. For example, if a video depicts a person walking past a doorway, the keyframes contain the complete image of the person and the door in the background, and the interval frames contain information describing the person’s movement as they walk in front of the door.

By default, Flash Video Encoder automatically determines the keyframe interval to use based on the video clip’s frame rate. The keyframe interval value tells the encoder how often to re-evaluate the video image and record a full frame, or keyframe, into an FLV file. In Flash Video Encoder, this setting is the keyframe interval value, which represents the number of frames between keyframes. Flash Video Encoder approximates frames that reside between keyframes by estimating the full value of all pixels on the screen by comparing multiple frames and eliminating redundant information.

The keyframe interval value can be any number up to 100. When you select Automatic as an interval setting, Flash Video Encoder places a keyframe every two seconds of playback time. For example, if the video you’re encoding has a frame rate of 30 fps, a keyframe will be inserted every 60 frames. In general, the default keyframe interval value provides a reasonable level of control when seeking within a video clip. If you need to select a custom keyframe placement value, be aware that the smaller the keyframe interval, the larger the file size.

If your footage has a lot of scene changes or rapidly moving motion or animation, then the overall image quality may benefit from a lower keyframe interval. In general, a higher keyframe interval produces better image quality because data is not wasted describing the areas of an image that remain unchanged from frame to frame.

An important dependency of the keyframe interval is that it affects the ability of Flash Player to seek (fast-forward or rewind) through an FLV file. Flash Player can only advance from keyframe to keyframe, so if you want to skip to different places and pause the frames, you must use a lower keyframe interval value. If you want to advance to every frame in an FLV file, use a keyframe interval value of 1. When you reduce the keyframe interval value, you must raise the data rate for the Flash video to maintain comparable image quality.

I thought h264 encoder was broken in VLC >=0.9 …

I’ve successfully ran this using Ethernet and WiFi connections.

Now, I’m trying to use this with a HSUPA USB modem and I’m experiecing macroblocks, etc …

I guess I need to set UDP cache but whatever the value I use, the stream is still ugly.

Do you have any idea ? I think it’s not a bandwidth issue …

Thank you.

Great ! Thank you ! Will try this …

Do I need to set TTL setting in VLC ? I think there’s nothing about caching :frowning:

Also, I get a lot of “access_output_udp private debug: packet has been sent too late” …

For now, my command line is :

vlc -Idummy -vvv dshow:// ... dst=rtp{dst=XX.XXX.XXX.XXX}}

I can add TTL value for RTP just like this :

vlc -Idummy -vvv dshow:// ... dst=rtp{dst=XX.XXX.XXX.XXX,[B]ttl=12[/B]}}

Do you think it will change anything ? What value ?

Ok Charlie, it’s working really better now !

But sometimes, I’m experiencing some freezes. Do I need to raise buffer value ?

Do both values need to be set together ? If I set buffer to 1s, do I need to set flush time to 20ms ?

Thank you.

Yes, sometimes there are packet loss. I don’t know if they come from connection quality or something else.

The bandwith graph coming with HSUPA key software follows these losses.

I’ved tried 500 and 1000ms and maybe 1000 is better. Not really sure, it depends a lot on the connection …

Do I need to adjust flush time if I change buffer value ?

One (stupid ?) question : if I send two different streams from 2 VLC instances at the same time to the same server, I need to use distinct UDP ports for each ? So distinct SDP files ?

Can WMS handle both streams ?

RC4 works here …

Same CPU usage here, for both 0.8.6i and 1.0.0 RC4 (~30% C2D).

I’m using exactly the same command line for both …

VLC 1.0.0 final is out : http://www.videolan.org/vlc/

I think I screwed up with VLC version number: it used to work fine with RC2 or RC3.

Now with RC4 and final, colorspace is wrong and usual command line is not working anymore.

My bad …

Hi,

Thanks again for the Tutorial, Charlie!

I got everything running VLC->WMS->Flash as long as VLC and WMS are on the same machine. And if both servers are publicly available using the http://:/<*.sdp> publication method with vlc.

But if VLC is behind a firewall in a private network and WMS is somewhere in the internet, than I can’t transfer the sdp file information to the WMS.

(This works perfectly with Flash Live Media Encoder instead of VLC, as it uses RTMP.)

How can I publish the sdp-file to the /content folder?

I tried to copy the sdp file created on the VLC machine to the WMS, but that couldn’t really have worked, as the IP information within the SDP file is wrong.

Who establishes the RTP connection? WMS or VLC?

(IF WMS establishes the connection than my setup would be only possible with a VLAN connection between VLC and WMS first.)

My idea is to create the SDP file myself out of the SDP file created by VLC, edit IP adresses and Metadata and send it to the WMS through my own application. I hope the VLC is streaming it’s contents by that time already and WMS picks up that stream as soon as the SDP file is in it’s “/content” folder and the first client requests that stream.

Do you think that works? :slight_smile:

Cheers,

Robert

I have vlc on my laptop, Im trying to send a stream to a wowza pro instance on EC2.

I am using a command like the following but getting no sdp file saved on wowza content folder so rtmp is failing. Need help to understand where Im going wrong.

example vlc call -

dshow:// :dshow-vdev=“WEB CAMERA” :dshow-adev="" :sout=#transcode{vcodec=h264,vb=800,scale=1,acodec=mp4a,ab=128,channels=2}:duplicate{dst=rtp{dst=http://WOWZA INSTANCE PUBLIC DNS,mux=ts,port=1935,sdp=file:///usr/local/WowzaMediaServerPro/content/vlc.sdp }}

Any Ideas? In Dire need of help!!!