Include timeshift buffer in recordings

Discussion in 'General Development (no feature request here!)' started by regeszter, September 20, 2013.

Thread Status:
Not open for further replies.
  1. regeszter
    • Premium Supporter

    regeszter Retired Team Member

    Joined:
    October 29, 2005
    Messages:
    5,335
    Likes Received:
    2,863
    Ratings:
    +5,152 / 18
    Home Country:
    Hungary Hungary
    The uploaded build is outdated in this post, and I won't upload any new build to this thread. If you want to use/test this feature please visit the TsBufferExtractor plugin for TvServer thread.

    Thx. :)

    Hi Everybody!

    This is a new feature for Mediaportal.

    Features

    When the recording starts, the timeshift buffer will be copyed to the same folder where the recording is stored.



    Installation Instructions

    This is a TEST version without official support by the Team!

    The installer was build from latest master branch (nearly 1.5 final). You can upgrade from 1.4, 1.5-pre versions.
    Start the client configure.exe with /debugoptions and select the option.

    debug.png


    Known Issues, Limitations
    • After a finished recording, you have to switch to an another channel, before start a new one. (I will handle it in the next version.)
    • There is 500-1000 ms gap between end of the ts buffers and begining of the recording, so we lost some frames from the TV show.

    Change log
    • V2: fix channel change bug
    • V3: copy from begin of the tv show, do not copy if the there is no start point (no EPG or the start point was overwritten because of the buffer is too small)

    Feedback

    Please attach the server and the client debug logs.
    Thanks!

    Regeszter



    My original 1st post was:
    (Hi,

    I have miss this feature so I started to rework this part of code. The feature is working now but I have an issue.

    The TS buffer files can not be played with Windows Media Player or VLC. The MediaPoral can play it of course. It seems there is no valid header or something in the TS buffer file. So I can not merge TS buffers with recorded file with external programs.

    Is there any idea?

    Thanks!)
     
    Last edited: May 19, 2014
    • Thank You! Thank You! x 9
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Vasilich
    • Team MediaPortal

    Vasilich Test Group

    Joined:
    August 30, 2009
    Messages:
    3,392
    Likes Received:
    608
    Gender:
    Male
    Occupation:
    Developer
    Location:
    Germany, Mayence
    Ratings:
    +1,173 / 2
    Home Country:
    Russian Federation Russian Federation
    Show System Specs
    please, please, make this feature working! i am not sure how do you want to manage it as mm13520 said that there are no timestamps in timeshift file, so no way to recognize/cut it from the beginning of show.

    Have you tried to merge timeshift buffer file with "normally" recorded one? e.g. with VideoReDo or with Solveig?
    @mm1352000 is there any difference between timeshift file and recorded (with MP of course) file?
     
  4. regeszter
    • Premium Supporter

    regeszter Retired Team Member

    Joined:
    October 29, 2005
    Messages:
    5,335
    Likes Received:
    2,863
    Ratings:
    +5,152 / 18
    Home Country:
    Hungary Hungary
    Hi,

    I used an easy way. When the recording started I save the timeshift position. After that I copied the buffers with time order. So I store the all buffers but I think it is not a problem.

    For example:

    I have a checker to see if the buffer was reused or not.

    TSbuffer1
    TSbuffer2
    TSbuffer3 <- this is the current buffer, I read the position
    TSbuffer4

    I copy the files with this order.

    If the buffer was reused, I copy the files after current file until last file.
    If the current buffer in not the 1st file, I copy the files from the 1st one.
    At the end I have copy the current file until the current position.

    In this example:
    TSbuffer4
    TSbuffer1
    TSbuffer2
    TSbuffer3 until current position.

    It works but these files cant be played with WMP or VLC. MP Classic and Mediaportal can play it.
     
  5. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,527
    Likes Received:
    4,738
    Ratings:
    +8,205 / 17
    Home Country:
    New Zealand New Zealand
    There is no guarantee that buffers are aligned to packet boundaries. Perhaps VLC and WMC can't find the alignment in certain cases. I did a quick experiment and confirmed that this might be the problem.

    PS: as much as I am happy that you are working on this, I really hope it will be easy to port to TVE 3.5.
     
    • Thank You! Thank You! x 1
    • Agree Agree x 1
  6. MrCrabs

    MrCrabs Portal Pro

    Joined:
    January 21, 2010
    Messages:
    884
    Likes Received:
    117
    Gender:
    Male
    Occupation:
    Ingenieur Maschinenbau / mechanical engineer
    Location:
    Braunschweig
    Ratings:
    +129 / 1
    Home Country:
    Germany Germany
    Show System Specs
    As far as I know this feature is available, but only if you start config with "/debugoptions", then there is a possibility to use it, see attachment.
     

    Attached Files:

    • debug.png
      debug.png
      File size:
      69.8 KB
      Uploaded:
      September 20, 2013
      Views:
      151
  7. regeszter
    • Premium Supporter

    regeszter Retired Team Member

    Joined:
    October 29, 2005
    Messages:
    5,335
    Likes Received:
    2,863
    Ratings:
    +5,152 / 18
    Home Country:
    Hungary Hungary
    Yes, I know but that is not working.
     
  8. sonnybonds

    sonnybonds Portal Pro

    Joined:
    December 3, 2008
    Messages:
    85
    Likes Received:
    3
    Ratings:
    +9 / 0
    Home Country:
    Germany Germany
    Show System Specs
    @regeszter and team MediaPortal:
    You are my personal hero, if you get to work this!!! (y)

    I have been waiting for ages for this feature to come to MP. Even my six year old Easy-VDR-installation managed that and I really missed it when switching to MP.

    Me and some users where asking for it in 2009 or 2010 and when GEMX implemented it as debug option, I hoped it would come soon as a standard feature of MP. But then, nothing happend. :cry:

    This should be a standard-feature for MP1 and MP2 and therefore should find it´s way into TVE3 and TVE3.5.

    I hope the team will support your in your undertaking and will implement it as soon as possible! If it should not be possible with your approach, then maybe the team could think ways in rewriting TS-File-Management?!

    Good luck and thank you for try regeszter!
     
  9. Spragleknas
    • Team MediaPortal
    • Administrator

    Spragleknas Administrator

    Joined:
    December 21, 2005
    Messages:
    9,472
    Likes Received:
    1,385
    Gender:
    Male
    Occupation:
    Occupied
    Location:
    Located
    Ratings:
    +1,892 / 12
    Home Country:
    Norway Norway
    Show System Specs
    I agree that this is "the" feature I miss the most. Getting this to work properly (in TVE 3.5) would be great!

    You're probably aware that this has been discussed and tried a number of times - hopefully you can dig (read: search) up the treads to save you some time regarding what works and not.... also see "similar threads".
     
  10. FreakyJ
    • Team MediaPortal

    FreakyJ Development Group

    Joined:
    July 25, 2010
    Messages:
    4,021
    Likes Received:
    839
    Gender:
    Male
    Ratings:
    +1,424 / 1
    Home Country:
    Germany Germany
    one question: Do I understand it correct that you copy the complete TimeshiftBuffer in front of the recording?
    I have a timeshiftbuffer of around 24h which would result in huuuuuuuuge recordings with a lot of stuff to skip...
     
  11. regeszter
    • Premium Supporter

    regeszter Retired Team Member

    Joined:
    October 29, 2005
    Messages:
    5,335
    Likes Received:
    2,863
    Ratings:
    +5,152 / 18
    Home Country:
    Hungary Hungary
    Yes. Does your TV server in use 7/24h? I mean is the TV server timeshifting all day?
     
Loading...
Thread Status:
Not open for further replies.

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!