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 28, 2008 #361 of 10412
    menos

    menos New Member

    60
    0
    Nov 13, 2007
    Moore, OK
    I think I may have figured it out. When the service is running its current directory is set to windows\system32. For all of the commands that use relative paths, those will fail. We may need to call the commands using their full path. For example I changed the following line in tivostream_hd.enc and it seems to work.
    Code:
    PERL tivo_mp4_encode.pl -h FFMPEG INPUT OUTPUT
    
    to
    Code:
    PERL "c:\program files\kmttg\tivo_mp4_encode.pl" -h FFMPEG INPUT OUTPUT
    
    Now I'm getting an error trying to run qt-faststart, but I think the problem is similar. I'm gonna look at that next.
     
  2. Oct 28, 2008 #362 of 10412
    moyekj

    moyekj Well-Known Member

    11,141
    31
    Jan 23, 2006
    Mission...
    Sorry I didn't replay earlier but yes that is the problem. In next version I've already added another keyword called PWD in the tivostream encoding templates which gets replaced with appropriate full path so this will no longer be an issue. Will probably be a few days until next release however as I'm tied up with my real job lately.
     
  3. Oct 29, 2008 #363 of 10412
    menos

    menos New Member

    60
    0
    Nov 13, 2007
    Moore, OK
    Crap.. For some reason I'm running about a 50-75% failure rate on ffmpeg encodes. This is the error I'm seeing in the auto.log. I'm also getting a windows application crash.

    Code:
    Wed 10/29/2008 08:37 PM >> ENCODING TO FILE G:\tivo_tv\Sid the Science Kid/Sid the Science Kid-I Want Cake.mp4 ...
    Wed 10/29/2008 08:37 PM "C:\Perl\bin\perl.exe" "c:\program files\kmttg\tivo_mp4_encode.pl" "C:\Program Files\kmttg\ffmpeg\ffmpeg.exe" "C:\Program Files\kmttg\temp\Sid the Science Kid/Sid the Science Kid-I Want Cake.mpg" "G:\tivo_tv\Sid the Science Kid/Sid the Science Kid-I Want Cake.mp4"
    Wed 10/29/2008 08:44 PM G:\tivo_tv\Sid the Science Kid/Sid the Science Kid-I Want Cake.mp4 size=160.52 MB elapsed=00:07:21 (3.05 Mbps)
    Wed 10/29/2008 08:44 PM *ERROR* encoder failed (exit code: 255) - check above C:\Perl\bin\perl.exe command
    Wed 10/29/2008 08:44 PM *ERROR* command failed: "C:\Program Files\kmttg\ffmpeg\ffmpeg.exe" -y -i "C:\Program Files\kmttg\temp\Sid the Science Kid/Sid the Science Kid-I Want Cake.mpg" -v 0 -vcodec libx264 -coder 0 -level 31 -r 29.97 -sameq -g 300 -bufsize 14745k -b 2000k -maxrate 16000k -bug "+autodetect+ms" -me epzs -trellis 2 -mbd 1 -acodec copy -f mp4 "G:\tivo_tv\Sid the Science Kid/Sid the Science Kid-I Want Cake.mp4"
    
     
  4. Oct 29, 2008 #364 of 10412
    moyekj

    moyekj Well-Known Member

    11,141
    31
    Jan 23, 2006
    Mission...
    To get more details on the failure bring up kmttg in GUI mode, select FILES mode and add the above .mpg and then setup the encode. Once it starts running select the job in job monitor and then "ctrl-s" on keyboard will bring up a window with ffmpeg output. This will allow you to see full details of the ffmpeg output and associated error messages.

    Or perhaps easier, run the above ffmpeg command directly from a CMD window.
     
  5. Oct 29, 2008 #365 of 10412
    menos

    menos New Member

    60
    0
    Nov 13, 2007
    Moore, OK
    These are the last few lines in the output before the crash. I've set -v to 3 trying to get as much info as possible.

    Code:
    [libx264 @ 003EFC90]frame=15916 QP=28.41 NAL=2 Slice:P Poc:390 I:95  P:707  SKIP:518  size=8675 bytes SSIM Y:0.94434
    [libx264 @ 003EFC90]frame=15917 QP=27.63 NAL=2 Slice:P Poc:392 I:995  :107  SKIP:218  size=27788 bytes SSIM Y:0.96117
    [libx264 @ 003EFC90]frame=15918 QP=27.70 NAL=2 Slice:P Poc:394 I:182 P:625  SKIP:513  size=16558 bytes SSIM Y:0.95208
    [libx264 @ 003EFC90]frame=15919 QP=28.07 NAL=2 Slice:P Poc:396 I:214  :658  SKIP:448  size=18829 bytes SSIM Y:0.95080
    [libx264 @ 003EFC90]frame=15920 QP=27.19 NAL=2 Slice:P Poc:398 I:168 P:751  SKIP:401  size=12077 bytes SSIM Y:0.95314
    [libx264 @ 003EFC90]frame=15921 QP=29.32 NAL=2 Slice:P Poc:400 I:152 P:806  SKIP:362  size=12733 bytes SSIM Y:0.95211
    [libx264 @ 003EFC90]frame=15922 QP=28.14 NAL=2 Slice:P Poc:402 I:212 P:726  SKIP:382  size=14339 bytes SSIM Y:0.95263
    timestamp discontinuity -64000, new offset= 88214611
    
    I'm getting the timestamp discontinuity error all over the place though, not just right before it dies.
     
  6. Oct 30, 2008 #366 of 10412
    moyekj

    moyekj Well-Known Member

    11,141
    31
    Jan 23, 2006
    Mission...
    If you haven't already you should run the .mpg file through VideoRedo QuickStream fix before trying to encode it.
     
  7. Oct 30, 2008 #367 of 10412
    moyekj

    moyekj Well-Known Member

    11,141
    31
    Jan 23, 2006
    Mission...
  8. Oct 30, 2008 #368 of 10412
    menos

    menos New Member

    60
    0
    Nov 13, 2007
    Moore, OK
    OK.. If I run the file through quickstream fix it seems to fix it. However, I can't get the quickstream fix to run under the service. If I paste that exact command into a command prompt, it runs. But it won't when called from the service.

    Code:
    Thu 10/30/2008 07:52 PM "C:\WINDOWS\system32\cscript.exe" //nologo "C:\Program Files\VideoReDoTVSuite\vp.vbs" "C:\Program Files\kmttg\temp\Sid the Science Kid/Sid the Science Kid-My Shrinking Shoes.mpg" "C:\Program Files\kmttg\temp\Sid the Science Kid/Sid the Science Kid-My Shrinking Shoes.mpg.qsfix" /t1 /d /q /na
    Thu 10/30/2008 07:55 PM *ERROR* qsfix failed (exit code: 0) - check above qsfix command
    Thu 10/30/2008 07:55 PM C:\Program Files\VideoReDoTVSuite\vp.vbs(45, 2) WScript.CreateObject: Could not create object named "VideoReDo.VideoReDoSilent".
    

    Grrrr... Almost there....
     
  9. Oct 31, 2008 #369 of 10412
    moyekj

    moyekj Well-Known Member

    11,141
    31
    Jan 23, 2006
    Mission...
    Don't worry about the auto mode and path related problems for the tivostream encoding profiles. I will be fixing those to use full paths so those problems cannot arise in next release. However I've been extremely busy with my real job lately so may be a few more days before I get the next released finished.

    For the QSFix not running in service mode, I had the exact same problem but not sure how to deal with it. If you select "Run in GUI" option then it works fine. Only as a service the QSFix will not run for some reason... I'll send a PM to Dan to see if he knows a fix for it.
     
  10. Nov 3, 2008 #370 of 10412
    tpintsch

    tpintsch New Member

    3
    0
    Mar 10, 2008
    First, I wanted to post a thank you for such a great program. It does everything I want it to do.

    Over the past weekend I ran into a problem trying to transfer videos from my Tivo Series 3. The video transfer from the tivo would crawl, after 10 minutes I got 3 megabytes down.

    I tried everything, rebooting the computer, rebooting the tivo and the router, what fixed it for me was running both the computer running kmttg and the tivo through the same switch.

    I have a 28 port 10/100 and an 8 port 10/100/1000. Since the computer has gigabit and the tivo does not, I have the two switches uplinked and the tivo was in the 10/100 and the kmttg machine was in the gigabit. Hooking them together on the gigabit made all of the difference which leads me to believe that the Tivo does not like having two switches or more between it and the TTG computer and itself.

    Has anyone else experienced this?

    Thanks,

    tim.
     
  11. Nov 3, 2008 #371 of 10412
    Philipp5

    Philipp5 New Member

    19
    0
    Mar 5, 2008
    I've got the Tivo connected to a 4 port 10/100 which in turn connects to my Verizon Fios router. The PC running kmttg is connected to the Fios router. Kmttg works great. Awesome program & THANK YOU Moyekj!
     
  12. Nov 3, 2008 #372 of 10412
    tpintsch

    tpintsch New Member

    3
    0
    Mar 10, 2008
    Wow Phil, That is most interesting indeed. I wonder if I installed a second network card in my windows box for 10/100 and set the kmttg for that if it was just the Gigabit Switch that was doing it. I am pretty sure the Verizon routers are also 10/100.

    I'm not home and not in front of it right now, but I think on a separate network card, kmttg can be used exclusively for that network card. Just thinking out loud, I really don't want to use any more of my precious Gigabit links then I have to.

    Thanks,

    tim.
     
  13. Nov 8, 2008 #373 of 10412
    moyekj

    moyekj Well-Known Member

    11,141
    31
    Jan 23, 2006
    Mission...
    ------------------
    v0.5e (11/08/2008)
    ------------------
    ENHANCEMENTS:
    * Added option to check for low disk space (user can specify min desired space).
    Option is disabled by default but can be enabled under configuration.
    With option enabled, jobs will not run if there is not sufficient disk
    space available according to specified minimum.
    * Forward slash in show name replaced with underscore to avoid undesired
    sub-folders.
    * In auto transfer mode .TiVo files are now not re-downloaded if they already
    exist in destination dir.

    FIXES:
    * tivostream profiles changed to use full paths instead of relative paths
    such that they still work if running in windows service mode.
    This change affected files under encode directory and tivo_mp4_encode.pl
     
  14. Nov 15, 2008 #374 of 10412
    bluraven

    bluraven New Member

    19
    0
    Dec 24, 2005
    This script looks like it's exactly what I need for what I want to setup on my home network. Thanks for your hard work on this. I've read through every post in this thread and all the documentation. I have a question though. I'd like to set it up to auto-download every single show on the tivo and cut commercials, re-encode etc, not just my favorite shows. Does the auto-download feature accept a wildcard (*) for title and can download everything automatically? Would there be a way to have it delete the shows on the PC server when it notices they are no longer on the tivo? Even better, have it set an amount of days of when to delete from the computer after it has been deleted from the tivo? Also, does anyone have good encoder settings for high quality and small file size for playback on a wireless network with windows media player?

    Thanks :)
     
  15. Nov 15, 2008 #375 of 10412
    moyekj

    moyekj Well-Known Member

    11,141
    31
    Jan 23, 2006
    Mission...
    If you setup a title match with keywords set to .* this will match all titles.

    There is no option for deleting titles on your computer not on the Tivo(s). That seems a little dangerous to me. Note that kmttg will not re-download .TiVo files already present on your PC.

    h264_med_rate profile is probably a good choice for good quality encoding while keeping a relatively small file size (compared to mpeg2).
    EDIT: h264_med_rate profile will keep audio as AC3 and many players still can't handle H.264 video & AC3 audio. So if you want something that plays with Windows Media Player you should pick the ps3 or xbox360 profiles which use AAC audio.
     
  16. Nov 15, 2008 #376 of 10412
    bluraven

    bluraven New Member

    19
    0
    Dec 24, 2005
    I'll try that, thank you so much for the quick reply :)
     
  17. Nov 20, 2008 #377 of 10412
    AudioNutz

    AudioNutz New Member

    318
    0
    Nov 9, 2008
    Tim,
    After reading all of your trials and testing, I was able to get this to work on a Macintosh. Don't give up now...

    I'm not sure if my "word" is enough proof, so see the screenshot below showing time and date. If you're still interested, I could document the process of getting KMTTG to work on a Mac if anyone wants, but I received 100% of the information in this tread. (And the links posted in this thread)

    I'm not a programmer, just an average Joe fooling around with Perl, X11, and Tk-804.028...

    [​IMG]
     
  18. Nov 20, 2008 #378 of 10412
    AudioNutz

    AudioNutz New Member

    318
    0
    Nov 9, 2008
    Disclaimer: I have not tested every single feature on the Mac...
     
  19. Nov 20, 2008 #379 of 10412
    moyekj

    moyekj Well-Known Member

    11,141
    31
    Jan 23, 2006
    Mission...
    ------------------
    v0.5f (11/19/2008)
    ------------------
    ENHANCEMENTS:
    * Added percentage complete for ffmpeg encodes (previously only time was displayed)

    FIXES:
    * Auto transfers were not working properly with cached data
    * Fixed problem with auto run in GUI with cached data
    * In auto transfers configuration GUI the list type & keywords fields were
    not updated when using UPDATE button to change type or keywords
     
  20. Nov 20, 2008 #380 of 10412
    moyekj

    moyekj Well-Known Member

    11,141
    31
    Jan 23, 2006
    Mission...
    AudioNutz, great work on getting things going on Mac. I think a summary of steps to get things working would be great and perhaps something I can include in documentation and/or website. Also, perhaps a zip package of the 3rd party binaries would be helpful as well?
     

Share This Page