Progress bar for video dowloads? | Page 2

Discussion in 'OnlineVideos' started by peque, April 20, 2010.

  1. Wiesel

    Wiesel Portal Member

    Joined:
    April 23, 2008
    Messages:
    34
    Likes Received:
    0
    Ratings:
    +0 / 0
    Home Country:
    Austria Austria
    Thats great to hear, thanks!!



    Are the gui and graphbuilder managed in the same thread? If not you could at least display an animated loading screen so the user knows >something< is happening and MP isn't stuck.
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. offbyone
    • Team MediaPortal

    offbyone Development Group

    Joined:
    April 26, 2008
    Messages:
    3,981
    Likes Received:
    2,704
    Gender:
    Male
    Location:
    Stuttgart
    Ratings:
    +3,303 / 3
    Home Country:
    Germany Germany
    Show System Specs
    I already tried to build the graph in a seperate thread and it still locked up :(
     
  4. Wiesel

    Wiesel Portal Member

    Joined:
    April 23, 2008
    Messages:
    34
    Likes Received:
    0
    Ratings:
    +0 / 0
    Home Country:
    Austria Austria
    I just tried the lastest svn version and the progress bar really works great, also some flv streams that didn't work for me on v0.20 with SAF5 (e.g. Pro7 Desperate Housewifes) are now working as well :)

    I just got another idea for an improved user experience... would it be possible to let the buffer fill to a certain level until the playback starts, and if the buffer drains during playback to pause again until that fill level is reached? For example when watching Apple Movie Trailers on 1080p the stream delivery rate for me is just a tad slower than the playback rate which results in an annoying constant "jidder"... I'd rather wait one time for a few seconds until the stream continues, and I'm pretty sure I'm not the only one!?
     
  5. offbyone
    • Team MediaPortal

    offbyone Development Group

    Joined:
    April 26, 2008
    Messages:
    3,981
    Likes Received:
    2,704
    Gender:
    Male
    Location:
    Stuttgart
    Ratings:
    +3,303 / 3
    Home Country:
    Germany Germany
    Show System Specs
    In plugin config you can already set a buffer level. The playback will be delayed and waitcursor shown until the set percentage has been downloaded.

    Stopping Playback when buffer drains is not so easy, because that is information the filter graph doesn't give. I could match a % of downloaded bytes with the percent of current playback position, but on variable bitrate clips, this isn't equal.
     
  6. Wiesel

    Wiesel Portal Member

    Joined:
    April 23, 2008
    Messages:
    34
    Likes Received:
    0
    Ratings:
    +0 / 0
    Home Country:
    Austria Austria
    I noticed the buffer level setting but it doesn't seem to do anything. Playback starts immediately, no matter what I set the percentage to (eg. YouTube or Apple Movie Trailers)...
     
  7. offbyone
    • Team MediaPortal

    offbyone Development Group

    Joined:
    April 26, 2008
    Messages:
    3,981
    Likes Received:
    2,704
    Gender:
    Male
    Location:
    Stuttgart
    Ratings:
    +3,303 / 3
    Home Country:
    Germany Germany
    Show System Specs
    Good bug finding ;) I'll fix that with the next commit.
     
  8. Wiesel

    Wiesel Portal Member

    Joined:
    April 23, 2008
    Messages:
    34
    Likes Received:
    0
    Ratings:
    +0 / 0
    Home Country:
    Austria Austria
    Does that mean that the buffer is handled by some filter, not by you?

    edit: nevermind, I just found it out

    I've never done anything programming related with DirectShow but after taking a look into MSDN, wouldn't this be a solution to detect buffer drainage:

    Currently, at least in case of a file source url, the graph as I read it from the sources looks something like this: "File Source (URL)" > unknown demux/decode filters > renderer.
    What if we just put a custom filter in between the file source and demux/decoding stage ("File Source (URL)" > buffermonitoring filter > demux/decode ...) that implements IAsyncReader, this way we would know how big the file is, how much has been buffered and how much the subsequent filter has read. If readBytes == bufferedBytes we know that the buffer drained and ths way playback could be paused for some time. If there isn't more magic behind that I can't see, it would be pretty easy to implement, as the read requests would just have to be passed through.
     
  9. offbyone
    • Team MediaPortal

    offbyone Development Group

    Joined:
    April 26, 2008
    Messages:
    3,981
    Likes Received:
    2,704
    Gender:
    Male
    Location:
    Stuttgart
    Ratings:
    +3,303 / 3
    Home Country:
    Germany Germany
    Show System Specs
    The only problem is: Who's gonna develop a directshow filter? That's a really tough one. And I don't have enough time and don't want to wander on the C++ site.
    But, as this is an opensource project ... someone could ...
     
  10. Wiesel

    Wiesel Portal Member

    Joined:
    April 23, 2008
    Messages:
    34
    Likes Received:
    0
    Ratings:
    +0 / 0
    Home Country:
    Austria Austria
    If you think that my proposal would theoretically work, I'll take a look into it. I've never programmed in C++ (just ansi C) but if it turns out that the implementation isn't too hard I'll give it a try.
     
  11. offbyone
    • Team MediaPortal

    offbyone Development Group

    Joined:
    April 26, 2008
    Messages:
    3,981
    Likes Received:
    2,704
    Gender:
    Male
    Location:
    Stuttgart
    Ratings:
    +3,303 / 3
    Home Country:
    Germany Germany
    Show System Specs
    I am not sure if you idea works. IAsyncReader might not be possible in our scenario.
    There are two ways data can go through the directshow graph. Push or Pull.
    I don't recommend going blindly into developing this, with directshow filters you have to do a lot of reading and research before wasting even more time.
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!