Wowza Community

RTP (VLC) to RTMP (Wowza) to flashPlayer(Website)

Hello i am new at this forum and i am developing an application of Live TV under Linux Ubuntu LTS 10.4.

I have an DVB-T usb stick getting the data from VLC and sending via rtp stream to Wowza Media Server 3 then on Wowza Media Server 3 i have publish the streams and i am assessing to then via flash player. how i did this…

First in VLC i am doing the stream via console using the code showed next.

vlc -vvv --ttl 12 --dvb:// --dvb--frequency=754000000 --dvb-bandwidth=8 ---sout '#rtp{mux=ts,dst=239.255.1.10,port=5004}'

i have also tested with and movie(already transcoded in H264/AAC - “movie.ts”) in loop but the result was the same

vlc -vvv PATH_TO_MOVIE ---sout '#rtp{mux=ts,dst=239.255.1.10,port=5004}'

So now for the test i am using the movies in loop instead of the deb-t stick.

vlc -vvv stream.ts ---sout '#rtp{mux=ts,dst=239.255.1.10,port=5004}'
vlc -vvv stream2.ts ---sout '#rtp{mux=ts,dst=239.255.1.20,port=5004}'

Then on Wowza i have configure the file StartupStreams.xml (/WowzainstalationPath/conf/live) with this follow 2 streams

<StartupStream>
<Application>live/_definst_</Application>
<MediaCasterType>rtp</MediaCasterType>
<StreamName>test.stream</StreamName>
<Application>live/_definst_</Application>
<MediaCasterType>rtp</MediaCasterType>
<StreamName>test2.stream</Type>
</StartupStream>

Also on Wowza in /WowzainstalationPath/content/ i create 2 files

File Name: test.stream

udp://239.255.1.10:5004

File Name: test2.stream

udp://239.255.1.20:5004

Then after this configuration i have test my streams in the file /WowzainstalationPath/exemples/LiveVideoStreaming/client/live.html

and everything ok…

after this i went to flashPlayer to open the RTMP stream my first try was in jwplayer with the following code

<script type='text/javascript' src='jwplayer.js'></script>
        <div id='mediaplayer'></div>
        
        <script type="text/javascript">
			jwplayer('mediaplayer').setup({
				
		                'flashplayer': "player.swf",
		                'id': "playerID",
				'width': "800",
				'height': "600",
				'file': "test.stream",
				'image': "preview.jpg",
				'wmode': 'opaque',
                                'icons': 'true',
                                'allowscriptaccess': 'always',
                                'allownetworking': 'all',
				'controlbar': "none",
				'dock': "false",
				'autostart': "true",
				'bufferlength': "1",
				'volume': "10",
				//'playlistfile': "channels.xml",
				//'playlist.position': 'right',
    			       //'playlist.size': '250',
				'streamer': "rtmp://192.168.40.139/live",
				'plugins': {
				   'viral-2': {
					   'onpause': 'false',
					   'callout': 'none'
				   }
				}
				
			});
        
        </script>

Now that i have explain what i did the questions part…

I want to have my 2 streams and some how swap between the streams with the arrows keys like a Television. the problem is in the time that each stream takes to load… is about 30seconds to load each stream…i have try every thing i know i have try to put the 2 items in a playlist and swap then with the mouse and the time is the same…

can someone tell me if this is normal? what i can do to make it faster???

in my investigation i also try to develop a player in Action Script 3 so i did something like this

My idea was to open the two streams (2 connection) and then put each stream in a different likened video from flash and then just put visible each one…

the problem is that when i open the 2 connection just can see 1 stream the 2 stream freezes forever…

