Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: Quickly find place/skip ads with binary chop

  1. #1
    Join Date
    Jul 2016
    Location
    London UK
    Posts
    9

    Quickly find place/skip ads with binary chop

    A suggestion I'll make for NextPVR and VLC:
    One suggestion I'd make for an enhancement: skipping to a point in a video that is not accurately known is a nuisance (an example is advertisement skipping). If you take small jumps there have to be many; if large jumps, they go too far. So you set up jumps of various sizes; if you remember the keys you start with big ones, and make them smaller as you home in; you would typically have 6 keys, small, medium, and large jumps forwards and backwards. Alternatively, you could use fast-forwards/backwards, which is slow and a nuisance.

    A much more convenient and faster method is to use a binary chop: you start with a large jump, and the size progressively and automatically gets smaller (halved) as you approach, until you reach the right spot. I have a hardware video recorder with a software plugin supporting this; it is extremely useful. Your first jump is fixed size, and can be repeated in the same direction; once you change direction, you halve the length of each successive jump. So, if your first jump is 4 minutes (240 seconds) and your destination (which you don't know) is 5'23" (323") ahead, you quickly press r (right arrow; takes you 240" ahead) r (jump +240", position 480") l (-120", 360") l (-60", 300") r (+30", 330"), l (-15", 315", close enough, or we can go +7.5" to 322.5"). You obviously don't have to do these sums, just watch the result as you quickly do r r l l r l. You never require more than 7 jumps after the first reversal to get within 7.5", with just 2 keys, and no need to change from bigger to smaller jumps. If you make a mistake and find you're making small steps from too far away, wait 5" and start again - this shouldn't happen often.

    The algorithm has 3 parameters, which should be user-configurable, and uses two keys (left and right keyboard or remote controller arrows are the obvious allocations). The parameters are: initial jump, could default to 4 minutes; smallest jump (so we don't end up with millisecond jumps), which could be 5"; and timeout, say 5 seconds. The binary chop continues until no key is pressed during the timeout period, then reinitialises.

    On pressing an arrow key, we initially jump 4'. Every press of the same key is 4' in the same direction. When we press the opposite key, the binary chop starts; the jump is halved at every keypress in either direction, until it reaches the configured smallest value of 5" or whatever. Subsequent jumps are all by this smallest value. When we're near enough we stop; there's no need to get closer than a few seconds before.

    This technique was implemented by Simon Capewell in the QuickJump 1.7 TAP (software add-on) for the discontinued Topfield TF5800 PVR, and very useful it is.

  2. #2
    Join Date
    Apr 2005
    Location
    Washington, USA
    Posts
    1,026
    Really interesting. I'd be in favor of this as I don't use Comskip to find and mark commercials. I think it would work really well. And, it seems it would be "fun" to program. (Says the guy who knows nothing since Fortran in 1970.)
    HTPC: E7500, HD5450, HDHR Prime/Avermedia Duet A188, NPVR 3.8.3, Win7 Pro
    Test: Asus H110M, Pentium G4500, NPVR 3.8.3, Win7 Home Premium

  3. #3
    Join Date
    Jul 2016
    Location
    London UK
    Posts
    9
    As I said, I also posted this on the VLC forum; thread (no answers yet) is
    https://forum.videolan.org/viewtopic.php?f=7&t=136744
    Last edited by pol098; 2017-03-15 at 02:04 PM.

  4. #4
    Join Date
    Oct 2009
    Location
    San Jose, California
    Posts
    417
    Comskip works very, very well... you guys should try it.

  5. #5
    Join Date
    Apr 2005
    Location
    Washington, USA
    Posts
    1,026
    How long does it take to process a 1 hour HD program? Parallel processing with several recordings in progress? I tried Comskip years ago and was not very happy with the accuracy.
    HTPC: E7500, HD5450, HDHR Prime/Avermedia Duet A188, NPVR 3.8.3, Win7 Pro
    Test: Asus H110M, Pentium G4500, NPVR 3.8.3, Win7 Home Premium

  6. #6
    Join Date
    Mar 2006
    Location
    Houston, Texas, USA
    Posts
    725
    Comskip will change your life. It isn't perfect, but it does a great job most of the time. My wimpy Core2Duo can process a 1 hour show in about 10 minutes, using the donator version of Comskip. I've never messed with parallel processing as we seldom watch shows until the next day or later.
    E4600 Core2Duo, 4GB RAM, Win7 Pro, HD5570, HDHomeRun Prime, NPVR 3.6.6, 2 Popcorn Hour A-100's and a partridge in a pear tree...
    On a clear disk, you can seek forever...

  7. #7
    Join Date
    Oct 2009
    Location
    San Jose, California
    Posts
    417
    Quote Originally Posted by HarryH3 View Post
    Comskip will change your life. It isn't perfect, but it does a great job most of the time. My wimpy Core2Duo can process a 1 hour show in about 10 minutes, using the donator version of Comskip. I've never messed with parallel processing as we seldom watch shows until the next day or later.
    +1. Post process on a wimpy older i3... very fast. I use the default .ini file and it works great.

  8. #8
    Join Date
    Dec 2005
    Location
    UK
    Posts
    2,363
    Quote Originally Posted by HarryH3 View Post
    Comskip will change your life.
    Posts in previous years suggested that Comskip struggles with ads in the UK. I haven't ever tried it and it may do better now.
    AMD A75, 4 Gig, 1000 Gig, Nvidia N210
    1 x Hauppauge WinTV QuadHD DVB-T2
    1 x TBS 6281 dual DVB-T2
    2 x Hauppauge Nova-t PCI

  9. #9
    Join Date
    Nov 2005
    Location
    East Yorkshire, England
    Posts
    4,503
    Quote Originally Posted by Graham View Post
    Posts in previous years suggested that Comskip struggles with ads in the UK. I haven't ever tried it and it may do better now.
    I've tried it on and off since I started with GBPVR and never had any sucess with it in the UK


  10. #10
    Join Date
    Jun 2015
    Location
    Dutchess County, NY USA
    Posts
    140
    +1 for an optional binary search but I see one problem as described: Halving every skip after the first direction change could be quite bothersome. For example, using OP's scenario, if where you wish to go is 242 seconds in, skip 1 is +240(Position 240), 2 is +240(480), 3 is -120(360), 4 is -60(300), 5 is -30(270), 6 is -15(255), 7 is -8(247), 8 is -4(243), lastly 9 is -2(241). Nine keystrokes. The 5-second timeout would probably be used in this scenario. But when does one employ the timeout?

    My suggestion is to halve skip size only on a direction change but keep an alternate set of keystrokes for a fixed skip size. Maybe shift-<arrow>. Now, skip 1 is +240(240), 2 is +240(480), 3 is -120(360), 4 is -120(240), 5 is shft-right +5(245), 6 is shft-left -5(240). Six keystrokes and may not even need skips 5 and 6. A little less time-consuming, more direct route to the destination.

    A great search scheme as an option.
    Later...JohnC

    System Status: Humming
    Desktop: Intel DX38BT MB - Intel Q9650 3GHz Quad - AMD HD6670 Video
    Software: Win 10 Pro(Creators) - NextPVR - WinTV8 - Total Media Extreme - VLC
    Video: Verizon FiOS - Hauppauge DCR-3250 - Hauppauge HDPVR

Posting Permissions

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