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.