1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

New program for 1 step TTG downloads, decryption, encoding - kmttg

Discussion in 'TiVo Home Media Features & TiVoToGo' started by moyekj, Mar 15, 2008.

  1. Dec 2, 2011 #3621 of 10405
    cburbs

    cburbs New Member

    158
    0
    Jan 29, 2009
    I got some extra help but if you don't mind using windows powershell -

    This is easy to do using PowerShell, Microsoft's new scripting environment that's built into every version of Windows 7. Here are two scripts which do what you asked. You put each one into a file with a ".ps1" file type and then open up a PowerShell console (Start -> All Programs -> Accessories -> Windows PowerShell -> Windows PowerShell) to run them. You need to type "set executionpolicy unrestricted" once to allow scripts to run on the system, then you just type the full path to the script file to run it. If the script is in the current default folder, then type ".\" as the path name.


    # Delete oldest file in directory "D:\X" until no more than 20 files remain: Note: won't delete an folders within X.

    $Files = get-childitem D:\X | where-object { $_ -is [IO.FileInfo] } | sort lastwritetime
    $FileCount = $Files.Count
    if ($FileCount -gt 20)
    {
    foreach ($File in $Files)
    {
    $FileCount--
    $File.Delete()
    if ($FileCount -le 20) { break }
    }
    }


    # Function to delete oldest files in the given folder until there are only 20 files left:
    function Delete-To20Files
    {
    param ( $FolderName )
    $Files = get-childitem $FolderName | where-object { $_ -is [IO.FileInfo] } | sort lastwritetime
    $FileCount = $Files.Count
    if ($FileCount -gt 20)
    {
    foreach ($File in $Files)
    {
    $FileCount--
    $File.Delete()
    if ($FileCount -le 20) { break }
    }
    }
    }

    # Call the Delete-To20Files Function for all subfolders of folder "D:\X":

    get-childitem D:\X | where-object { $_ -is [IO.DirectoryInfo] } |
    foreach-object { Delete-To20Files $_.FullName }
     
  2. Dec 3, 2011 #3622 of 10405
    dcooper2025

    dcooper2025 New Member

    24
    0
    Sep 28, 2008
     

    Attached Files:

  3. Dec 5, 2011 #3623 of 10405
    dcooper2025

    dcooper2025 New Member

    24
    0
    Sep 28, 2008
    So using the VideoReDo AdScan option works wonders on any 1-hour TV Show, pretty much seamlessly and perfectly every time. But it's a different story altogether with multi-hour movies. Large chunks of the movies go missing, unfortunately. A bit of Googling brings up the VRD doc on tuning AdScan parms, and although most discussion is around doing it manually in their GUI, they do mention that disabling the "Fast Search" method can possibly help.

    I see in the VRD dir there is the "AdScan.vbs" script, which I presume is what kmttg uses to fire off AdScan, and it does mention: "Parameters: 1 - Fast Search: 0 = program default, 1 = Yes use fast search, 2 = No, use slower more exhaustive search."

    Do we know what kmttg passes in for this parm and if it's not already the "slow" method, how the invocation could be modified to force the "slow" scan method?

    Alternatively, has anyone compared AdScan results to ComSkip results for movies? Any antidotal evidence? I had just assumed that AdScan, because it was commercial software would be superior but maybe not....

    Thanks!
     
  4. Dec 5, 2011 #3624 of 10405
    moyekj

    moyekj Well-Known Member

    11,128
    27
    Jan 23, 2006
    Mission...
    If you look under VRDScripts\adscan.vbs script there's a line:
    scanStarted = VideoReDo.StartAdScan( 0, 0, 1 )

    1st argument is the one you describe, so changing it from 0 to 2 would accomplish what you want.
    However, in general comskip is much better at Ad detection in my experience and can be much further tweaked using custom comskip.ini. Personally I don't much care for automated commercial detection though and find it faster and much more precise to go through and cut out commercials manually using VRD.
     
  5. Dec 5, 2011 #3625 of 10405
    dcooper2025

    dcooper2025 New Member

    24
    0
    Sep 28, 2008
    Cool, thanks. I'll switch to ComSkip.
     
  6. Dec 5, 2011 #3626 of 10405
    reneg

    reneg Member

    699
    0
    Jun 19, 2002
    I've never tried the slower option on VRD, but for me VRD Ad detection is somewhere in the ~90% accuracy range. I find VRD's Ad detection significantly less accurate on certain networks (like syfy) and dimly lit shows (like American Horror Story). I manually go through each show after VRD ad detection because I have to, not because I want to. Having to manually review/edit commercial detection, breaks my workflow into a two part process.

    I'll have to give comskip a try to see if it builds my confidence in ad detection such that I can rely on it without review thus making my workflow fully automated.
     
  7. Dec 5, 2011 #3627 of 10405
    sanjonny

    sanjonny New Member

    202
    0
    Nov 2, 2008
    Unfortunately, I don't think you will find any software that is 100% because the signals are all different and detection isn't powerful enough to get it all. For instance replaytv which has really good detection works off of noise levels and black levels like most. Well cox comm here in san Diego knows this and keeps their volume the same level for their ads and no black space between commercias prior to cox commercial and cox commercial. Some others do this also, they specifically make their commercial try and foil the commercial detection algorithm. Even who cuts the commercials in can make a difference. For example, one editor at the network always leaves a 1/4sec black space between program and commercial block, a different dude never leaves any black space, so a program that usually works fine for automated detection will maybe all of a sudden fail and then may e fail consistently. I have seen many 30 minute shows that commercial detection chokes on and gets wrong, especially if the last commercial set is in the last 8 minutes of the program, and other 3 hour movies that commercial detection was flawless at. Once you do several of them you get quick at it (automated detection with manual review) that it really doesn't take that much time.

    And sure as anything, the part that it gets wrong will be the mostimportant part ofthe movie or tv show, so it ends up being not worth it to have the missed parts for me vs the short amount of time you develop double checking. I find with video redo after using the automated scan, I let several shows build up and then take a few minutes to go thru them and double check/fix cut points. I don't agree that doing it all by hand is faster because if you don't at least have it try, it can take a while to find start and endophyte of commercial blocks, especially if you are doing say 15 shows at once. With proper hand placement and using keyboard commands, I can fly thru most double-checking in seconds for some files. Right now I am collecting til death episodes, and on wgn the commercial detection works pretty good, so I can open a episode, tab thru cut points and modify usually in about 10-15 secs from file open to save and open next file. It goes up to 30 if there is semi major misses, but that is about it- so for 10 episodes,I might spend 2 minutes max, usually more time in loading and saving than anything else.

    All that being said, you can increase the detection accuracy rate, but I don't think you will currently find a 100% solution unless you build your own and even then, not too likely.
     
  8. Dec 5, 2011 #3628 of 10405
    reneg

    reneg Member

    699
    0
    Jun 19, 2002
    I don't think I'll find a solution that works 100% of the time, but I'm willing to try other solutions if they are better.

    I follow the same process as you and queue up a bunch of episodes and then review/edit them. I could process episodes quicker, but I do the review/edits via remote desktop which slows precision and performance somewhat. VRD gets me in the ballpark with respect to ad breaks.
     
  9. Dec 8, 2011 #3629 of 10405
    sanjonny

    sanjonny New Member

    202
    0
    Nov 2, 2008
    I am not sure if this is a new problem or just new to me. I updated to v0p8I and now I have a problem with deleting shows.

    I have both a HD that has Tivowebplus on it now (Yippee) and also have a series 4 - Premiere. I had it for awhile where I could delete on both units by pressing the delete key. I never use automated delete as part of my flow because of errors I run into with qsfix, so I do it by hand thru kmttg and the delete key (thanks to this recent thread)

    Now it seems whatever i do it is backward. If I enable twp delete and try to delete a show, then it will not delete shows on the series 4 because it tries to connect to 8080. If I set it to delete ipad style, then of course, delete doesn't work on the series 3-HD anymore.

    I know for a time I had it working on both and then updated and now have the problems, I can do one or the other but not both. I think it might have worked because I changed the configuration but didn't restart kmttg, which allowed me to be able to delete on both units somehow, but after restarting, then its one or other. If I enable both styles, TWP overrides at least on the delete key.

    So should this be set per tivo going forward or maybe assign a different key for TWP style delete vs. ipad delete. Did this maybe work in the past and something got changed? Like I said, I don't know if it always worked and just got broken in the update or if it wasnt working but I accidentally got around it by not restarting kmttg.

    One other question, since we can now download from pause point, is it also possible to resume and/or pause a download in progress? That would be very helpful in certain situations.
     
  10. Dec 8, 2011 #3630 of 10405
    sanjonny

    sanjonny New Member

    202
    0
    Nov 2, 2008
    One other thing seems to have changed also. In the past, when running adcut and adscan, the window was always minimized, but for some reason, with the latest version, it seems to run them in the regular window. Qsfix still runs minimized (I think, will have to check). Is this something I might have changed or something that changed in kmttg.
     
  11. Dec 8, 2011 #3631 of 10405
    moyekj

    moyekj Well-Known Member

    11,128
    27
    Jan 23, 2006
    Mission...
    If you have "Allow Multiple VideoRedo jobs at once" that may be the reason since that brings up VRD in GUI mode.

    TWP Delete + ipad delete is not something I considered running concurrently and at this point would be a pain to setup to be able to do that. As a workaround perhaps you can install another kmttg in a different location that is configured with just TWP delete enabled without the ipad setup just for the purpose of deleting shows.
     
  12. Dec 8, 2011 #3632 of 10405
    sanjonny

    sanjonny New Member

    202
    0
    Nov 2, 2008
    something must have changed regarding the gui mode issue as up until the latest version, i have always run two instances (if there was enough work to merit it, it has been set at two anyway) and this just started happening with the upgrade to versionI.

    on the multiple style delete, what about different keys to send the commands? it seems that might be easier, since it already does it, say delete key for ipad style and T key for twp style. they dont have to be part of the workflow as i said, i dont use them for that, and ipad delete works even if you don't have ipad delete enabled (if you press delete while on the series 4, it sends the delete command, until you select twp style delete that is-then pressing delete will always be twp style) what if you just set the default of pressing T(or whatever key makes sense) to the twp style delete command?

    another option i think might be useful, what about setting leaving the interim files available or some of them at least and having a final step of deleting all interim files when finished such as delete wip files. so when you decrypt if you want you can leave the tivo file, or qsfix, leave the qsfix file or encode leave the unencoded or whatever. but put at the end a checkbox so that it looks to see if you have any wip files and deletes them. so say i download a file, process it, adscan and then want to adcut it, after the adcut finishes, it deletes the tivo and qsfix and uncut mpg and vprj file. or if i encode and that is my final step, it goes back and deletes everything else once the encode is finished.

    that way when the errors happen, you can just pull any prior file and rework it from there.

    alternatively, now thinking about it a bit, you could get away with just leaving the tivo file on the drive all the way thru and having a last step to delete that final after final adcut or encode because the other steps really dont take that long but downloading can take forever, so may e that is another way to do it, have option to leave .tivo file until whatever your last step is and then select delete .tivo. that way when qsfix has a problem, you dont have to redownload the show again to have another copy or whatever.
     
  13. Dec 8, 2011 #3633 of 10405
    moyekj

    moyekj Well-Known Member

    11,128
    27
    Jan 23, 2006
    Mission...
    No nothing changed in kmttg for that stuff in a while. More likely it's a VRD update that changed that behavior. I just tried it myself with "Allow Multiple VideoRedo jobs at once" enabled and confirmed that adscan doesn't minimize the VRD window for me anymore for adscan either, so VRD SetQuietMode (which you'll see is called in adscan.vbs script) doesn't behave as it used when doing adscan for newer versions of VRD. Seems to work OK for qsfix though.
     
  14. Dec 8, 2011 #3634 of 10405
    sanjonny

    sanjonny New Member

    202
    0
    Nov 2, 2008
    Got it, well that makes sense, I didn't think anything major changed in kmttg related to that.

    I am having decrypt seem to take forever all of a sudden. I tried switching to videoredo decrypt but I get messages that I need to check the mak setting, but cannot find the setting in videoredo or how to give it the correct mak.

    I don't know why decrypt is taking so long all of a sudden, but even with no processes running, it can take an hour or more to decrypt a file. That seems to have never happened before to that extent. Right now I have a 5gb file that is only halfway done at 35 minutes. It seems in the past the longest I ever waited to decrypt was like 5 minutes.

    Is videredo decrypt faster and/or did something change in decrypt or is there something I might have done on my computer that is slowing things down completely? I checked tasks and really there is almost nothing running but decrypt is horribly slow.
     
  15. Dec 9, 2011 #3635 of 10405
    sanjonny

    sanjonny New Member

    202
    0
    Nov 2, 2008
    Got decrypt working via videoredo, required reinstalling videoredo for some reason but now it works. I think something is majorly wrong with regular decrypt for some reason. It took over an hour and a half to decrypt a file. Using videoredo it only took 8 minutes and that was a 15gb file so I don't know what is going on but something is not right. Videoredo decrypt is similar to speeds for prior decrypt + qsfix, even faster really.
     
  16. Dec 10, 2011 #3636 of 10405
    moyekj

    moyekj Well-Known Member

    11,128
    27
    Jan 23, 2006
    Mission...
    For next release "delete" should now work for either type of delete. I added some additional checking of current TiVo selected and if iPad communications options is not enabled in config for the current TiVo then use TWP delete instead.

    You can use "custom" task to run a script at the end of task set to do something along those lines. It's always the last task executed.
     
  17. Dec 12, 2011 #3637 of 10405
    wireman121

    wireman121 Member

    126
    0
    Nov 8, 2008
    Also having the same issues with VRD not minimizing when running the adcut anymore - I upgraded VRD and KMTTG at the same time, but I suspect it was a VRD change that has caused this. Not the end of the world, but quite annoying regardless.

    Would also be nice to see kmttg continue to scan at the defined amount of time when auto transfer is set to loop in GUI while VRD review window is showing - that way if theres more than 1 show recording per night (I have 5-6) it doesnt jam up after downloading the first show, and can still poll the TiVo for future files and have them all prepared at the VRD review screen - would be MUCH more convenient this way.

    That way if I'm away for a day, KMTTG isnt stuck waiting for a VRD review on the first file it downloaded while the rest are sitting on the TiVo, it will have multiple VRD review windows up ready for review...... Always been something I wish would get attention in an upgrade - please make this possible!!
     
  18. Dec 12, 2011 #3638 of 10405
    sanjonny

    sanjonny New Member

    202
    0
    Nov 2, 2008
    I have an old install of version 3 on my system ( if you scroll back a few pages I talk about the multple version so that I could mentally keep straight when working on ts files (hauppauge pvr) vs tivo files. The same issue is happening with the old version as with the updated, which leads us back to either a change is kmttg causing the problem or some registry change upon updating vrd that causes this. I believe I have an older version of kmttg installed for some other files, I will try that tomorrow and see if I can provide anymore details. The non-minimized state can cause problems if you are doing something else on the computerand vrd starts a new task, since it takes the front process, it can get screwed up by typing or clicking on state change now, since it takes the foreground. I have had a couple of qsfixes and adscans broken by this exact problem.
     
  19. Dec 12, 2011 #3639 of 10405
    moyekj

    moyekj Well-Known Member

    11,128
    27
    Jan 23, 2006
    Mission...
    @wireman21
    I'm looking at adding a new auto config option in next release:
    "Do not wait for all jobs to finish before processing new ones"

    This would make kmttg not wait until all tasks have completed on all TiVos before looking for more shows to process.

    @sanjonny
    When you have multiple VRD installations as I mentioned before only 1 can be registered for COM (background) jobs at a time, so the last one you ran GUI for will be the one used for COM jobs. So there's no guarantee if you have more than 1 installation which one is called for COM jobs.
     
  20. Dec 13, 2011 #3640 of 10405
    miricle

    miricle New Member

    63
    0
    Jan 26, 2002
    Waltham, MA
    Hi -- I am new to kmttg so hopefully this is not too much of an often-repeated question but I didn't want to read 120 pages of threads -- I just installed the latest version of kmttg on Win7-x64. I was wondering if its possible to have the various tools detect ads but put in chapter marks rather than skipping them all-together. I guess I am leery about the detection tools detecting too much (or is this a valid concern - I've read that comskip isn't close to 100% accurate). This would be using ProjectX rather than videoredo. BTW, ProjectX didn't appear to come as part of the Windows tools - I needed to download it an put it in place.
     

Share This Page