Live content with prerecorded video files?
i just follow this tutorial but it didnt work
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?
Last edited by paymok; 02-26-2012 at 10:03 AM.
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.
Have you seen the scheduler example?
Note that the scheduler does not have to be built if you download the Wowza Modules Collection, which is linked to in the article.
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?
1: Yes, right
2: Yes, it's a live stream. The source is a static file, but it gets started and is played out as a live stream. Like a tv program (a re-run).
3: You have to start and playback streams in the same application/application instance (the application instance is "_definst_" if not otherwise specified)
4: "Stream1" in the example is just a live stream name, not a file. It is arbitrary, make it whatever you want.
6: No, I think you are describing vod now. This is a live stream. The experience should be (approx) the same for each user.
7: Take a look at this method instead for this requirement:
Make sure you re-start Wowza after adding jar file.
Run Wowza in stand-alone (/bin/startup.bat) mode instead of as a service so you can see log output in the console, it's very helpful.
Playback "Stream1". It is case-sensitive.
This is exactly what i want to do! i used these code and modify a bit, now it works great as i expected.
Originally Posted by rrlanham
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.
In my test with this ServerListener, if the live stream has not been published, there is no stream during its 10 seconds, then the stream starts again when the static (sample.mp4) is playing.
Here is another approach to switching on a live stream:
just some additional question about this approaches http://www.wowza.com/forums/content....de-live-stream
can wowza record the played stream to a file?
cause the tutorial mentioned it is an low-level call approaches, i am not sure is that possible.
Yes, Wowza can record a live stream to a file. In your Application.xml you can set the Streams/StreamType to "live" or you can use the Live Stream Record module.