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 4, 2008 #321 of 10413
    Ely105

    Ely105 New Member

    25
    0
    Sep 7, 2008
    great work moyekj!

    Hey, is there an easy to have kmttg do encoding on files in a directory after you manually do the commercial editing? Maybe I am going about this wrong, but it does seem that it's better to do the commercial editing manually with videoredo to get it just right and then do an encode after that. Maybe i just need a tool/batch file to watch a directory and do the ffmpeg encode on any file placed there. Obviously it's dependent on me getting around to do the manual commercial edits.
     
  2. Oct 4, 2008 #322 of 10413
    moyekj

    moyekj Well-Known Member

    11,145
    33
    Jan 23, 2006
    Mission...
    Yes there is - that is how I do it because I'm very picky about commercial editing and prefer to do it manually. You simply switch to FILES mode, then bring up File Browser to find .mpg files you want to encode and off you go. (In configuration there is "Enable File Browser" option you should enable, then you will get a FILES entry as part of the TIVOS pulldown).
     
  3. Oct 4, 2008 #323 of 10413
    dlfl

    dlfl Cranky old novice

    6,997
    18
    Jul 6, 2006
    Near...
    You might consider the approach given in post #10 of this thread. TVAP will process the files through ad detection then wait for you to manually adjust its edits and save the project file. Then TVAP will automatically apply the cuts to the file and run the postprocess batch file to do the encoding.
     
  4. Oct 14, 2008 #324 of 10413
    jmpage2

    jmpage2 New Member

    1,951
    0
    Jan 20, 2004
    Did you get it running? If you still need help let me know! :up:
     
  5. Oct 14, 2008 #325 of 10413
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    Shameless plug: Have you tried iTiVo yet? Still being debugged and stuff, won't let you edit, but should get your stuff off an S3 to your iphone.
     
  6. Oct 14, 2008 #326 of 10413
    Tim Winders

    Tim Winders New Member

    26
    0
    Oct 5, 2007
    I've tried iTivo. Had a problem with it maintaining a connection. I started to download a file, then got a message the connection was lost and couldn't connect again. Trying to connect directly to the TiVo web interface and download a file resulted in the "too many connections" message. :confused: Reading about this, seems I need to reboot the TiVo to try again.

    iTiVo looks promising. Looking forward to continued development.
     
  7. Oct 14, 2008 #327 of 10413
    moyekj

    moyekj Well-Known Member

    11,145
    33
    Jan 23, 2006
    Mission...
    For you Mac users it seems like the iTiVo functionality and a lot more is already available in kmttg. All we really need is someone willing to compile binaries of various helper tools (like tivodecode and ffmpeg) under OS X. Those could then be packaged up as a zip file just as I now supply for Windows users so that others don't have to repeat that work.
    Aside from that some documentation on getting Perl/Tk running on Mac would be needed and that's about it. As I stated before it's already been done and there really is not much to it for someone with some programming experience. I don't have access to a Mac system so can't do it myself, but I can work with a volunteer to get it done if desired. The process is very similar to getting it running on a Linux system which I have already done (Linux is my main development environment for this app).
     
  8. Oct 15, 2008 #328 of 10413
    wmcbrine

    wmcbrine Ziphead

    10,368
    22
    Aug 2, 2003
    I'm pretty sure iTiVo already comes with tivodecode, since it's based on TiVoDecode Manager. Check the pyTivo forums for ffmpeg binaries for Macs.
     
  9. Oct 15, 2008 #329 of 10413
    moyekj

    moyekj Well-Known Member

    11,145
    33
    Jan 23, 2006
    Mission...
    Good point. Some web scouring should turn up usable recent binaries. Perl/Tk on Mac I believe requires an X server (for Tk GUI) in order to run, so that's an aspect that needs to be documented to get up and running. Not sure if Tk module is included with default versions of Mac Perl distributions, so that may be another thing to document, and then some testing would be in order.
     
  10. Oct 15, 2008 #330 of 10413
    Tim Winders

    Tim Winders New Member

    26
    0
    Oct 5, 2007
    I'll work on this today. I tried to get the helper programs up and running a few weeks ago, but got stuck on one of them. Don't remember which at the moment...
     
  11. Oct 15, 2008 #331 of 10413
    Tim Winders

    Tim Winders New Member

    26
    0
    Oct 5, 2007
    OK. I have mencoder (version MEncoder SVN-r27776) and tivodecode (version 0.2pre4) compiled and working under Mac OSX 10.5.5.

    I think it was comskip I had problems with before. I'm back to working on it now.

    Is mencoder or ffmpeg preferred?

    Where shall I upload these binaries? tivodecode is small enough to attach to the forum, but mencoder is over 3Mb zipped.
     
  12. Oct 15, 2008 #332 of 10413
    Tim Winders

    Tim Winders New Member

    26
    0
    Oct 5, 2007
    This is seeming like a doomed experiment. I'm not a developer, so I'm just stabbing in the dark. With the extensive work already done on iTiVo, it seems Mac users might be better off in that direction.

    Here's the additional (failed) progress I have made this morning.

    Got ffmpeg compiled. I couldn't include XviD support. I couldn't get the XviD libraries to compile.

    Started to run the kmttg.pl script. Got an error about missing Tk. Searched and found Tk is not installed by default in Mac OS X. You have to install it through an X11 window as Tk does not support the native Mac windowing environment.

    Used cpan to install Tk. Got many errors. Did a forced installed. Tried to run kmttg and got this error:

    bash-3.2$ perl kmttg.pl
    no event type or button # or keysym at /Library/Perl/5.8.8/darwin-thread-multi-2level/Tk/Widget.pm line 1105.
    at kmttg.pl line 3715


    There is another toolkit, Tkx, which I will try to install, but, as I said, with the extensive development done on iTiVo so far, it seems that would be the better way to go for Mac users.

    I am still willing to help with both efforts in any (limited) way that I can.
     
  13. Oct 15, 2008 #333 of 10413
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    http://code.google.com/p/etv-comskip/ is a mac project to support comskip on eyeTV. You can download his program, and simply take out the comskip binary he built (he had to make some code changes to get comskip to build.. he supplies the source if you want to build it yourself).

    That should get you comskip.

    I wasn't clear if you managed to get ffmpeg built or not, so if you want, I put a compiled version in: http://yoav.org/iTiVo/ffmpeg

    As for TclTk, probably the 'easiest' way to install this (and ffmpeg and other tools) is simply to use 'fink':

    http://www.finkproject.org/download/index.php?phpLang=en


    Then you can just run

    fink install tcltk
    fink install ffmpeg

    (Etc)

    someone has generally done all the work you care for :)

    Good luck...
     
  14. Oct 15, 2008 #334 of 10413
    Tim Winders

    Tim Winders New Member

    26
    0
    Oct 5, 2007
    I got ffmpeg working, but I'll grap your binary also. Thanks!

    I already had fink. Didn't even think of getting tcltk there! Ugh. Thanks!
     
  15. Oct 15, 2008 #335 of 10413
    wmcbrine

    wmcbrine Ziphead

    10,368
    22
    Aug 2, 2003
    Strange if true. Tkinter, the Python interface to Tk, doesn't need X (and comes with OS X).
     
  16. Oct 15, 2008 #336 of 10413
    moyekj

    moyekj Well-Known Member

    11,145
    33
    Jan 23, 2006
    Mission...
    I don't think installing tcltk will help. What you need is the Tk module for Perl, not for Tcl. Perhaps this would be of help to get Perl & Tk installed:
    http://www.lehigh.edu/~sol0/Macintosh/X/ptk/

    Note that ffmpeg I found in general a much better and faster encoder than mencoder. comskip is not really a must have for kmttg (personally I don't use it). For curl make sure that it has support for large files built in (or you will run into 2GB limit for downloads). You can check this by executing:
    curl --version
    You should see Largefile somewhere in the features list
    While you are at it make sure curl protocols listed included both http and https (it should but can't hurt to check)
     
  17. Oct 15, 2008 #337 of 10413
    Tim Winders

    Tim Winders New Member

    26
    0
    Oct 5, 2007
    Bah!

    Installing tcltk through fink didn't make a difference. Of course, this might be because I already had a bogus install of Tk. I don't know, and now I don't know how to get RID of it. :confused:

    The ffmpeg binary you compiled is twice the size that I made. You must have included support for things I didn't.

    I downloaded the ETVComskip program, but am not sure exactly what I might need to get "comskip". There are two python programs in the package, MarkCommercials.app and ComSkipper.app. But, I don't know where the equivalent "comskip" would be found.

    No bother. I think I'm just going to stick with iTiVo for now for the Mac and use kmttg on a Windows machine.

    Of course, knowing that only *1* file transfer can be happening at a time from the TiVo is a big help. :thumbsdown:
     
  18. Oct 15, 2008 #338 of 10413
    Tim Winders

    Tim Winders New Member

    26
    0
    Oct 5, 2007
    Yeah, bizarre, but seems to be true. From a terminal window:

    tim-winderss-macbook-pro-17:kmttg twinders$ perl kmttg.pl
    Can't locate Tk.pm in @INC (@INC contains: /sw/lib/perl5 /sw/lib/perl5/darwin /opt/local/lib/perl5/5.8.8/darwin-2level /opt/local/lib/perl5/5.8.8 /opt/local/lib/perl5/site_perl/5.8.8/darwin-2level /opt/local/lib/perl5/site_perl/5.8.8 /opt/local/lib/perl5/site_perl /opt/local/lib/perl5/vendor_perl/5.8.8/darwin-2level /opt/local/lib/perl5/vendor_perl/5.8.8 /opt/local/lib/perl5/vendor_perl .) at kmttg.pl line 12.
    BEGIN failed--compilation aborted at kmttg.pl line 12.

    From an X11 shell window:

    bash-3.2$ perl kmttg.pl
    no event type or button # or keysym at /Library/Perl/5.8.8/darwin-thread-multi-2level/Tk/Widget.pm line 1105.
    at kmttg.pl line 3715


    And I found this post:

    http://community.activestate.com/forum-topic/perl-tk-under-mac-os-x#comment-337

    Which says:

    Might be something happening I don't know about. I guess I'll put in a bit more time trying to get this to work.
     
  19. Oct 15, 2008 #339 of 10413
    Tim Winders

    Tim Winders New Member

    26
    0
    Oct 5, 2007
    I will take a look at that site and see if that helps.

    Understand about comskip. Just a really cool feature of kmttg to have that part of the process. :D

    Checked the native curl on my system.

    tim-winderss-macbook-pro-17:kmttg twinders$ curl --version
    curl 7.16.3 (powerpc-apple-darwin9.0) libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3
    Protocols: tftp ftp telnet dict ldap http file https ftps
    Features: GSS-Negotiate IPv6 Largefile NTLM SSL libz

    So, that looks good.

    Off to do more checking...
     
  20. Oct 15, 2008 #340 of 10413
    Tim Winders

    Tim Winders New Member

    26
    0
    Oct 5, 2007
    Found the something I didn't know.

    The tests require an X11 shell window. Since I was installing from cpan, the default was to run tests, blah blah blah.

    I downloaded the full Tk package and compiled in a normal shell window, skipping the tests.

    Now, I can run 'perl kmttg.pl' in a normal shell window. Only problem is, I get an immediate Bus error. :mad: Sigh. Tried both 8.04.028 and the most current dev version 8.04.028_500 with the same results. The previous 027 version is ancient, so I can't believe it would be any better.

    Results posted through automated cpan reporting show there have been some successful builds on OSX, but not many. :(
     

Share This Page