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. Oct 26, 2011 #3421 of 10413
    moyekj

    moyekj Well-Known Member

    11,151
    35
    Jan 23, 2006
    Mission...
    I don't really understand this. What about all the shows that were deleted off the TiVo that are still in the table? What about shows showing they are in recording state and not downloadable yet? I wouldn't want an out of date table as such. I can understand the request to not erase the currently showing list while retrieving an updated one. I guess for me it's never been a big deal as I usually have 20 shows or less on my units so a refresh is very fast, but for those with 100s or 1000s of entries I can see it may take a while to get a new list.
     
  2. Oct 26, 2011 #3422 of 10413
    ccrider2

    ccrider2 New Member

    100
    0
    Nov 1, 2007
    Also wondering the difference. Been running Java for near 2 years...couldn't get Curl to run. I can't remember the issue I was having. Java worked so I just let it stay there.
     
  3. Oct 26, 2011 #3423 of 10413
    moyekj

    moyekj Well-Known Member

    11,151
    35
    Jan 23, 2006
    Mission...
    The difference is very simply that with the Java option actual Java code is used for downloads as opposed to curl which is a separate executable to do it. Since curl is built for that purpose it's probably a lot more robust and tolerant of networking glitches compared to my simple Java code, but for a healthy network there really shouldn't be much difference between the methods in terms of speed & reliability. I don't remember exactly the motivation behind providing java alternative but I think it was related to some people experiencing problems with curl for whatever reason. Personally I've used curl for many years in this program and several other scripts without any issue.
     
  4. Oct 27, 2011 #3424 of 10413
    sanjonny

    sanjonny New Member

    202
    0
    Nov 2, 2008
    I might have typed it wrong unintentionally and also lied a bit about the actual address (intentionally), but that does work fine outside my lan, it gives me the tivo info page. I can pm you with the correct address if needed.

    Something really strange, I tried logging into the secure port via my cellphone and it worked. But sitting at a computer logged into a different lan, I get the error message (no transfers to outside your lan).

    So I am going to have to do more troubleshooting to figure out what is going on and report back.
     
  5. Oct 27, 2011 #3425 of 10413
    sanjonny

    sanjonny New Member

    202
    0
    Nov 2, 2008
    on another note, I have been playing around with using kmttg and its great hooks to videoredo to work with my other players files, such as the replay tv files and others.

    Today, I tried to do a m2ts file as I would an mpg file. meaning I selected it in kmttg and had the box checked for qsfix and adscan and hit start. I do this all the time for both my tivo files and my replaytv files and other mpg files and it works great. I also plan on trying to do it with some TS files from my new premiere and/or my new hauppage 1212. Is there something I am doing wrong, or does the commands that kmttg calls to videoredo need to be modified to accept these file types (m2ts, and ts in h264?) I did have kmttg setup for videoredo plus, but I changed the directory to the recently installed videoredotvsuite

    So I think there is a command switch or something that is going wrong. When I try and do the qsfix on the file, it runs, but it takes forever. For example, on a half hour high def show (1.4GB before cutting commercials), inside vidredtvsuite, I run qsfix and it puts out the m2ts file in about 2 minutes. But running it in kmttg, it takes almost 10 times that. I have stopped it manually several times because I know something is wrong but cannot figure out what. I have a copy of the command below:

    I have copied the commands and errors below and colored to make them separate:

    >> Running qsfix on E:\tivo recordings\mpg\ts files\2011_10_26_10_47_41.M2TS ...
    C:\WINDOWS\system32\cscript.exe //nologo C:\kmttg\VRDscripts\qsfix.vbs "E:\tivo recordings\mpg\ts files\2011_10_26_10_47_41.M2TS" "E:\tivo recordings\mpg\ts files\2011_10_26_10_47_41.M2TS.qsfix" /l:C:\DOCUME~1\JONATH~1\LOCALS~1\Temp\VRDLock5006616813069657052.tmp /m /x:1920 /y:1080


    After about 5-8 minutes and the file being only at say 20%, I cancelled

    Removing job: {source=E:\tivo recordings\mpg\ts files\2011_10_26_10_47_41.M2TS tivoName=FILES type=adscan status=queued familyId=7.15}
    Killing 'qsfix' job: C:\WINDOWS\system32\cscript.exe //nologo C:\kmttg\VRDscripts\qsfix.vbs "E:\tivo recordings\mpg\ts files\2011_10_26_10_47_41.M2TS" "E:\tivo recordings\mpg\ts files\2011_10_26_10_47_41.M2TS.qsfix" /l:C:\DOCUME~1\JONATH~1\LOCALS~1\Temp\VRDLock5006616813069657052.tmp /m /x:1920 /y:1080


    I am guessing that it is trying to convert the file to do the qsfix, vs inside the program, it just outputs it in the native format? Letting it run, it seems the adscan part works fine, just the qsfix that takes forever. I thought at first it might be processor related but then I tried it with nothing else running and now I am thinking it is command or something.

    Have not tried it yet with a ts file because I don't have one encoded till tomorrow morning. (these are h.264 encodes from the hauppage 1212 device, which rocks BTW)

    If it is something I can fix, I would gladly do it, if not, is there something in kmttg we could set to handle these types of files, like a H264 switch, because I think not all TS files are H264 (we are near the edges of my understanding of encoding vs. wrappers and such)
     
  6. Oct 27, 2011 #3426 of 10413
    moyekj

    moyekj Well-Known Member

    11,151
    35
    Jan 23, 2006
    Mission...
    sanjonny the qsfix in kmttg was specifically designed for processing TiVo source files and thus to output "MPEG2 Program Stream" (you can look at VRDscripts/qsfix.vbs), so if the input is of a different format then that means VRD would re-encode. If you want to process other types of inputs perhaps what you could do is have an alternate kmttg install dir and edit the above script in that installation to output the format that you want.
     
  7. Oct 28, 2011 #3427 of 10413
    sanjonny

    sanjonny New Member

    202
    0
    Nov 2, 2008
    okay, having a shot at this, in your qsfix.vbs i found

    ' Open output file and start processing.
    'NOTE: NEWER VRD TVSUITE4 NO LONGER SUPPORTS FileSaveAsEx so have to use FileSaveProfile
    version = GetVersion(VideoReDo.VersionNumber)
    if version < 4205604 then
    outputFlag = VideoReDo.FileSaveAsEx( destFile, 1 )
    else
    outputFlag = true
    profileName = "MPEG2 Program Stream"
    outputXML = VideoReDo.FileSaveProfile( destFile, profileName )
    if ( left(outputXML,1) = "*" ) then
    outputFlag = false
    end if


    i poked around in the default profiles and found that it looks like 1 in red above is mpeg (tivo style) and 11 is h264 m2ts and 8 is h264 transport stream so i am guessing if i replace the 1 above with 11, it should work on my m2ts files and 8 for my Ts h264 files. i cant try this till tomorrow, probably because i am not at the correct computer but am i on the correct track? i am not a programmer so i am limping thru this
     
  8. Oct 28, 2011 #3428 of 10413
    moyekj

    moyekj Well-Known Member

    11,151
    35
    Jan 23, 2006
    Mission...
    The numbering system is for older versions of VideoRedo (versions earlier than 4.20.5.604). I assume you have a more recent version of VRD TV Suite 4 in which case you should use a profileName instead (FileSaveAsEx no longer works). That should match exactly one of the named profiles in VRD which you can see a list of by choosing Tools->Edit profile list... If you don't have a more recent version then you should download it from here since there are many, many fixes. (Also don't edit "left" function as that has nothing to do with output format).

    EDIT: Come to think of it unless you need video dimension filtering all you have to do is instead of "qsfix" task in kmttg choose "encode" task and the appropriate VRD profile name (you can turn on VRD profiles in kmttg config->VideoRedo->Show VideoRedo encoding profiles). If you choose output profile same as input video type then the result will be same as a qsfix. i.e. No need to edit the qsfix.vbs.
     
  9. Oct 28, 2011 #3429 of 10413
    sanjonny

    sanjonny New Member

    202
    0
    Nov 2, 2008
    interestingly, i currently have version 4.20.6.610 and tried substituting H.264 M2TS in the profile name field (replaced the mpeg2 program stream) but that did not work. (still encoded it) but then i tried putting 11 in the proper place ( not in the left field, thanks) and it WORKED. i actually do think i need to do the dimension filter sometimes because looking at it, the commercials and such do have the dimension changes sometimes, but, i might not have to for content from the 1212 that is taken thru the tivo as it is fixed output (1080i). again am new to this depth of understanding but does qsfix do anything else, or just fix the dimensions. i seem to think it might have fixed sync issues too since that can get screwed up. i will try the encode method also. i am tired and might be forgetting something simple so i will work on it tomorrow morning and report back.

    thanks for your help this far. i think once i get this understood, i might be able to bring a whole other group of folks to the kmttg love fest. i already have some replay converts and the 1212 users are growing rapidly.

    one thing i just thought of, if using the encode method, i think that would be 2 steps because wont it do the adscan first and then try the encode , vs qsfix which happens b4 the adscan? i will try that tomorrow too.
     
  10. Oct 28, 2011 #3430 of 10413
    mattack

    mattack Active Member

    20,750
    4
    Apr 9, 2001
    sunnyvale
    I now have apparently *3000* recordings on my Tivo. Getting the now playing list is SLOW. Even with the "only get 1 page" addition (THANKS AGAIN), then when I want to get an older recording, I have to go change the pref and then get the now playing list again.

    Mostly the recent recordings change, and the old ones stay (they're likely things I want to download off, or sometimes things I'll eventually watch).

    I am perfectly fine with the data being 'stale', since most of it (the older recordings) won't change much, and if I run into too many stale items, I would just get a fresh now playing list.

    Again, the optimal solution would be to get the now playing list asynchronously, while I can still interact with the first page(s) shown.
     
  11. Oct 28, 2011 #3431 of 10413
    mattack

    mattack Active Member

    20,750
    4
    Apr 9, 2001
    sunnyvale
    BUG:

    When downloading with java, it doesn't "know" that it can only download one recording at a time from a specific Tivo..

    So it tries to keep downloading over and over, getting an exception.

    The workaround would be (I presume, I haven't tried it) to use the setting that it can only do 1 job at a time.

    But it "just works" when using curl to download.
     
  12. Oct 29, 2011 #3432 of 10413
    moyekj

    moyekj Well-Known Member

    11,151
    35
    Jan 23, 2006
    Mission...
    It's coded not to do that and I can't reproduce it. I start a download and then pick another show and click on "Start" again and it stays in queued state. Do you have a specific sequence to reproduce the issue?

    EDIT: If you have combined java download/decrypt set I can see that is the case and workaround is not to use combined download/decrypt. (I don't like/use combined download/decrypt plus use VRD for my decrypts, so don't test it very thoroughly, but fix for that is already checked in for next release).
     
  13. Oct 29, 2011 #3433 of 10413
    moyekj

    moyekj Well-Known Member

    11,151
    35
    Jan 23, 2006
    Mission...
    For next release I updated code such that it won't delete the currently shown table while retrieving new set which will help you a little. Updating table incrementally while downloading listings would require many changes (it's a lot more involved than simply adding entries to table for display) so I'm not up for changing that. I assume you know about config setting under TiVos "Start NPL jobs when starting kmttg GUI" which if disabled prevents kmttg starting a new NPL automatically when starting. (I have that disabled as ironically these days I use kmttg mostly for the iPad remote stuff and very rarely to download anything anymore...)
     
  14. Oct 29, 2011 #3434 of 10413
    sanjonny

    sanjonny New Member

    202
    0
    Nov 2, 2008
    still working on my M2TS project and now updated to a later version of the h264 version. It appears I have the qsfix working now with the setup printed earlier.
    Now trying adcut but failing. i modified the regular adcut script as below. I changed both the 1 to 11 and the profile to the h.264, just like the qsfix (in blue)

    ' Open output file and start processing.
    'NOTE: NEWER VRD TVSUITE4 NO LONGER SUPPORTS FileSaveAsEx so have to use FileSaveProfile
    version = GetVersion(VideoReDo.VersionNumber)
    if version < 4205604 then
    outputFlag = VideoReDo.FileSaveAsEx( destFile, 11 )
    else
    outputFlag = true
    profileName = "H.264 MT2S"
    outputXML = VideoReDo.FileSaveProfile( destFile, profileName )
    if ( left(outputXML,1) = "*" ) then
    outputFlag = false
    end if
    end if

    but think i am missing some other check. i get the error that it is still trying to output to mpg as below, which i guess means there is somewhere else I have to change.

    ---DONE--- job=adscan output=E:\tivo recordings\mpg\ts files\2011_10_26_10_15_46.VPrj
    >> Running adcut on E:\tivo recordings\mpg\ts files\2011_10_26_10_15_46.M2TS ...
    C:\WINDOWS\system32\cscript.exe //nologo "C:\Documents and Settings\Jonathan Ryan\Desktop\kmttg\VRDscripts\adcut.vbs" "E:\tivo recordings\mpg\ts files\2011_10_26_10_15_46.VPrj" "e:\tivo recordings\cut\2011_10_26_10_15_46.mpg" /l:C:\DOCUME~1\JONATH~1\LOCALS~1\Temp\VRDLock2640199719249390949.tmp /m
    adcut failed (exit code: 4 ) - check command: C:\WINDOWS\system32\cscript.exe //nologo "C:\Documents and Settings\Jonathan Ryan\Desktop\kmttg\VRDscripts\adcut.vbs" "E:\tivo recordings\mpg\ts files\2011_10_26_10_15_46.VPrj" "e:\tivo recordings\cut\2011_10_26_10_15_46.mpg" /l:C:\DOCUME~1\JONATH~1\LOCALS~1\Temp\VRDLock2640199719249390949.tmp /m
    ? Problem opening output file: e:\tivo recordings\cut\2011_10_26_10_15_46.mpg

    I tried to see another place where it was getting hung up, but don't know enough about the switches to find it. It seemed that adscan worked fine though I have only done this one file. I am now using 4.20.7.629 tvsuite4, I also am not sure if the profile should be number 11 or not as on the profile list it is number 14 (but that is just on tools>profiles hand counting) I know the profile number should not matter but changed it just in case figuring it could not hurt.
     
  15. Oct 29, 2011 #3435 of 10413
    sanjonny

    sanjonny New Member

    202
    0
    Nov 2, 2008
    oops, that should have been M2TS not MT2S. When I changed that, it did the adcut, but it named the file .mpg. It still plays but i don't think it was reencoded as mpg. Will have to run some identity programs to check. It did it quickly which makes me think it is still M2TS but vlc just plays it anyway?

    log is below:
    >> Running adcut on E:\tivo recordings\mpg\ts files\2011_10_26_10_15_46.M2TS ...
    C:\WINDOWS\system32\cscript.exe //nologo "C:\Documents and Settings\Jonathan Ryan\Desktop\kmttg\VRDscripts\adcut.vbs" "E:\tivo recordings\mpg\ts files\2011_10_26_10_15_46.VPrj" "e:\tivo recordings\cut\2011_10_26_10_15_46.mpg" /l:C:\DOCUME~1\JONATH~1\LOCALS~1\Temp\VRDLock6160155534868341528.tmp /m
    adcut job completed: 0:01:52
    ---DONE--- job=adcut output=e:\tivo recordings\cut\2011_10_26_10_15_46.mpg
    (Deleted vprj file: E:\tivo recordings\mpg\ts files\2011_10_26_10_15_46.VPrj)
    (Deleted mpeg file: E:\tivo recordings\mpg\ts files\2011_10_26_10_15_46.M2TS)
     
  16. Oct 29, 2011 #3436 of 10413
    sanjonny

    sanjonny New Member

    202
    0
    Nov 2, 2008
    Checked the file using media info and it is avc which i am assuming is still h264 (again, new to the non mpg) so I guess I can just rename the file, but I hope that there is an easy fix in adcut to get the name correct.

    Again, thanks in advance for your help!
     
  17. Oct 29, 2011 #3437 of 10413
    moyekj

    moyekj Well-Known Member

    11,151
    35
    Jan 23, 2006
    Mission...
    The file naming is all set based on assumptions of mpeg2 file inputs. As a workaround if you are not using "encode" task then you can create a profile under "encode" folder say called "rename_m2ts.enc" which looks something like below to do renaming for you:
    Code:
    <description>
    Rename to .m2ts
    
    <command>
    c:\windows\system32\cmd.exe /C move INPUT OUTPUT
    
    <extension>
    m2ts
    
    Then obviously you enable "encode" task and choose "rename_mt2s" as the encoding profile name. Obviously as well the kmttg config must set ".mpg Cut Dir" to a different dir than the input files (which looks you already did).
     
  18. Oct 29, 2011 #3438 of 10413
    sanjonny

    sanjonny New Member

    202
    0
    Nov 2, 2008
    i am guessing via the input statement that this would only rename the file selected in kmttg to "encode". could i also put this in the adcut.vbs (after everything else) or would that be bad? i guess i can try it to find out. but i like the idea of using the encode to do something like that because that could also allow me to do some other post processing i had not thought i could throw in. i could create in essence a batch file to run using encode.

    is there any way in encode i could fix the qsfix/adcut where you previously had mentioned doing the encode method with custom command to do the stream fix instead of running the qsfix.

    i guess said another way, is it possible to use encode to call one encode step (the qsfix) and then call the adscan script so i could make it work as if i had just selected a h264 qsfix box (that doesnt exist, i know) and adscan the same as i would with a regular mpg?

    because now if i try the encode then adscan, it does the adscan first, because that of course is what it is designed to do.

    e
     
  19. Oct 29, 2011 #3439 of 10413
    moyekj

    moyekj Well-Known Member

    11,151
    35
    Jan 23, 2006
    Mission...
    Yes, you can create your own batch script file (.bat in windows) for example and make the cscript call to VRD in it. Then you have the opportunity to name output file anything you want. Obviously you would design script to have at least input file name as an argument. Then in the kmttg .enc under <command> you would put something like:
    \path\myscript.bat INPUT
    You can get as fancy as you want. You may be better off just entering your script as kmttg custom command and use the "custom" task (with [mpegFile] argument) instead since encode task expects a certain file output or will give an error message if that expected file does not exist (though you could ignore the error).
     
  20. Oct 29, 2011 #3440 of 10413
    ig88

    ig88 New Member

    51
    0
    Feb 1, 2003
    Newbie Question:
    I've been a long time TiVo user (since first model), but never had a real need to offload video from the TiVo - with the whole iPad culture change, I can see this being useful.

    Downloaded kmttg and installed on OS X Lion - pretty much one-click dead simple install, except for the extra install step of downloading Intel build of tivodecode - and even that was simple.

    So I ran the app and downloaded a movie and re-encoded it in a number of different formats to test the quality and size difference.

    I was shocked to see how terrible the (non re-encoded) lossless decrypted file looked.

    It had all kinds of poor-resoution (interlaced lines?) and artifacts in it.

    I don't understand this. The video on TiVo looks great, but the file that I downloaded and decrypted looks pretty bad. It's watchable, but how come it looks so bad?

    The one-hour show was 3.04 GB in size. Now I don't subscribe to digital TV yet, so the original recording is SD, but the video still looks fine on my 65" Panasonic VT30 (CNET's Best-rated TV of 2011).

    What am I missing?

    (ps - great job on the app! pretty cool tool!)
     

Share This Page