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. Feb 25, 2011 #3061 of 10413
    moyekj

    moyekj Well-Known Member

    11,144
    32
    Jan 23, 2006
    Mission...
    No, kmttg does not set priority level when launching any job. It's using the same method for all OS's and there is nothing Windows specific and in fact I don't even know how one would go about changing priority level using native Java - probably not possible. Not sure how Windows works determining priority - does it inherit the master javaw.exe for example when launching jobs? Haven't looked into it.
     
  2. Feb 25, 2011 #3062 of 10413
    orangeboy

    orangeboy yes, I AM orangeboy!

    4,083
    0
    Apr 19, 2004
    East Moline, IL
    Thank you.

    And as an FYI, the Windows "START" command allows setting of priority at execution time (that's how I'm controlling ffmpeg in my script), and Task Manager can change the priority of an executing process. Microsoft not allowing Java/python/C/etc to these system level function could be a way of preventing some truly malicious (and covert) code from taking over a machine. However, I'll still try to see if I can create a process monitor that can "bump up" kmttg task to at least "NORMAL", if they come in any lower than that.

    Edit: Ah! Found this snippet of code using Window's WMIC command:
    WMIC PROCESS WHERE Name="explorer.exe" call SetPriority 64

    Using a looping "Tasklist" script that searches for kmttg tasks and bumping lower priority should be within my capabilities!
     
  3. Feb 25, 2011 #3063 of 10413
    orangeboy

    orangeboy yes, I AM orangeboy!

    4,083
    0
    Apr 19, 2004
    East Moline, IL
    FWIW, I found this article concerning Java and Windows (and Linux) priorities: http://www.javamex.com/tutorials/threads/priority_what.shtml

    I may poke around a bit in the kmttg source I have already modified for my environment to see if I can implement setPriority. Chances are more likely that I won't change anything though.
     
  4. Feb 25, 2011 #3064 of 10413
    KevinLeeC

    KevinLeeC New Member

    3
    0
    Feb 5, 2011
    FWIW, I'm having pretty good luck with Process Tamer.

    (You'll have to Google it since I don't have a high enough post count to include a link. It's on a website called DonationCoder.)

    I've set it to always drop the HandbrakeCLI.exe process to "lower than normal" and I've had no trouble streaming while I'm encoding video.
     
  5. Feb 26, 2011 #3065 of 10413
    alex w

    alex w New Member

    3
    0
    Dec 3, 2010
    Just wanted to share my troubles in case it helps anyone in the future.

    Lately, on my Tivo Premiere, with external HD (official), I've had a lot of shows that work on Tivo, work in Windows Media Player as a .TiVo file, but will not decrypt.

    One thing I noticed is that when playing in windows media player, the timing is off.

    It shows 26 minutes and change, when it is a 29 minute and change file. When it hits the 26 minute mark in Windows Media Player, the timing just stops, but the rest of the episode plays out. So something is off.

    I kept getting this code:

    The MAK is fine, I download all other programs fine, before and after each attempt on these files. I can also log into the box via the browser using that MAK.

    I ran the command line with the MAK entered manually, still didn't work:

    So, I looked up tivodecode command lines to see what else I could putz around with, and this seemed to work - adding NO VERIFY:

    That initiated the decrypt normally, and the resulting file was a playable MPG file that was 29 minutes and change, as it should be.

    Looks like on some files, for whatever reason, there is some encoding going on which is making the mak unavailable, and potentially messing with the timing declarations. Jacks up decrypts, but does nothing else.

    Not sure if this is just me, or if it is widespread, but figured I'd share.

    (Note - file names and paths adjusted above)
     
  6. Feb 27, 2011 #3066 of 10413
    moyekj

    moyekj Well-Known Member

    11,144
    32
    Jan 23, 2006
    Mission...
    OK thanks for the feedback. I added the --no-verify option to tivodecode calls for next release.
     
  7. Feb 27, 2011 #3067 of 10413
    DrTivol

    DrTivol New Member

    26
    0
    Feb 5, 2005
    For kmttg and ipad/iphone/ipod users, i'm curious about the methods you are using to view the mp4 files. I've experimented with these 3:

    1. mp4 file synced via itunes -- great for taking with you on the train, plane, or wherever. but a slow process if you want to watch them without syncing or aren't at home to sync.

    2. http server with mp4 files on your mac/pc (eliminates the sync) -- you can run the web sharing server (Http server on the mac), put your mp4 files in that directory. Once you do this, you can point your mobile safari browser to your webpage (e.g. on my mac it's http://192.168.1.108/~accountname/ ). This is rather crude, i don't even have a webpage set up i just go to that URL with mobile safari and i see a directory of my shows. Then when i'm at home i can see the files, tap on them and they stream to the ipad/iphone/ipod.

    3. http server with mp4->mediafilesegmenter->[bunch of *.ts files and a playlist.m3u8 file]. Like #2, i tap on the playlist.m3u8 file from within mobile safari for the corresponding show i want and can stream to the ipad. It's one extra step but it adds a nice 30 sec backup which is sometime convenient.

    Both #2 and #3 could be set up to go outside of your home network and #3 is probably more of an advantage. If you were using an Application then according to Apple rules you must use method #3 if you are going to stream over 3g. Additionally, if you really were to automate this and want to watch it on wifi's and 3g network whenever and wherever then you would want to do multiple encodes and set up #3 to have a variant playlist .m3u8 file that would point to multiple bitrates. Then your native player on your ipad would adapt/adjust to the network conditions and you would get the best streaming experience.

    Anyway, was just curious if anyone is going down this path with kmttg and ipad and it seems like some of this could be integrated into one step.
     
  8. Feb 27, 2011 #3068 of 10413
    danterner

    danterner Not it!

    10,610
    0
    Mar 4, 2005
    Greenacres, FL
    Those options sound like more trouble than just using the AirVideo or ZumoCast apps. Is there a reason they didn't make the list?
     
  9. Feb 27, 2011 #3069 of 10413
    DrTivol

    DrTivol New Member

    26
    0
    Feb 5, 2005
    good point on airVideo! I had played with it about a year ago and completely forgot about it. Just tried it again and it does seem to do everything you need ;) -- all for just $2.99. I think the zumocast app is no longer available ???

    I was just playing around to see if i could get it to work myself for free. i was also getting it to work on Android devices with the webserver support and didn't need to install anything on the mac or on the devices. I didn't check to see if air video is available for android.

    Anyway, i agree with you it was definitely becoming cumbersome but it was working quite nicely.
     
  10. Feb 27, 2011 #3070 of 10413
    PaulS

    PaulS Member

    674
    1
    Sep 16, 2002
    Southern NH
    Zecter, the guys responsible for Zumodrive and Zumocast, have been acquired by Motorola Mobility. Zumocast isn't dead, but they're in a "radio silence" period while they make tweaks/improvements.

    Zecter acquired by Motorola

     
  11. Feb 27, 2011 #3071 of 10413
    DrTivol

    DrTivol New Member

    26
    0
    Feb 5, 2005
    yeah if Moto has it then it's dead.
     
  12. Feb 28, 2011 #3072 of 10413
    brodie4416

    brodie4416 New Member

    26
    0
    Oct 6, 2006
    Hello, I apologize in advance as there is probably a simple explanation for the issue I am having but, for the life of me, I cannot figure it out. I have transferred a show to my computer (its a simpsons episode that I was using as a test) with TivoToGo (before I read about KMTTG) and when I try to do anything with the file (I checked metadata,decrypt,ad detect, ad cut, encode) I get an error on every step (the first error listed below). Could someone tell me what I am doing wrong? The program seems straightforward so I'm not sure how there could be so many issues.

    I've only included the first error here, I can post the rest if necessary. Also, is there a forum for KMTTG or is all help done through this specific thread?


    >> CREATING C:\Users\Matt\Downloads\kmttg_v0p7t\Files\The Simpsons - ''Lisa's First Word'' (Recorded Feb 26, 2011, KDSM).mp4.txt ...
    C:\Users\Matt\Downloads\kmttg_v0p7t\tivodecode\tivodecode.exe --mak MAK -D -x "C:\Users\Matt\Downloads\kmttg_v0p7t\Files\The Simpsons - ''Lisa's First Word'' (Recorded Feb 26, 2011, KDSM).TiVo"
    Failed to generate metadata file: C:\Users\Matt\Downloads\kmttg_v0p7t\Files\The Simpsons - ''Lisa's First Word'' (Recorded Feb 26, 2011, KDSM).mp4.txt
    Exit code: 0
    Encryption by QUALCOMM ;)





    Thanks!
     
  13. Feb 28, 2011 #3073 of 10413
    moyekj

    moyekj Well-Known Member

    11,144
    32
    Jan 23, 2006
    Mission...
    I'm guessing it's the quotation marks in the file name that are the problem. Get rid of the quotation marks around "Lisa's First Word" in the file name and then try again. (If you download via kmttg it will produce file names that are friendly for further processing).
    There is no kmttg forum - this thread is it.
     
  14. Feb 28, 2011 #3074 of 10413
    ThAbtO

    ThAbtO TiVoholic by the bay

    6,735
    8
    Apr 6, 2000
    SF Bay Area
    Yes, you cannot use the double quotes (") in filenames, but you can use the apostrophe ('), So... if you use 2 apostrophes (''), it would look like the double quotes("), which is allowed.

    In your error quote:

    "C:\Users\Matt\Downloads\kmttg_v0p7t\Files\The Simpsons - ''Lisa's First Word''

    You would probably have a file called:

    "C:\Users\Matt\Downloads\kmttg_v0p7t\Files\The Simpsons - "
     
  15. Feb 28, 2011 #3075 of 10413
    brodie4416

    brodie4416 New Member

    26
    0
    Oct 6, 2006
    Thanks for quick reply,
    I have changed the file name so that it no longer includes quotes - here's the message now:


    Code:
    >> CREATING C:\Users\Matt\Downloads\kmttg_v0p7t\Files\The Simpsons.mp4.txt ...
    C:\Users\Matt\Downloads\kmttg_v0p7t\tivodecode\tivodecode.exe --mak MAK -D -x "C:\Users\Matt\Downloads\kmttg_v0p7t\Files\The Simpsons.TiVo" 
    Failed to generate metadata file: C:\Users\Matt\Downloads\kmttg_v0p7t\Files\The Simpsons.mp4.txt
    Exit code: 0
    Encryption by QUALCOMM ;)
    
    SKIPPING DECRYPT, FILE ALREADY EXISTS: C:\Users\Matt\Downloads\kmttg_v0p7t\Files\The Simpsons.mpg
    >> Running comskip on C:\Users\Matt\Downloads\kmttg_v0p7t\Files\The Simpsons.mpg ...
    C:\Users\Matt\Downloads\kmttg_v0p7t\comskip\comskip.exe --ini C:\Users\Matt\Downloads\kmttg_v0p7t\comskip\comskip.ini "C:\Users\Matt\Downloads\kmttg_v0p7t\Files\The Simpsons.mpg" 
    comskip failed (exit code: 0 ) - check command: C:\Users\Matt\Downloads\kmttg_v0p7t\comskip\comskip.exe --ini C:\Users\Matt\Downloads\kmttg_v0p7t\comskip\comskip.ini "C:\Users\Matt\Downloads\kmttg_v0p7t\Files\The Simpsons.mpg" 
    Comskip 0.80.031, made using:
    mpeg2dec-0.4.0 - by Michel Lespinasse <walken@zoy.org> and Aaron Holtzman
    
    0 frames decoded in 0.00 seconds (0.00 fps)
    edl file not found: C:\Users\Matt\Downloads\kmttg_v0p7t\Files\The Simpsons.edl
    >> ENCODING WITH PROFILE 'hb_tivo_hd' TO FILE C:\Users\Matt\Downloads\kmttg_v0p7t\Files\The Simpsons.mp4 ...
    C:\Users\Matt\Downloads\kmttg_v0p7t\handbrake\HandBrakeCLI.exe -i "C:\Users\Matt\Downloads\kmttg_v0p7t\Files\The Simpsons.mpg" --cpu 8 -f mp4 --large-file -O -e x264 -b 5000 -a 1 -E ac3 -x ref=3:mixed-refs=1:bframes=3:b-pyramid=1:weightb=1:analyse=all:8x8dct=1:me=umh:subq=9:psy-rd=1,0.2:direct=auto:keyint=24:min-keyint=2:no-fast-pskip=1:no-dct-decimate=1 -v -o "C:\Users\Matt\Downloads\kmttg_v0p7t\Files\The Simpsons.mp4" 
    encoding failed (exit code: 0 ) - check command: C:\Users\Matt\Downloads\kmttg_v0p7t\handbrake\HandBrakeCLI.exe -i "C:\Users\Matt\Downloads\kmttg_v0p7t\Files\The Simpsons.mpg" --cpu 8 -f mp4 --large-file -O -e x264 -b 5000 -a 1 -E ac3 -x ref=3:mixed-refs=1:bframes=3:b-pyramid=1:weightb=1:analyse=all:8x8dct=1:me=umh:subq=9:psy-rd=1,0.2:direct=auto:keyint=24:min-keyint=2:no-fast-pskip=1:no-dct-decimate=1 -v -o "C:\Users\Matt\Downloads\kmttg_v0p7t\Files\The Simpsons.mp4" 
    [22:41:13] hb_init: checking cpu count
    [22:41:13] hb_init: starting libhb thread
    HandBrake 0.9.4 (2009112300) - MinGW i386 - http://handbrake.fr
    8 CPUs detected
    Forcing 8 CPUs
    Opening C:\Users\Matt\Downloads\kmttg_v0p7t\Files\The Simpsons.mpg...
    [22:41:13] hb_scan: path=C:\Users\Matt\Downloads\kmttg_v0p7t\Files\The Simpsons.mpg, title_index=1
    [22:41:13] scan: trying to open with libdvdread
    libdvdnav: Using dvdnav version 4.1.3
    libdvdread: Encrypted DVD support unavailable.
    libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
    libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
    libdvdread: Can't open file VIDEO_TS.IFO.
    libdvdnav: vm: failed to read VIDEO_TS.IFO
    [22:41:13] dvd: not a dvd - trying as a stream/file instead
    Input #0, mp3, from 'C:\Users\Matt\Downloads\kmttg_v0p7t\Files\The Simpsons.mpg':
      Duration: 00:00:00.02, start: 0.000000, bitrate: 128 kb/s
        Stream #0.0: Audio: mp1, 48000 Hz, stereo, s16, 128 kb/s
    [22:41:13] hb_stream_open: open C:\Users\Matt\Downloads\kmttg_v0p7t\Files\The Simpsons.mpg failed
    [22:41:13] scan: unrecognized file type
    [22:41:13] libhb: scan thread found 0 valid title(s)
    No title found.
    HandBrake has exited.
    
     
  16. Mar 1, 2011 #3076 of 10413
    moyekj

    moyekj Well-Known Member

    11,144
    32
    Jan 23, 2006
    Mission...
    The root of the problem seems to be tivodecode is not able to decrypt your .TiVo file. So make sure you have supplied the right MAK to kmttg. Are you able to get listings from your TiVo(s) with kmttg? That would confirm if MAK is correct or not. If the .TiVo file is not from your household then that means it has a different MAK and won't decrypt with your MAK.

    For testing check only "decrypt" to test and optionally under kmttg configuration - File Settings enabled "Overwrite existing files" so you don't have to keep deleting the failed .mpg file creation. (Without that setting enabled kmttg will keep skipping decrypt step as it sees an mpg file of same name and won't overwrite it).
     
  17. Mar 1, 2011 #3077 of 10413
    brodie4416

    brodie4416 New Member

    26
    0
    Oct 6, 2006
    I think I have it figured out now - I tried decrypting a file from the tivo tab (using KMTTG to transfer the .tivo file instead of TivoDesktop like I originally did) and it is working just fine. Thanks!
     
  18. Mar 14, 2011 #3078 of 10413
    ACraigL

    ACraigL Member

    694
    0
    Feb 12, 2003
    Hi,

    I recently got a Motorola Atrix and I'm mostly pleased that all my iPod Touch settings create a compatible file for the new device. With one caveat...

    The Android player "wants" the 'album' metadata field to help sort the videos, but they are not getting inserted by default with the metadata checkbox selected. I think I read in the release notes that this was added some time ago, but I have the latest version of kmttg and it's simply not getting in there.

    Any ideas? Or will I have to run atomicparsley as an external command?
     
  19. Mar 14, 2011 #3079 of 10413
    krar4

    krar4 New Member

    57
    0
    Dec 21, 2002
    IL
    I apologize in advance as I'm sure this topic has been covered somewhere in the 3,000+ posts on this forum, but I didn't find it.

    I used to use kmttg quite successfully with 2 Series 2 TiVo's and an Archos 5. Then I switched to an iPod Touch, and it all still worked successfully. Now I upgraded to a TiVo Premiere with the iPod Touch, and now there is significant (4-6 seconds) out of sync audio and video.

    Please advise what the best step-by-step method is for converting from the TiVo Premiere to the iPod Touch that will still allow me to cut commercials out and maintain audio/video sync.

    All other aspects of kmttg work fine for me. I am using a Windows 7 PC, and the TiVo files are downloading wirelessly (in case that matters).

    If the fix involves changing to a different profile, could you also advise how to increase the volume on the profile? I fly a lot, so I like to be able to increase the available volume when needed.

    Thanks in advance.
    Rick
     
  20. Mar 14, 2011 #3080 of 10413
    moyekj

    moyekj Well-Known Member

    11,144
    32
    Jan 23, 2006
    Mission...
    Welcome to the world of digital recordings. Note that with S2 unit TiVo was encoding from analog stream so resulting encodings are well behaved. For S3/S4 units the TiVos are recording the original cable company transmissions which in many cases contain glitches. Most decoders can handle those glitches OK for playback, but when encoding to other formats many encoders don't handle those properly. Enter VideoRedo QuickStream fix which cleans up messed up time stamps and other such issues with the recordings and is essentially a necessary part of the flow if you are going to be re-encoding recordings. You can try trial version for free and the $50 VRD Plus is really what you need if sole purpose is for VRD QS Fix and/or mpeg2 editing.
    i.e. If you include VRD QS fix in the flow before encode stage the A/V sync issues will likely go away.
     

Share This Page