Problem with timeshift files mutiplying on channel change (while recording)

Discussion in '1.0 final and SVN Builds' started by Owlsroost, February 23, 2009.

  1. Owlsroost
    • Team MediaPortal

    Owlsroost Development Group

    Joined:
    October 28, 2008
    Messages:
    5,537
    Likes Received:
    2,829
    Location:
    Cambridge
    Ratings:
    +4,131 / 1
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    TV-Server Version: 1.0 SVN 21720
    MediaPortal Version: 1.0 SVN 21720
    MediaPortal Skin: Blue 3 wide
    Windows Version: Vista Home Basic SP1
    CPU Type: Intel E4500, 2.2GHz
    HDD: 500GB
    Memory: 2GB
    Motherboard: Dell Vostro 200SL
    Video Card: XFX 9500GT low-profile
    Video Card Driver: 181.20
    Sound Card: Creative SoundBlaster Audigy SE
    Sound Card AC3: Creative SoundBlaster Audigy SE
    Sound Card Driver: P17X_PCDVT_LB_1_04_0079
    1. TV Card: Kworld DVB-T 399U
    1. TV Card Type: DVB-T
    1. TV Card Driver: V8.4.28.1
    2. TV Card:
    2. TV Card Type:
    2. TV Card Driver:
    3. TV Card:
    3. TV Card Type:
    3. TV Card Driver:
    4. TV Card:
    4. TV Card Type:
    4. TV Card Driver:
    MPEG2 Video Codec: PDVD7
    MPEG2 Audio Codec: FFDShow (libavcodec)
    h.264 Video Codec: MPC-HC
    Satelite/CableTV Provider:
    HTPC Case:
    Cooling:
    Power Supply:
    Remote: USB-UIRT -> EventGhost
    TV: Panasonic TX37LZD80 @ 1920x1080p
    TV - HTPC Connection: DVI -> HDMI

    I have a twin-tuner DVB-T setup.

    If MP is recording from a channel, and I then skip between viewing a channel on a different DVB-T 'mux' and one on the same (as the recording) DVB-T 'mux', the TV-server doesn't appear to delete/re-use the timeshift buffer files for the tuner being used for the recording - it keeps creating new ones (until the small 256MB ramdisk I use for timeshifting runs out of space, when the 'live' TV just freezes). It looks like all of the 'sets' of timeshift files are being actually being updated (the file modification times stay in step).

    Logs and screenshot of the timeshift disk files attached.



    TV-server is configured to use a maximum of 3 x 20MB timeshift files per tuner (the minimum possible settings), the timeshift files are stored on a 256MB ramdisk.

    The problem is completely repeatable:

    start MP -> start TV -> manually start recording on current channel -> switch to channel on different DVB-T mux -> switch to channel on same mux as recording -> (repeat last 2 steps a few times) -> result is multiple sets of timeshift files e.g. live1-0.ts.*/live1-2.ts.*/live1-3.ts.* etc all being continually updated (I've never noticed a 'live1-1.ts.*' set created - it always starts with 'live1-0.ts.*' then creates a 'live1-2.ts.*' set next).

    Tony

    (and yes, the thread title has a spelling mistake.....)
     

    Attached Files:

    • timeshift2.jpg
      timeshift2.jpg
      File size:
      101.7 KB
      Uploaded:
      February 23, 2009
      Views:
      206
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. ronilse
    • Premium Supporter

    ronilse Retired Team Member

    Joined:
    July 19, 2005
    Messages:
    4,422
    Likes Received:
    280
    Gender:
    Male
    Occupation:
    MediaPortal tester
    Location:
    Moss
    Ratings:
    +280 / 0
    Home Country:
    Norway Norway
    Show System Specs
    Hi,
    Yeah it's the same issue as we see & it's already in Mantis

    Regards
    Roy
     
    • Like Like x 1
  4. Owlsroost
    • Team MediaPortal

    Owlsroost Development Group

    Joined:
    October 28, 2008
    Messages:
    5,537
    Likes Received:
    2,829
    Location:
    Cambridge
    Ratings:
    +4,131 / 1
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    OK, thanks - I'd searched the forum but not Mantis.

    The description in Mantis isn't quite the same behaviour - once MP has been closed, I can delete all the timeshift files, in fact when the recording and live TV have both stopped I think the extra/spurious timeshift files are deleted by MP - but I agree that my issue is almost certainly another manifestation of the same bug.

    Tony
     
  5. gibman
    • Premium Supporter

    gibman Retired Team Member

    Joined:
    October 4, 2006
    Messages:
    2,998
    Likes Received:
    1,321
    Occupation:
    Developer
    Location:
    Aarhus
    Ratings:
    +1,372 / 0
    Home Country:
    Denmark Denmark
    It's quite an old bug in fact.

    I'll try and explain.

    On any DVB card the directshow graph is basically either running or stopped.

    Obviously when the DVB card is tuned into a channel (rec. or timeshifting), then the graph is running, otherwise it's stopped (no activity).

    The problem is that MP will keep on adding timeshifting files/sessions to the card as long as it is already running.
    Once the DVB graph on that specific card is stopped, then all TS files are removed. And the graph will only stop when all channels on the card are ceased.

    As u can see this will eat away CPU / HD and CAM resources on these "ghost" channels that are no more active.

    Maybe tswriter should be notified when a sub channel is stopped and then remove it internally ?

    /gibman
     
  6. Owlsroost
    • Team MediaPortal

    Owlsroost Development Group

    Joined:
    October 28, 2008
    Messages:
    5,537
    Likes Received:
    2,829
    Location:
    Cambridge
    Ratings:
    +4,131 / 1
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    Sounds like a good idea.

    Something needs to be done about the issue, otherwise it's impossible to determine in advance the maximum disk space the timeshift files need (as well as wasting CPU/disk bandwidth).

    Tony
     
  7. doveman

    doveman Portal Pro

    Joined:
    February 12, 2008
    Messages:
    2,326
    Likes Received:
    166
    Ratings:
    +182 / 3
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    Not trying to hijack this thread, but I seem to be having a similar problem with svn 21813, where MP is trying to create more ts files on channel change (no recordings in progress) and can't cope with the fact that the max number of files I've set (3) already exist: https://forum.team-mediaportal.com/1-0-final-svn-builds-302/livetv-freezing-55764/

    I never experienced this problem in earlier builds. I'm going to try raising the max number of files and reducing the filesize to see if that helps.
     
  8. Owlsroost
    • Team MediaPortal

    Owlsroost Development Group

    Joined:
    October 28, 2008
    Messages:
    5,537
    Likes Received:
    2,829
    Location:
    Cambridge
    Ratings:
    +4,131 / 1
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    doveman - can you add your system specs to your user profile (and make sure they are visible to other users i.e. so that you have a 'My System' pop-up to the left of your posts).

    A few comments:

    1. The number of timeshift files is per tuner, so if max files = 3, a twin-tuner setup can create up to six buffer files, three for each tuner.

    2. A channel change on the same tuner should not create more timeshift buffers - it should re-use the existing files (or at least delete the old ones). If it swaps to a different tuner it will create a new set for that tuner if they don't already exist.

    3. The bug I reported is specific to the situation where a recording is already in progress, and results in continually updated multiple sets of files, 'attached' to the tuner being used for the recording.

    I've just installed SVN 21813 - I'll see what happens with my setup....

    Tony
     
    • Like Like x 1
  9. doveman

    doveman Portal Pro

    Joined:
    February 12, 2008
    Messages:
    2,326
    Likes Received:
    166
    Ratings:
    +182 / 3
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    Sorry about that, didn't realise that system specs aren't visible by default. Should be fixed now.

    Thanks for the tip about the number of timeshift files. I do have a twin-tuner setup, so I'll set the filesize to 40MB, which will allow 6 files to fit on my 256MB ramdisk and see if that fixes the problem. Not sure if MP was trying to use the 2nd tuner but I wouldn't have thought it needed to when just changing channel. There was enough free space for MP to create a new ts file when I had the filesize set to 80MB though, so I'm not sure why it couldn't.

    I've done some more experimenting which might be of interest, but I'll post about that in my own thread. :D
     
  10. tompa
    • Premium Supporter

    tompa MP Donator

    Joined:
    October 3, 2005
    Messages:
    665
    Likes Received:
    35
    Gender:
    Male
    Location:
    Stockholm
    Ratings:
    +35 / 0
    Home Country:
    Sweden Sweden
    Show System Specs
    Hi!

    So why doesn't this happens when NOT running RTSP? I do see the problem with RTSP and multiseat, but not without.

    /tompa

    edit: running dedicated server.
     
  11. Mr Hipp
    • Premium Supporter

    Mr Hipp Retired Team Member

    Joined:
    April 2, 2006
    Messages:
    1,261
    Likes Received:
    187
    Location:
    Malmö
    Ratings:
    +187 / 0
    Home Country:
    Sweden Sweden
    Hi

    I see the problem on a single seat installation.

    Mr Hipp
     
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!