Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: dynamic content in a file

  1. #1

    Default dynamic content in a file

    I'm dynamically writing a flv file into the wowza/contents folder and using /vod application to stream it. I notice a couple of things.

    1. Wowza seems to detect the file size at streaming start and stops streaming when that size is reached even though the file is now bigger (i.e. I'm continuously appending to it).

    2. Even if I delete the file and replace the contents with entirely different contents, wowza seems to have substantial amounts of content cached so the stream does not show the new contents.

    I'm probably approaching this problem in the wrong way. I poked around a bit in the forums, but did not see anything like this. Suggestions?

  2. #2

    Default

    okay I've made some progress in getting this to work. However, when I rewrite the file and then try to play it back:

    ERROR server comment - ScheduledRandomAccessReader.bufferMiss[2_720.flv]: Request failed: 983040:3300
    ERROR server comment - ScheduledRandomAccessReader.bufferMiss[2_720.flv]: Request failed: 983044:13
    ERROR server comment - ScheduledRandomAccessReader.bufferMiss[2_720.flv]: Request failed: 1703936:7946
    ERROR server comment - ScheduledRandomAccessReader.bufferMiss[2_720.flv]: Request failed: 1703940:13

    After a bit of time, I'm eventually able to stream the rewritten file.

    It looks like this is a caching issue. Is there a way with a server side module that I can flush these cache buffers or something to get a more immediate playback?

  3. #3
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    Are you trying to play the file while it is being recorded? If you are appending to a file you can play from the beginning to the end of the segment previous to what is currently being recorded. Otherwise you cannot play a file while it is being recorded

    Richard

  4. #4

    Default

    Sort of. I'm periodically updating the files. Now it is possible that it may be playing by some users during the update which I'd like to make as smooth as possible. However, even when not playing, there appears to be some caching going on that I'd like to flush. Can I do that?

  5. #5
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    I'm not sure how to help. There is no file cache as far as I know. It's going to be tricky to playback from while appending to or replacing a file. Maybe Wowza nDVR will work for you?

    http://www.wowza.com/forums/content....live-streaming

    Richard

  6. #6

    Default

    Yes I was originally going to try to use nDVR, but unfortunately it does not support rtmp. Without that, I've lost over half the potential clients. It's going to be at least a year before html 5 becomes standardized enough to go without flash.

  7. #7

    Default

    "2. Even if I delete the file and replace the contents with entirely different contents, wowza seems to have substantial amounts of content cached so the stream does not show the new contents."

    As Richard said, Wowza does not substantially cache VOD content. It only reads (caches) up to 1024kb of the file at a time. It is the OS, not Wowza, that caches subsequent reads to the same logical disk sector in RAM, and serves the data from RAM rather than disk. The errors you saw are related to optimization Wowza does to schedule a group of reads at the same time. If you delete the file and recreate it the OS puts it in a different location in the filesystem, so the file record locations in ScheduledRandomAccessReader are no longer correct.

    If you append to the file, rather than recreating it, you should not get those errors. Alternatively, segmenting the file into chunks (and writing only to new chunks) is the usual method to solve the Producer-Consumer problem you are experiencing.

    What is the overall goal? What are you trying to accomplish? What are you doing in RTMP that you can't do with HTTP? With that info, perhaps someone can point you in the right direction.

  8. #8

    Default

    1. RTMP. Using flowplayer to play flash video to to PC/Mac/Android clients. HTTP to send to ios clients. I haven't looked a flowplayer for a while, but last I checked, http can only be used for ios.

    2. Overall goal. I'm going to simplify the goal. I'd like to periodically update a file and have a new connection open the new file contents. Further I'd like the file to be seekable (i.e. pause, rewind, ff). I'm getting close to getting the first part to work writing a flv file but for some reason it's not seekable. Is there something in the header/trailer that needs to be there to make it seekable? Should I use a different format type?

    ---
    If you append to the file, rather than recreating it, you should not get those errors. Alternatively, segmenting the file into chunks (and writing only to new chunks) is the usual method to solve the Producer-Consumer problem you are experiencing.
    ----
    Thinking about this some more. I could certainly append to the file. How would i force a seek to the start of the appended section so that I play the new content?
    Or alternatively, do you have a tutorial or some kind of write up on how to go about segmenting a file into chunks and playing (seeking, rewinding, etc)? Any kind of writeup to point me in the right direction would be helpful.
    THanks
    Last edited by hockey_dave; 08-07-2012 at 08:45 AM.

  9. #9

    Default

    Anyone? Bueller?....... Bueller?.......Bueller?

  10. #10
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    Again, if you are appending to a file you can play from the beginning to the end of the segment previous to what is currently being recorded. Otherwise you cannot play a file while it is being recorded. So you will not be able to seek into the part of file that is being appended by a live stream.

    Richard

Page 1 of 2 12 LastLast

Similar Threads

  1. Dynamic change midroll content during playback.
    By keithlai in forum Server-side Modules and Code Samples Discussion
    Replies: 3
    Last Post: 07-21-2014, 04:43 AM
  2. Replies: 1
    Last Post: 04-03-2014, 04:51 PM
  3. Dynamic SMIL File
    By hussanchoudhry in forum General Forum
    Replies: 3
    Last Post: 05-13-2013, 09:22 AM
  4. dynamic content VOD
    By keithlai in forum General Forum
    Replies: 3
    Last Post: 01-14-2012, 12:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •