Results 1 to 10 of 10

Thread: Timing.Info creator

  1. #1
    Join Date
    May 2006
    Location
    Canada
    Posts
    21,691

    Timing.Info creator

    Here is a small command line utility that create an external Timing.Info file for use with old ts files or ts files that have been cut or edited. It is based on timing information in the file itself (PCR) and it does adjust for some PCR timeline errors.

    NMT users will need this update http://forums.gbpvr.com/showthread.p...160#post433160 (that might need all the TSReader2 files)

    Normally you don't need to use any options, but if you want here they are:

    Code:
    Usage: writeTime.exe [-f] [-s #] [-o] [-d filename] filename.ts
           -a analyze ts file 
    	-f fast skipping, default read every packet
    	-s # number of packets to skip default if skipping is enable is 20
    	-o overwrite timing.info default is to exist if an external file is found.
    	-d debug filename  default is NUL  use CON if you want to redirect to a file, otherwise it is a filename.
            -c copy ADS Timing.Info if found
    If you don't like command prompt, you can use Windows Explorer and drop the file onto the writeTime icon

    The support thread is here http://forums.gbpvr.com/showthread.p...support-thread,

    Martin
    Attached Files Attached Files
    Last edited by mvallevand; 2012-03-27 at 10:38 PM.

  2. #2
    Join Date
    Jul 2005
    Location
    HK - Pal I
    Posts
    2,960
    What does that Timing.Info file then do? Does NPVR use it to correct file timing when playing? Where is it supposed to be kept? With the file?
    ASUS P5K-PRO Q9300 2.5GHz | Win7x64 | 6GB RAM | ATI Radeon HD3400 PCIe Video Card | 1 x WinTV DMB-TH | Various HD's | AC66U | USB-UIRT | PCH-A100 | Hauppauge Colossus |
    If you've ever become frustrated because something in GBPVR or NPVR is not working, take a moment and consider this and this and this and this and this and this. Credit where credit's due; for one guy (with a wife and two kids), most problems are solved outrageously quickly. Patience.

  3. #3
    Join Date
    May 2006
    Location
    Canada
    Posts
    21,691
    Quote Originally Posted by jksmurf View Post
    What does that Timing.Info file then do? Does NPVR use it to correct file timing when playing?

    Yes it corrects some skip problems on some files, some files don't need it at all. Since NextPVR came out it has created a Timing.Info file as NTFS metadata that really helps with the timeline and skipping in files that are not constant bit rate or that might change during playback. With the NMT client without Timing.Info skips are made on a straight line, based on the calculated start and end time of the file. Sometimes it can be way off. I recently posted in the "Skip" thread about an Alfred Hitchcock file that I know is far from a constant bit rate.

    Here is a 15 minute jump

    Code:
    without Timing.Info on the NMT 
    
    2012-03-10 18:19:52.680	[DEBUG][3]	Reported PTS now:274774  time: 6.10608888888889
    2012-03-10 18:19:53.047	[DEBUG][7]	requestedPositionInSeconds: 906
    2012-03-10 18:19:54.663	[DEBUG][3]	Reported PTS now:42770227  time: 950.449488888889
    
    and here is with 
    
    2012-03-10 18:20:32.866	[DEBUG][3]	Reported PTS now:273273  time: 6.07273333333333
    2012-03-10 18:20:33.757	[DEBUG][7]	requestedPositionInSeconds: 906
    2012-03-10 18:20:34.838	[DEBUG][3]	Reported PTS now:40758217  time: 905.738155555556
    
    45 seconds more accurate
    On the PC the logs looks the same with or without Timing.Info, the timeline show a closer jump, but in reality the jump was actually 45 seconds too long too and so resume comskip etc can really be off.

    Code:
    2012-03-10 18:32:37.087	[DEBUG][1]	User is trying to skip.
    2012-03-10 18:32:37.087	[DEBUG][1]	Current position is: 5.53589582443237
    2012-03-10 18:32:37.087	[DEBUG][1]	Asking for position: 905.535888671875
    2012-03-10 18:32:37.107	[DEBUG][1]	Using timing.info, jumping to time 905.535889 (offset 1048172944)
    2012-03-10 18:32:37.148	[DEBUG][1]	After skipping position reports as: 905.75390625
    
    2012-03-10 18:40:43.762	[DEBUG][1]	User is trying to skip.
    2012-03-10 18:40:43.762	[DEBUG][1]	Current position is: 5.34330558776855
    2012-03-10 18:40:43.762	[DEBUG][1]	Asking for position: 905.343322753906
    2012-03-10 18:40:43.837	[DEBUG][1]	After skipping position reports as: 902.843200683594
    Quote Originally Posted by jksmurf View Post
    Where is it supposed to be kept? With the file?
    I missed this earlier writeTime creates the file in the same folder as the source .ts file. The name will be filename.ts.Timing.Info

    Martin
    Last edited by mvallevand; 2012-03-11 at 12:39 AM.

  4. #4
    Join Date
    Jul 2005
    Location
    HK - Pal I
    Posts
    2,960
    Thanks Martin. I have had some recent problems with files where the timeline went way out of whack so might help, but that may be just a poor recorded timeline to start with. I have had some resume issues though. Couple of quick additional q's:

    1. Should/can I call from postprocessing.bat? If yes I will put it in the Scripts folder.
    2. If yes, then syntax would be writeTime %1?
    3. Will filename.ts.Timing.Info be deleted from the folder when the show is deleted (I would like it to be).

    Cheers

    k.
    ASUS P5K-PRO Q9300 2.5GHz | Win7x64 | 6GB RAM | ATI Radeon HD3400 PCIe Video Card | 1 x WinTV DMB-TH | Various HD's | AC66U | USB-UIRT | PCH-A100 | Hauppauge Colossus |
    If you've ever become frustrated because something in GBPVR or NPVR is not working, take a moment and consider this and this and this and this and this and this. Credit where credit's due; for one guy (with a wife and two kids), most problems are solved outrageously quickly. Patience.

  5. #5
    Join Date
    May 2006
    Location
    Canada
    Posts
    21,691
    Someone emailed me and asked if this could recursively scan folders and it can't but I came up with with command line. It does do a lot of disk reading, it takes about 3 minutes on my machine to scan an 1080i hour program so be prepared if you have a lot of files.

    Code:
    for /f "delims=" %i in ('dir *.ts /a/s/b') do "\PathTo\writeTime" "%i"
    To better implement this, I updated post #1 with a newer version in writeTimeADS.7z which adds a check for an existing NextPVR generated alternate data set Timing.Info file and skips them, to save time and avoid conflict on newer files.

    Martin

  6. #6
    Join Date
    Jul 2005
    Location
    HK - Pal I
    Posts
    2,960
    Hi Martin - not sure if you got to the Q's above? It didn't seem to work from postprocessing.bat.
    ASUS P5K-PRO Q9300 2.5GHz | Win7x64 | 6GB RAM | ATI Radeon HD3400 PCIe Video Card | 1 x WinTV DMB-TH | Various HD's | AC66U | USB-UIRT | PCH-A100 | Hauppauge Colossus |
    If you've ever become frustrated because something in GBPVR or NPVR is not working, take a moment and consider this and this and this and this and this and this. Credit where credit's due; for one guy (with a wife and two kids), most problems are solved outrageously quickly. Patience.

  7. #7
    Join Date
    Oct 2008
    Location
    Severn Estuary (Mendip) UK
    Posts
    816
    Martin has answered your q's in the support thread

    http://forums.gbpvr.com/showthread.p...support-thread
    It's not an overly complicated system - it's more - overly simple operatives

  8. #8
    Join Date
    May 2006
    Location
    Canada
    Posts
    21,691
    I thought of another use for writeTime. If you are using NetworkRecorder with SageDCT, DVBViewer, DreamBox or another application that doesn't generate Timing.Info, and if you find your skipping is inaccurate in NextPVR you might want to try writeTime. For this situation you could call writeTime in PostProcessing.bat specifically for your NetworkRecorder tuner

    Code:
    rem %4 is the Capture Source Id
    if %4!=25 goto :skipnext
        "\path to\writeTime" %1
    
    :skipnext
    To find the id of you tuner look in NetworkRecorder.xml for the line

    <NetworkRecorder id="25" instance="1">

    Martin
    Last edited by mvallevand; 2012-03-13 at 06:15 AM.

  9. #9
    Join Date
    May 2006
    Location
    Canada
    Posts
    21,691
    Update writeTime with a couple of small changes.

    - update PCR reset frequency from 100 to 200ms (ffmpeg creates out of spec mpeg-ts files!)
    - new analyze option -a to create debug file even when Timing.Info exists.

    Martin

  10. #10
    Join Date
    May 2006
    Location
    Canada
    Posts
    21,691
    Oops, for those that downloaded yesterday's update it was an old version. It should be okay now.

    Martin

Posting Permissions

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