my_video._visible = true;
my_video2._visible = false;
var servidor = "rtmp://192.168.40.139/live";
var netConn = new NetConnection();
netConn.connect(servidor);
var ns = new NetStream(netConn);
var ns2 = new NetStream(netConn);
video2="test.stream"
my_video.attachVideo(ns);
var buffer = 2;
ns.setBufferTime(buffer);
ns.play(video);
my_video2.attachVideo(ns2);	
video2="test2.stream"
ns2.setBufferTime(buffer);
ns2.play(video2) 
nextbutton.onPress = function ()
{
	my_video._visible = false;
	my_video2._visible = true;
};
backbutton.onRelease = function ()
{
  	my_video._visible = true;
	my_video2._visible = false;  
};

can any one help me?

in resume i want to open multi stream form wowza in a fast way (something like 2 seconds) and somehow change between the streams with the arrows from the keyboard…

Thanks for the help and sorry for the big post.

Take a look at our VLC/mpegts article

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

Run Wowza in stand-alone mode (/bin/startup.bat) so you can see log output in real time.

The JW Player setup you show is missing either a “file” Flashvar or “playlist” Flashvar (which is commented out)

For testing, use Wowza example Flash player: [wowza-install-dir]/examples/LiveVideoStreaming/client/live.html

Richard

Have you seen this article?

https://www.wowza.com/docs/how-to-set-up-low-latency-applications-in-wowza-streaming-engine-for-rtmp-streaming

Richard

See if this guide helps:

https://www.wowza.com/docs/how-to-use-fastvdo-smartcapture-pro-live-stream-encoder-with-wowza-media-server-native-rtp

Richard

Hi goncloazevedo,

Firstly, thank you for the detailed information. It helps.

It seems you are asking the question, “How do I quickly switch between streams?” This is possible with a Wowza module. Read all the examples here: http://www.wowza.com/forums/showthread.php?16626-dynamic-content-VOD&p=85027&highlight=#post85027

For info on how to control the switching using a Flash application, see the Wowza User Guide section “Bi-Directional Remote Procedure Calls”.

One thing I notice is you are using multicast IP addresses. Is that necessary? Just send both streams to your Wowza server IP on ports that differ by 2.

Edit: Another way to do it in Firefox is to play two videos in two different tabs and switch between tabs using ctrl-pgup/pgdn.

Hello

The file in jwPlayer is not missing is in the top…About the playlist as i said it was for 1 experience but didn’t take to any solution about the time to open the streams (thats why is comment).

I can open the streams separately without any problem.

The main problem is that i need like 30seconds to open a live stream and i need a faster solution like 2 seconds to open the stream

the second part is how i can i swap faster between streams from the flash player???

thanks for the help

Yes i have read and i have that in my application.xml… and as you can see in the player ( ns.setBufferTime(buffer); where buffer=2 ). i had already put 0 seconds but the result was the same…

://///

its normal to take that time to open the stream? what can be this time? encoding time? process time?

About the Multicast IP address is not necessary i can use anther protocol to delivery the content! i start using RTP from vlc so it became more natural to me to use RTP… I can configure Wowza to receive another protocol(!=RTP) and re-stream as a RTMP to open in flash player??

About the link you put is all confirmations in Wowza IDE how i use this Wowza IDE i never used and i don’t know how to use it… I am using Wowza Media Server 3 with a develop key of 180 days…

You know if there are another way to do what i am doing??? a more simples way to stream content from a dvb-t usb stick into a website (flash player)??? LIVE!!! and VoD???

Thanks for answering!

i already try that but not with FastVDO SmartPlayer. at this point i am using vlc streaming over RTP a file, then in wowza i am using test.stream (udp://239.255.1.10:5004) and the with JWPlayer i am opening the the rtmp file with file:“test.stream” and rtmp:“rtmp://MyIpWowza/live or rtplive” but i have already try with vlc saving a .sdp file in my /wowzamediaserver/content folder and then open with JWPlayer that file with file:“test.sdp” but in the final the result is the same :((( long time to open streams and long time to swap between playlist items when i have the playlist items with my test.streams or test.sdp and the link to the rtmp://MyIpWowza/live or rtplive …

Any more help?or suggestions?? thanks…