[Please Test] Add already watched ts buffer to recording (2 Viewers)

Status
Not open for further replies.

gemx

Retired Team Member
  • Premium Supporter
  • October 31, 2006
    1,972
    539
    Home Country
    Germany Germany
    Probably most of you haven't noticed this "sneaking" in since last public SVN snapshot ;)

    As i currently didn't get much testing feedback i encourage everyone who wants to test this

    Hi,
    for a long time i am thinking about how to get this great feature of TVE2 back in TVE3.

    The problem:

    If you are watching a movie on tv for lets say 20 minutes and have to leave, you hit record but -no wonder- the recording contains only the part from were you hit "record" till the end of the movie.

    How it works with my patch in TVE3 and TvPlugin:

    In the above described situation, tv server adds the timeshift buffer to the movie (subfolder "buffers") right after the recording has started.
    It even honors the prerecording time and should also work if the already watched spans over several ts buffer files.

    It constantly checks the running program and if a channel change happened or the next show begins in e.g. 7 minutes (DateTime.Now.AddMinutes((double)preRecordInterval) >= TVHome.Navigator.Channel.CurrentProgram.EndTime) it fetches the name of the current tsbuffer file and the position inside the file and when you hit record and the recording has started it does the same again and signals TvServer to move the tsbuffer(s) to the recording dir.

    The patches are already in SVN BUT DISABLED by default

    If you want to test nevertheless (which would be great) do the following

    - Update to latest public snapshot
    - Enable TvNotifier
    - Create a text file c:\\EnableRecordingFromTimeshift.txt

    Please do the first tests with only one buffer file.
    :D

    Attached is a small tool which copies the buffers to the recording dir and renames all files in the pattern "*_Partx.ts" in the correct order so MP will playback the whole recording gapless.

    The tool has 1 mandatory parameter and 1 optional.
    Just start it without parameters in a console session to see the usage.

    usage: RecordingBufferMerger.exe <recording filename> /MOVE_BUFFERS

    - <recording filename> is the full path and filename of the recordings and mandatory
    - "/MOVE_BUFFERS" is optional. If set, the buffer files are moved from the buffers dir, otherwise they are just copied

    Some notes about the tool:

    if you don't use comskip
    => enable the comskip plugin and under "start prog after recording finished" enter the path and file name of the tool + "{0}"

    if you start comskip at the beginning of a recording
    => in the comskip plugin under "start prog after recording finished" enter the path and file name of the tool + "{0}"

    if you start comskip at the end of a recording
    => create a small batch which start comskip and after that the tool and and configure that batch under "start prog after recording finished"

    The batch could like
    Code:
    @echo off
    C:\Program files\comskip\comskip.exe "%1"
    C:\Program Files\Team Mediaportal\Tools\RecordingBufferMerger.exe "%1" /MOVE_BUFFERS

    If you have problems with this feature, post bug reports here. If you encounter other bugs ALWAYS FIRST DISABLE THIS FEATURE AND THEN POST YOUR LOGS. NOBODY WILL LOOK AFTER GENERAL BUGS WHEN THIS FEATURE IS ENABLED
     

    Attachments

    • RecordingBufferMerger.rar
      30.7 KB

    JoeSmith

    Portal Pro
    November 17, 2007
    314
    44
    Home Country
    Germany Germany
    thanks for your effort. I'll start testing that feature next weekend and will report later.

    The whole thing raises a question in my mind. Why are we using seperate buffer files anyway? Is there a speed increase in shifting channels or what is the purpose ?
    Why doesn't the buffer change on every channel change ? Wouldn't that be easier ? Creating a buffer file when turning tv on - on channel change a new file is created if that one is later recorded the tvserver could just "fill" it to the end and copy it after that.
    I guess it has something to do with creating and deleting these buffer files and the time it takes do do these operations, maybe defragmentation ?

    Don't get me wrong i'm really happy that you implemented that feature, i'm just interested in the structure of the TVServer.

    Thanks

    Joe
     

    gemx

    Retired Team Member
  • Premium Supporter
  • October 31, 2006
    1,972
    539
    Home Country
    Germany Germany
    Creating a seperate buffer file for each show you are watching would:

    - cause many buffer files being present which can't be cleaned up easily since you have to keep some kind of reference to them
    - Assuming you are watching the same channel for about 4 hours would probably result in 3 or 4 buffers files being created. If you are going back in the buffer you could only go back to the beginning of the currently watch show. That's not really the idea of timeshifting ;-)
     

    romuz

    Retired Team Member
  • Premium Supporter
  • July 26, 2008
    1,045
    250
    Moskau
    Home Country
    Russian Federation Russian Federation
    Creating a seperate buffer file for each show you are watching would:

    - cause many buffer files being present which can't be cleaned up easily since you have to keep some kind of reference to them
    - Assuming you are watching the same channel for about 4 hours would probably result in 3 or 4 buffers files being created. If you are going back in the buffer you could only go back to the beginning of the currently watch show. That's not really the idea of timeshifting ;-)

    I think JoeSmith mean that on every channel change timeshift buffer is clearing and starts from the begining
    in that situation we have only 1 buffer file per client which consist only current watching channel.
    And its more accurate idea of timeshifting i think. Not to have channel parts in buffer. And you always will add right part of the buffer to recording(Only current channel and not all that i seen before i hit a record button)
     

    DieBagger

    Retired Team Member
  • Premium Supporter
  • September 11, 2007
    2,516
    1,276
    39
    Austria
    Home Country
    Austria Austria
    Hi, what's the current status of this patch? Do you need any further testing to be done? I had a situation today where I would have needed exactly this functionality so I remembered this thread... ;)
     

    gemx

    Retired Team Member
  • Premium Supporter
  • October 31, 2006
    1,972
    539
    Home Country
    Germany Germany
    This patch is in SVN now for quite some time.

    To activate the feature just create this text file "c:\\EnableRecordingFromTimeshift.txt"
    It can be empty but must exist.

    That's it.

    I always thought that this was wanted by many users but measured by the time it is implemented nobody seems to be interested anymore so i haven't got much feedback if it's working as it should.

    Well, at least for me it does :D
     

    kiwijunglist

    Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,751
    New Zealand
    Home Country
    New Zealand New Zealand
    cool, i didn't realise that feature had been (covertly) implemented!
     

    Gixxer

    Retired Team Member
  • Premium Supporter
  • August 18, 2007
    1,383
    41
    39
    Spain
    Home Country
    Spain Spain
    will try to test it this afternoon as i have to do some major resetup of my system.

    thanks for the work, I will report the results.
     
    Status
    Not open for further replies.

    Users who are viewing this thread

    Top Bottom