NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Information Community Announcements v
« Previous 1 2 3 4 5 … 56 Next »
Timing.Info creator

 
  • 0 Vote(s) - 0 Average
Timing.Info creator
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,096
Threads: 957
Joined: May 2006
#1
2012-03-10, 08:00 PM
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.nextpvr.com/showthread.php...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.nextpvr.com/showthread.php...ort-thread,

Martin
jksmurf
Offline

Posting Freak

HK (DMBTH)
Posts: 3,590
Threads: 410
Joined: Jul 2005
#2
2012-03-10, 11:14 PM
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 STRIX X470-F AMD 2700x 4GHz | Win10Prox64 | 32GB | NVIDIA GEforce GT1030 Fanless | WinTV DMB-TH | WinTV HVR-1280 | Hauppauge Colossus | AC86U/AC68U | USB-UIRT | RPi4 Libreelec | Sony Bravia LCD X9000F Android TV |
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,096
Threads: 957
Joined: May 2006
#3
2012-03-10, 11:55 PM
jksmurf Wrote: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

jksmurf Wrote: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
jksmurf
Offline

Posting Freak

HK (DMBTH)
Posts: 3,590
Threads: 410
Joined: Jul 2005
#4
2012-03-11, 05:08 AM
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 STRIX X470-F AMD 2700x 4GHz | Win10Prox64 | 32GB | NVIDIA GEforce GT1030 Fanless | WinTV DMB-TH | WinTV HVR-1280 | Hauppauge Colossus | AC86U/AC68U | USB-UIRT | RPi4 Libreelec | Sony Bravia LCD X9000F Android TV |
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,096
Threads: 957
Joined: May 2006
#5
2012-03-11, 05:14 AM
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
jksmurf
Offline

Posting Freak

HK (DMBTH)
Posts: 3,590
Threads: 410
Joined: Jul 2005
#6
2012-03-12, 12:09 PM
Hi Martin - not sure if you got to the Q's above? It didn't seem to work from postprocessing.bat.
ASUS STRIX X470-F AMD 2700x 4GHz | Win10Prox64 | 32GB | NVIDIA GEforce GT1030 Fanless | WinTV DMB-TH | WinTV HVR-1280 | Hauppauge Colossus | AC86U/AC68U | USB-UIRT | RPi4 Libreelec | Sony Bravia LCD X9000F Android TV |
Lao Pan
Offline

Posting Freak

UK (Mendip TX)
Posts: 1,301
Threads: 114
Joined: Oct 2008
#7
2012-03-12, 12:41 PM
Martin has answered your q's in the support thread

http://forums.nextpvr.com/showthread.php...ort-thread
It's not an overly complicated system - it's more - overly simple operatives  Huh
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,096
Threads: 957
Joined: May 2006
#8
2012-03-13, 04:56 AM
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
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,096
Threads: 957
Joined: May 2006
#9
2012-03-26, 04:41 AM
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
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,096
Threads: 957
Joined: May 2006
#10
2012-03-27, 11:02 PM
Oops, for those that downloaded yesterday's update it was an old version. It should be okay now.

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Community Skin info. Fatman_do 83 27,053 2007-11-12, 11:57 PM
Last Post: Fatman_do

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode