i just follow this tutorial but didnt work, and i have some questions for that,
1. Is this example show how to start a live streaming created on the server startup called "Stream1", and these *.m4v files are suppose to play on Stream1?
(stream1 = one tv channel, *.m4v are the videos playing one by one on stream1)
2. follow this example connect to Server: rtmp://[wowza-address]/live, Stream: Stream1 (or Stream2) after a several mins of server startup, am i suppose to
see the video content in the middle of track, not at the beginning?
3. when i try to modify the application name "live" in createInstance to "Myapplication", when i connect to rtmp://[wowza-address]/Myapplication,
the player said Failed to play Stream1; stream not found.
4. the Stream1 is a file or simply a name? if it is just a name, i tried to create the stream instance with my application name,
Stream.createInstance(vhost, "StreamPublisherDemo", "channel1");
rtmp://192.168.1.106/StreamPublisherDemo Stream: channel1
play said "Failed to play channel1; stream not found."
Server log "server comment channel1 open: java.io.FileNotFoundException: /usr/local/WowzaMediaServer/content/channel1.flv (No such file or directory)"
if i place a file call channel.flv in content folder and connect again, it played the content of channel.flv from the beginning...
5. This 3 line of code:
stream1.play("mp4:sample1.mp4", 5, 5, true);
stream1.play("mp4:sample1.mp4", 50, 5, false);
stream1.play("mp4:sample1.mp4", 150, 5, false);
is that mean when stream playing to 5sec, play sample1.mp4 for 5sec.
when stream reach to 50 sec, play sample1.mp4 for 5sec.
am i right?
6. if i just simply want to create a stream called "ABC", like a single tv channel, with playing the video content "program1.mp4", "ad1.mp4", "ad2.mp4, "program2.mp4". so that when client access to link, like 10 mins after the server startup, they can watch content where is playing,
or if "program1.mp4" only got 10mins long, then client should be watch "ad1.mp4" once they connected.
7. can i specific a infinity while loop in server init or server startup method, so that i can constantly check some files source available in runtime?
what do you suggest i should do? is this tutorial relevant to my case?
Did you build the example in Wowza IDE and add a Module to your Application.xml to run it? If so, did it load correctly? It is very helpful to run Wowza in stand-alone (/bin/startup.bat) mode at this stage, so you can see log output in the console.
yes i am using wowza IDE and add a Module to Application.xml to run it, i am running the server and IDE in linux.
the load was correct in eclipse debug. i just dont understand the stream class concept.
i have read the scheduler example, it doesn't fit what i want to do.
my video contents need to add on playlist in runtime, or once the video files is available on server, i need to play them immediately.
use smil playlist require set time for schedule, also require a server restart which doesn't fit my requirement..
i have check the stream class example, it seems it can do what i want, can you explain the questions i asked in this post?
This is exactly what i want to do! i used these code and modify a bit, now it works great as i expected.
but i realize when use this method
provider = new PublishingProviderMediaReader(publisher, publisher.getMaxTimecode(), "file.mp4");
its like putting a video in a stream for playing, but as long as the stream doesn't have anything for playing,
the stream will automatically closed.
is that possible to prevent the stream closing automatically? can i instruct it pause, close manually?
any method can let me keep the stream alive and hold on the last frame where it is played,
so that i can reuse this stream and continue throwing some file into the stream.