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. Apr 10, 2018 #11741 of 11758
    lew

    lew Well-Known Member

    4,120
    45
    Mar 12, 2002
    Kevin--My profile works in GUI mode. It worked on my previous computer. New computer is running Win10 previous computer was running Win7.

    Thanks for spotting the error. I'll experiment and see what works. Thanks for your help
     
  2. Apr 11, 2018 #11742 of 11758
    elprice7345

    elprice7345 Member TCF Club

    197
    2
    Sep 28, 2009
    Houston, TX
    Scenario: I download, decode and run QSF on a file and the QSF process errors out.

    I’m downloading as Transport Stream and using VRD QSF to decrypt.

    Most of my shows process as expected, but recently a few won’t finish and give me errors.

    When I process them in kmttg (download & combined decrypt/QSF), I get the following error: MPEG Stream Error: Audio Ring Buffer Overflow.

    If I download the show with kmttg, deselecting decrypt and QSF and then run the decrypt and QSF process separately in kmttg, I get the following error:

    Code:
    >> Running qsfix on K:\Download\Frontline-3609-2018-04-11-Trumps Takeover.TiVo ...
    
    C:\WINDOWS\system32\cscript.exe //nologo C:\Users\Public\Documents\kmttg\VRDscripts\qsfix.vbs "K:\Download\Frontline-3609-2018-04-11-Trumps Takeover.TiVo" "K:\Download\Frontline-3609-2018-04-11-Trumps Takeover.ts.qsfix" /l:C:\Users\Ed\AppData\Local\Temp\VRDLock1210456229082186067.tmp /c:mpegts /v:mpeg2video
    
    qsfix failed (exit code: 0 ) - check command: C:\WINDOWS\system32\cscript.exe //nologo C:\Users\Public\Documents\kmttg\VRDscripts\qsfix.vbs "K:\Download\Frontline-3609-2018-04-11-Trumps Takeover.TiVo" "K:\Download\Frontline-3609-2018-04-11-Trumps Takeover.ts.qsfix" /l:C:\Users\Ed\AppData\Local\Temp\VRDLock1210456229082186067.tmp /c:mpegts /v:mpeg2video
    
    C:\Users\Public\Documents\kmttg\VRDscripts\qsfix.vbs(131, 4) (null): The server threw an exception.
    
    
    Killing 'qsfix' job: C:\WINDOWS\system32\cscript.exe //nologo C:\Users\Public\Documents\kmttg\VRDscripts\qsfix.vbs "K:\Download\Frontline-3609-2018-04-11-Trumps Takeover.TiVo" "K:\Download\Frontline-3609-2018-04-11-Trumps Takeover.ts.qsfix" /l:C:\Users\Ed\AppData\Local\Temp\VRDLock1210456229082186067.tmp /c:mpegts /v:mpeg2video
    If I try to open the TiVo file directly in VRD, I get the following error: Video program stream not found. Unable to open file.

    Any suggestions?
     
  3. Apr 11, 2018 #11743 of 11758
    moyekj

    moyekj Well-Known Member

    11,738
    441
    Jan 23, 2006
    Mission...
    You should post at VRD forums (and upload a sample for them).
     
  4. Apr 11, 2018 #11744 of 11758
    elprice7345

    elprice7345 Member TCF Club

    197
    2
    Sep 28, 2009
    Houston, TX
    Last edited: Apr 11, 2018
  5. Apr 11, 2018 #11745 of 11758
    Dan S

    Dan S Member

    30
    0
    Aug 8, 2007
    Here's a quick technical question for Kevin or anyone else who wants to weigh in:

    I am using the very latest version of KMTTG (running on a mac) to decrypt existing hi-definition .tivo files (that are sitting on a computer hard drive) to their original, underlying unencrypted .mpeg files. I am then streaming these mpeg files, using plex on a mac, back to the plex module on my Tivo roamio.

    My question is, is there any way to "double check" that the file has decrypted successfully, and there are no resulting issues with the video quality, 5.1 sound, skip-sync, etc., in the newly created mpeg file.

    I have done a couple of test conversions, that have gone fine on large, 10GB + files of 2-hour hi-def programs with 5.1 sound. The conversions happened very quickly (10-15 minutes on a 2.4GHZ i5 Mac mini) and the resulting files streamed fine on plex to the tivo, and seemed identical to the original .tivo file in both picture quality, 5.1 audio, lip-sync, etc.

    However, after I do the decryption on the hundreds of archived files I have sitting on my 8TB drive, I will be worried about deleting all of my original .tivo files (and maybe this is paranoid). I have a 10 year in the making, 6 terabyte collection of hi-def concerts and documentaries from PBS and MTVHD, and tons of uncut movies (my old cable system did not copy-flag their premium movie channels for many years).

    Before I convert these hundreds of files and then get rid of the originals, I was just curious if there was any way to check or verify the integrity of the resulting file, before getting rid of the originals (other than just watching each one, front to back, carefully, which would be impractical). If possible, I'd like to avoid the expense of buying a 2nd 8TB hard drive, just because of my paranoia of keeping the original .tivo files

    Also, if it matters, a sample of the decryption log for each conversion shows notes the following:
    ----------
    >> DECRYPTING USING TIVOLIBRE /Volumes/8TB/1-Tivo Movies/.TiVo ...

    tivolibre DirectShow compatilibity mode = false

    tivolibre job completed: 0:13:59
    ----------
    Not sure that error message is and if it's something I ever need to worry about?

    Thanks (and also thanks to Kevin for developing and maintaining such a great and useful program, if there is anywhere I could send a modest donation to the project please let me know).
     
    Last edited: Apr 11, 2018
  6. Apr 12, 2018 #11746 of 11758
    sanjonny

    sanjonny Member

    208
    0
    Nov 2, 2008
    About 10 pages ago I reported some memory issues that are/were causing kmttg to eventually clog up. I think i found out what was going on but need programmers help. After encoding, I run a custom batch file that copies files around, moves them and renames them and then calls another batch file that does 5 beeps to let me know that one has finished. This seemed to work fine for years but I am guessing either java or the win 10 updates changed something that is causing it to eventually crash. I will give my files and hopefully you can point in the right direction. Here is batch 1 called after encoding. Please forgive the rems and a few tags that are not used, its all the cut and pasting and trial and error in the past I didn't clean up this is not my skill set....
    This is movecut4.bat which is called by kmttg when my file finishes encoding. See my rem comment at the start line. I tried with and without cmd /c

    Code:
    @echo off
    Setlocal
    move "%~f1" "C:\tivo\cut\delete"
    copy "%~f2" "C:\tivo\encode\del\"
    move "%~f2" "V:\acheck\"
    Endlocal
    Call :renamer
    Start "noise" cmd /c "C:\kmttg\movecut5pingtest.bat"
    rem the above line used to not have the cmd /c comment in it
    rem I tried that thinking it would terminate whatever but it still leaks
    rem Call :renamer2
    rem Call movecut5
    Exit
    
    :renamer
    Setlocal
    C:\kmttg\bulkrename\brc64.exe /DIR:V:\acheck\ /PATTERN:*(*_*_*)* /REMOVELASTN:16 /EXECUTE
    Endlocal
    GOTO :EOF
    
    :renamer2
    Setlocal
    C:\kmttg\bulkrename\brc64.exe /DIR:V:\acheck\ /PATTERN:*---.mkv /REMOVELASTN:3 /EXECUTE
    Endlocal
    GOTO :EOF
    
    :mover
    Copy C:\tivo\encode\*--.mkv V:\acheck\
    Move C:\tivo\encode\*--.mkv C:\tivo\encode\del\
    GOTO :EOF
    and for the beep which is called from about (movecut5pingtest.bat), which is where the problem is happening I think....

    Code:
    Call :pingnoise
    Exit
    
    
    :pingnoise
    Setlocal
    @echo off
    SET BEEPS=5
    for /l %%x in (1, 1,%BEEPS%) do (
           @echo %%x
        @echo off
        @echo
        PING 127.0.0.1 -n 3 >nul
    )
    Endlocal
    GOTO :EOF
    
    I have to do it this way, because if I just put the noise inside batch file one, it will not beep (it will show the output and count up and such but no beep) and if I just call batch file two, same problem, but if I start it, then it opens a separate cmd process and I get the beep. Problem is over say 5 or more encodes, I think either the cmd window is not closing or something is not terminating so I end up taking up huge amounts of memory, the gui will not show changes or they take forever and eventually, I have to kill the kmttg session and start a new one (though it does continue processing although slower).

    If i do not do the beep, I don't have the leak and it seems to work fine and I think this worked for quite awhile but in the last several months, it started being a problem. I am sure you experts can look at it and go, you idiot, you have to do this....but I have read quite abit and cannot figure it out. I thought that just calling the second bat from the first would terminate the first, make the beeps I need and close, but that does not happen (it shows in the gui if I click fast enough but no beeps) and by doing start, I sometimes have the second command window left open but not often.
    So i don't know what I am getting wrong, my programming friend said it is probably blocking but looked quick at my code as I was running out so a quick glance at a cell phone screen was not enough to figure it out and he does not do kmttg.

    Any help greatly appreciated, I am thinking now that what causes the leak is the start call goes out but might not ever terminate the first cmd session? Or the second are looking like they are closed but not closing sometimes or something? I know I cannot use call because it won't beep or some reason I do not remember right now, but any help greatly appreciated.

    I used very similar code to encode stuff outside of kmttg (ripped dvds and phone vides and such) with the beeps in the main batch file and have no issues but again, I think my friend is right about the blocking with java making this not work. Sorry I have just enough knowledge to be dangerous!
     
  7. Apr 12, 2018 #11747 of 11758
    moyekj

    moyekj Well-Known Member

    11,738
    441
    Jan 23, 2006
    Mission...
    sanjonny, this seemed to work for me when I ran as "custom" job
    beep.bat
    Code:
    rundll32 user32.dll,MessageBeep
    sleep 1
    rundll32 user32.dll,MessageBeep
    sleep 1
    rundll32 user32.dll,MessageBeep
    sleep 1
    rundll32 user32.dll,MessageBeep
    sleep 1
    rundll32 user32.dll,MessageBeep
    
     
    gonzotek likes this.
  8. Apr 12, 2018 #11748 of 11758
    reneg

    reneg Active Member

    883
    87
    Jun 19, 2002
    Don't know if this helps or not, but I'd explicitly enable command extensions instead of assuming they are enabled when using "GOTO :EOF". Maybe try adding SETLOCAL ENABLEEXTENSIONS
     
    ClearToLand likes this.
  9. Apr 13, 2018 #11749 of 11758
    sanjonny

    sanjonny Member

    208
    0
    Nov 2, 2008
    Okay, I guess I am running powershell when I open a command window so maybe that has something to do with it, but when I run this
    and manage to click on the error output

    'sleep' is not recognized as an internal or external command,
    operable program or batch file. I tried this file...
    Code:
    @echo off
    Setlocal
    move "%~f1" "C:\tivo\cut\delete"
    copy "%~f2" "C:\tivo\encode\del\"
    move "%~f2" "V:\acheck\"
    Endlocal
    SETLOCAL ENABLEEXTENSIONS
    Call :renamer
    rem Start "noise" cmd /c "C:\kmttg\movecut5pingtest.bat"
    rem Call :renamer2
    rem Call movecut5
    rundll32 user32.dll,MessageBeep
    sleep 1
    rundll32 user32.dll,MessageBeep
    sleep 1
    rundll32 user32.dll,MessageBeep
    sleep 1
    rundll32 user32.dll,MessageBeep
    sleep 1
    rundll32 user32.dll,MessageBeep
    Exit
    
    :renamer
    Setlocal
    C:\kmttg\bulkrename\brc64.exe /DIR:V:\acheck\ /PATTERN:*(*_*_*)* /REMOVELASTN:16 /EXECUTE
    Endlocal
    GOTO :EOF
    
    :renamer2
    Setlocal
    C:\kmttg\bulkrename\brc64.exe /DIR:V:\acheck\ /PATTERN:*---.mkv /REMOVELASTN:3 /EXECUTE
    Endlocal
    GOTO :EOF
    
    :mover
    Copy C:\tivo\encode\*--.mkv V:\acheck\
    Move C:\tivo\encode\*--.mkv C:\tivo\encode\del\
    GOTO :EOF
    
    and no beeps and the same error. When I click on beep.bat that I made just to test....
    Code:
    SETLOCAL ENABLEEXTENSIONS
    rundll32 user32.dll,MessageBeep
    sleep 1
    rundll32 user32.dll,MessageBeep
    sleep 1
    rundll32 user32.dll,MessageBeep
    sleep 1
    rundll32 user32.dll,MessageBeep
    sleep 1
    rundll32 user32.dll,MessageBeep
    pause
    Exit
    When I run beep.bat in powershell by itself (using full path since it will not work just typing beep.bat) I get the following

    Code:
    PS C:\Users\sanjonny\Downloads> c:\users\sanjonny\Downloads\beep.bat
    
    C:\Users\sanjonny\Downloads>SETLOCAL ENABLEEXTENSIONS
    
    C:\Users\sanjonny\Downloads>rundll32 user32.dll,MessageBeep
    
    C:\Users\sanjonny\Downloads>sleep 1
    'sleep' is not recognized as an internal or external command,
    operable program or batch file.
    
    C:\Users\sanjonny\Downloads>rundll32 user32.dll,MessageBeep
    
    C:\Users\sanjonny\Downloads>sleep 1
    'sleep' is not recognized as an internal or external command,
    operable program or batch file.
    
    C:\Users\sanjonny\Downloads>rundll32 user32.dll,MessageBeep
    
    C:\Users\sanjonny\Downloads>sleep 1
    'sleep' is not recognized as an internal or external command,
    operable program or batch file.
    
    C:\Users\sanjonny\Downloads>rundll32 user32.dll,MessageBeep
    
    C:\Users\sanjonny\Downloads>sleep 1
    'sleep' is not recognized as an internal or external command,
    operable program or batch file.
    
    C:\Users\sanjonny\Downloads>rundll32 user32.dll,MessageBeep
    
    C:\Users\sanjonny\Downloads>pause
    Press any key to continue . . .
    So I guess no beeps and no sleep :)
    and just for kicks I tried running beep.bat in cmd window instead and it still did not work?
    Win 10 or Powershell or I have operator error?
     
  10. Apr 13, 2018 #11750 of 11758
    HerronScott

    HerronScott Well-Known Member

    5,327
    490
    Jan 1, 2002
    Staunton, VA
    I wouldn't run a batch file in Powershell. Also, what happens when you just run just the single command he provided at the command prompt? Works fine here under Windows 10 (makes the new message sound so it's not a beep exactly).

    Scott
     
  11. Apr 13, 2018 #11751 of 11758
    moyekj

    moyekj Well-Known Member

    11,738
    441
    Jan 23, 2006
    Mission...
    Running windows 10 here too. Instead of sleep you can use timeout:
    Code:
    rundll32 user32.dll,MessageBeep
    timeout /t 1 /nobreak
    rundll32 user32.dll,MessageBeep
    timeout /t 1 /nobreak
    rundll32 user32.dll,MessageBeep
    timeout /t 1 /nobreak
    rundll32 user32.dll,MessageBeep
    timeout /t 1 /nobreak
    rundll32 user32.dll,MessageBeep
    
    Run from "cmd" prompt works for me as well as run as .bat file as a kmttg custom job.
    As mentioned above, this invokes windows sound not a beep, so system you are running on needs to have a sound card of some sort (and volume turned up).
     
  12. Apr 13, 2018 #11752 of 11758
    mlippert

    mlippert Member

    173
    24
    Apr 2, 2010
    Massachusetts
    For a beep on windows 7 (I don't have 10 around) cmd prompt I can type:
    Code:
    echo ^G
    where the ^G is actually control G (ie it should be the 0x07 BEL control character). Which will then beep when I press enter to execute that echo command, not only that but just now I tried
    Code:
    echo ^G^G^G^G^G
    and got 5 distinct beeps no intermediate sleeps required.
     
  13. Apr 14, 2018 #11753 of 11758
    HerronScott

    HerronScott Well-Known Member

    5,327
    490
    Jan 1, 2002
    Staunton, VA
    That works on Windows 10 as well from a cmd prompt. Still not a beep but it works. (seems to play the Critical Stop sound - Windows Foreground.wav on my Windows 10).

    Scott
     
  14. Apr 15, 2018 #11754 of 11758
    sanjonny

    sanjonny Member

    208
    0
    Nov 2, 2008
    I will let the last part of that slide since you are so awesome. ;}
    So curiouser and curiouser....I tried the prior suggestions and batch files on 2 different win 10 computers, the main one that runs kmttg and the one that runs it sometimes and also as beep.bat files. it worked on neither of those. Also for the Powershell comments, I had to run it for something i did in the past, probably hacking my phone or GPS and it just stayed that way so it defaults to opening a powershell window vs. cmd. I had it that way on both computers and switched it back to no more default powershell.

    Anyway, so both computers updated in the last couple days (thanks windows forced update). NOW, MessageBeep works on one of them. and the timeout command etc, works fine. I have not tried it in kmttg yet but I will. On the other computer, still does not make the sound, but sound is on and works fine when I use my pingnoise script above (as a batch file that gives the beepish noise instead of the system command) so I know the sound card is working AND the volume is up....Could windows update have fixed something? Anyway, will report back once I have played with it a little more.

    Also, isn't ^G just an error beep? I know I am combining several answers....

    Just had a thought, and excuse my stupidity, but could rundll32 not work on 64 bit machine? I know the main computer runs 64 bit but frankly do not know if everything runs 64 bit in win 10 or only specific computers. I just forget how that works.
     
  15. Apr 15, 2018 #11755 of 11758
    HerronScott

    HerronScott Well-Known Member

    5,327
    490
    Jan 1, 2002
    Staunton, VA
    No, it works on 64-bit Windows 10 (that's what mine is running and no problem).

    Other than anything that might have been reset as part of rebooting, I doubt it since the reboot/update should have just been the April security patches.

    Just to be clear you might verify that you have all of the volume controls turned up in the volume mixer.

    upload_2018-4-15_10-52-24.png

    One of the last major Windows 10 upgrades replaced the cmd options when you right-click on Start with Powershell. I reverted back to the cmd options on mine as I can always run Powershell from the cmd (and yes I love Powershell so it's not because I don't like it but I want an easy way to get to a cmd ).

    Scott
     
  16. Apr 15, 2018 #11756 of 11758
    murgatroyd

    murgatroyd Don't stop believin'

    25,872
    141
    Jan 5, 2002
    Berkeley CA
    ... and make sure the ones you want to play aren't muted (like the controls in the screenshot). The volume controls that will play should have blue sound waves next to the speaker and not the red lined-through circle.
     
  17. Apr 16, 2018 #11757 of 11758
    lew

    lew Well-Known Member

    4,120
    45
    Mar 12, 2002
    I hate it when posters, on any internet board. don't follow up.
    Any VRD profile which uses the intel quick sync encoder is working in GUI mode but not in service mode.
    It worked with my old computer. My new computer is running Win10. New processor is fast enough, I don't need to use QSV. Agreed the issue is with VRD and not with KMTTG.

    FYI I use auto transfers to encode a relatively low bitrate, commercial free video, which can be downloaded or streamed via Plex using low bandwidth hotel WiFi or even cell data. Works so much better then using the tivo app. Alternatively I can use your share browser to download the encoded video.
     
    moyekj likes this.
  18. Apr 16, 2018 #11758 of 11758
    sanjonny

    sanjonny Member

    208
    0
    Nov 2, 2008
    Okay, so many times later and I basically got it to work. Timeout does not seem to work inside java. I tried multiple variations and it will work fine in a batch file, but run it in java and it beeps about twice in a short time. I checked my volume controls and they were fine, because I could get both sounds, the Bel and the system boing outside of java and whatever voodo happened on the main computer after 2 reboots, it also finally worked in the batch file. Maybe sound drivers were updating or gawd knows what. But timeout sounded like it was rushing thru so even though I put as many as 8 lines in and changed the wait to 5 or 10, it still gave about two boings. Then I found this link
    Why TIMEOUT does not work if calling from a Java program - Forums

    and then followed that quoted link to

    How to insert delays in your batch files

    and some others on stack overflow that talk about java/windows timeout issues. It sounds like it works in everything but a bat file. I then went back and tried my original tact again with the BEL script used earlier...scroll back a few. It waited but would not beep unless I did as before and pulled a separate batch file process, so I guess it will not do under java without a separate cmd process?

    But I seem to have finally cracked it by using the for countdown ping time that I was originally using and and then messagebeep, which does finally work inside of java so I now have this batch file running and it boings every time for 5 boings..
    Code:
    @echo off
    Setlocal
    move "%~f1" "C:\tivo\cut\delete"
    copy "%~f2" "C:\tivo\encode\del\"
    move "%~f2" "V:\acheck\"
    Endlocal
    SETLOCAL ENABLEEXTENSIONS
    Call :renamer
    
    Setlocal
    @echo off
    SET BEEPS=5
    for /l %%x in (1, 1,%BEEPS%) do (
           rundll32 user32.dll,MessageBeep
        PING 127.0.0.1 -n 3 >nul
    )
    Endlocal
    Exit
    
    :renamer
    Setlocal
    C:\kmttg\bulkrename\brc64.exe /DIR:V:\acheck\ /PATTERN:*(*_*_*)* /REMOVELASTN:16 /EXECUTE
    Endlocal
    GOTO :EOF
    
    
    As you can see, I removed all the crap and it appears to finally be working! I don't think it will leak memory anymore since I am not calling the separate process, but will try it the next few days and see what happens!
     

Share This Page