1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

iTiVo (TiVo -> mac -> iPhone)

Discussion in 'TiVo Home Media Features & TiVoToGo' started by Yoav, Nov 6, 2008.

  1. Apr 6, 2009 #381 of 741
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    so when I said "you're on your own" I wasn't kidding. As it encodes it writes out information in /tmp/iTiVo-<username>/iTiVoDL2 . You *may* want to look at that as it's encoding to see if anything else is logged in there (that's the direct output of Handbrake). Looks to me like Handbrake decided to exit early on that file, but I don't know why. Is it possible that it's just a bad mpeg-2? I'm told that sometimes the tivo makes bad files that cause encoders to crash...
     
  2. Apr 6, 2009 #382 of 741
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    And this is on the same file that your handbrake encoding is failing on? Does it also fail when you use a very simple encoding like 'iphone'? If so, I'm leaning more strongly towards the 'bad mpeg-2 file theory' from my last post. (You may also want to disable comskip, since it might be generating a skip list that is wrong/confusing the encoder).

    Btw there is a tool on windows that people use to 'fix' bad mpeg-2's which is part of the VideoReDo package. I do not believe anyone has written a similar tool for the mac though.
     
  3. Apr 8, 2009 #383 of 741
    yargok

    yargok New Member

    12
    0
    Dec 1, 2007
    I have a question about how people manage their itunes libraries when using iTiVo. I know you can set your iphone to only sync the most recent 5 episodes, but i'd like to do something similar with itunes to save space. Is there a way in iTiVo or some other script to make sure there are only 5 episodes of a given show in the TV show library and delete the oldest ones?
     
  4. Apr 8, 2009 #384 of 741
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    iTiVo will not delete shows from your iTunes library.

    I looked around for itunes scripts that would do this for you, and so far have had no luck. Doug's applescripts page: http://dougscripts.com/itunes/usually has tons of useful stuff, but I guess there's sort of a 'worry' about deleting the wrong thing (also, i think itunes requires a popup to delete files no matter what).

    If you have the script-know-how you can probably edit one of the deletion scripts he has to actually try and figure out how many episodes of a show are on disk, and see if you can sort those by time and expire the oldest...

    OR a little manual work (this won't be automatic, but it's pretty easy and is what I do to delete old things): Click the "TV Shows" button. Make sure you're using the list view (the View with the horizontal lines). Now right-click or option-click the word 'Name' and choose 'Date Added'. Now you can see when each show as added. Left-click on the 'Date Added' name to sort everything by date added. Go to the bottom (oldest episodes), and click or shift-click to select all the episodes you want gone. Hit 'delete' and make sure to say "Move to trash".

    So yeah, not automated.. sorry :(
    Maybe someone will have a better solution in a bit...
     
  5. Apr 8, 2009 #385 of 741
    MacGuruTX

    MacGuruTX Member

    46
    0
    Sep 19, 2006
    San Diego, CA
    I've run into this on both release and beta versions.

    1) Move a show from now playing to Download Queue
    2) Select the Download Now
    3) go back to my now playing and now add several more shows to the Download queue.
    4) The download that was in progress now appears to be hung. as it never adds any more to the file.

    5) Possibly related/unrelated. - Press the Cancel Download button. I expected it to clear out the file name and progress, but it doesn't do that?

    downloading in "decrypt" mode
     
  6. Apr 9, 2009 #386 of 741
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    Odd I just tried those exact steps and it's working fine (the download of the file continues, the new files are added to the queue)... And hitting cancel cancels that download and moves on down the list to the next show...

    It sounds like somehow when you add a show to the queue you are throwing it out of the 'downloading loop'. The only guess I can have as to why that would happen is if there's some error adding the new show to the queue. Anything 'special' about the new show you're adding?

    If you can get it to happen again (it sounds like you can), can I get you to do the whole thing as described, and then attach the logfile: /tmp/iTiVo-<username>/iTiVo.log ? Hoping there might be something useful there...
     
  7. danm628

    danm628 Active Member TCF Club

    2,217
    8
    May 14, 2002
    Vancouver, WA
    Yoav,

    I just got a Turbo 264 HD and have a minor problem with iTiVo. It does work for download and convert but it won't import to iTunes. When I look in the log I see:

    osascript /Applications/iTiVo.app//Contents/Resources/Scripts/elgato.scpt /tmp/iTiVo-dlmoore/iTiVoDLPipe2.mpg /Volumes/Newertech\ miniStack\ V3/Movies/TiVo/Good\ Eats\ -\ Cuckoo\ for\ Coq\ au\ Vin.mp4 /tmp/iTiVo-dlmoore/iTiVoDL2 iPhone 2>&1

    2009-04-12 09:12:07 mencoder timeout: 1 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 09:12:08 mencoder timeout: 2 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 09:12:08 mencoder timeout: 3 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 09:12:09 mencoder timeout: 4 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 09:12:09 mencoder timeout: 5 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 09:12:10 mencoder timeout: 6 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 09:12:10 mencoder timeout: 7 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 09:12:11 mencoder timeout: 8 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 09:12:11 mencoder timeout: 9 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 09:12:12 mencoder timeout: 10 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 09:12:13 mencoder timeout: 11 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 09:12:13 mencoder timeout: 12 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 09:12:14 mencoder timeout: 13 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 09:12:14 mencoder timeout: 14 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 09:12:15 mencoder timeout: 15 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 09:12:15 mencoder timeout: 16 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 09:12:16 mencoder timeout: 17 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 09:12:16 mencoder timeout: 18 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 09:12:17 mencoder timeout: 19 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 09:12:17 mencoder timeout: 20 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 09:12:18 mencoder timeout: 21 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 09:12:18 mencoder timeout: 22 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 09:12:19 mencoder timeout: 23 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 09:12:20 mencoder timeout: 24 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 09:12:20 mencoder timeout: 25 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    /Applications/iTiVo.app//Contents/Resources/Scripts/elgato.scpt: execution error: The variable date_diff is not defined. (-2753)
    2009-04-12 09:12:21 mencoder timeout: 26 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 09:12:21 Download completed
    2009-04-12 09:12:23 killed :

    It looks like the elgato applescript is using an undefined variable. I think this means the wait till idle applescript isn't running correctly. This may be an Elgato bug instead of iTiVo.

    I do get an output mp4 file in the correct directory on my external drive. The import to iTunes does not happen when it finishes.

    The Turbo 264 HD also supports some new output formats including "HD 720p" and "HD 1080p". I haven't tried either yet.

    - Dan
     
  8. Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    Actually, I'd suspect that this is a problem with how I process elgato things (an iTiVo bug). as I've mentioned before, I don't own one of the devices, so can't really test things out and rely on you guys to help me out ...

    Anyways, what seems to be happening is that iTiVo correctly invokes the 'process movie with elgato', and it supposed to be getting 'fake' progress info from it but isn't, so iTiVo times out and moves on..
    While it times out, it stops dealing with it. After a few minutes, elgato finishes processing the movie and informs iTiVo (which no longer listens) that it's done. Which is why you have a converted file, but it's not imported into iTunes (iTiVo normally does that part).

    I'll see if I can figure out why it's not giving 'fake progress info' to iTiVo.

     
  9. Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    Ok, I see a situation where the date_diff variable can have no value set, which may have caused the problem you are seeing..

    Building a new beta to fix it now. Can you install the beta (1.7.5b6) and tell me if it's working for you now?
     
  10. danm628

    danm628 Active Member TCF Club

    2,217
    8
    May 14, 2002
    Vancouver, WA
    New behavior. iTiVo does wait for the conversion to complete but still doesn't report any status. When the conversion is complete it loops back and starts the download again.

    I switched to a different recording (SD, so it's smaller) for testing. Log shows:

    2009-04-12 15:34:36 timeout: 0 currentFileSize: 867 fullFileSize:966
    2009-04-12 15:34:37 timeout: 0 currentFileSize: 868 fullFileSize:966
    2009-04-12 15:34:38 timeout: 1 currentFileSize: 868 fullFileSize:966
    End of File

    2009-04-12 15:34:38 timeout: 0 currentFileSize: 869 fullFileSize:966
    2009-04-12 15:34:39 Running : touch /tmp/iTiVo-dlmoore/iTiVoDLPipe3.mpg
    2009-04-12 15:34:39 is download complete 2 / 3
    2009-04-12 15:34:39 is download complete 2 / 3
    2009-04-12 15:34:39 Running : touch /tmp/iTiVo-dlmoore/iTiVoDLPipe3.mpg
    2009-04-12 15:34:39 is download complete 2 / 3
    2009-04-12 15:34:39 is download complete 2 / 3
    2009-04-12 15:34:39 perl /Applications/iTiVo.app/Contents/Resources/re-encoder.pl %2FApplications%2FiTiVo%2Eapp%2F %2FVolumes%2FNewertech%5C%20miniStack%5C%20V3%2FMovies%2FTiVo%2F Torchwood%5C%20%2D%5C%20Day%5C%20One.mp4 'turbo.264' 'iPhone' ' ' ' ' >> /tmp/iTiVo-dlmoore/iTiVo.log 2>&1 & echo $! ;exit 0


    osascript /Applications/iTiVo.app//Contents/Resources/Scripts/elgato.scpt /tmp/iTiVo-dlmoore/iTiVoDLPipe2.mpg /Volumes/Newertech\ miniStack\ V3/Movies/TiVo/Torchwood\ -\ Day\ One.mp4 /tmp/iTiVo-dlmoore/iTiVoDL2 iPhone 2>&1

    2009-04-12 15:34:39 mencoder timeout: 0 download:1 timeRemaining: 200 timeOn:0.0 currentPercent: 0
    2009-04-12 15:34:39 mencoder timeout: 1 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 15:34:40 mencoder timeout: 2 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 15:34:41 mencoder timeout: 3 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 15:34:41 mencoder timeout: 4 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 15:34:42 mencoder timeout: 5 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 15:34:42 mencoder timeout: 6 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 15:34:43 mencoder timeout: 7 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 15:34:43 mencoder timeout: 8 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    ... Many skipped lines ...
    2009-04-12 15:47:33 mencoder timeout: 972 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 15:47:34 mencoder timeout: 973 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 15:47:34 mencoder timeout: 974 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 15:47:35 mencoder timeout: 975 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 15:47:35 mencoder timeout: 976 download:1 timeRemaining: 200 timeOn:0 currentPercent: 0
    2009-04-12 15:47:36 Download completed
    2009-04-12 15:47:37 killed :
    2009-04-12 15:47:37 is download complete 2 / 3
    2009-04-12 15:47:39 killed :
    2009-04-12 15:47:39 rm -f /tmp/iTiVo-dlmoore/iTiVoDLPipe* /tmp/iTiVo-dlmoore/iTiVoTDC* /tmp/iTiVo-dlmoore/iTiVoDLMeta*
    2009-04-12 15:47:39 mkfifo /tmp/iTiVo-dlmoore/iTiVoDLPipe ; touch /tmp/iTiVo-dlmoore/iTiVoDLPipe{2,3}.mpg
    2009-04-12 15:47:39 perl /Applications/iTiVo.app/Contents/Resources/http-fetcher.pl 192.168.0.4 1339715 Torchwood 8104017040 /tmp/iTiVo-dlmoore/iTiVoDLPipe >> /tmp/iTiVo-dlmoore/iTiVo.log 2>&1 & echo $! ;exit 0
    curl 'http://192.168.0.4:80/download/Torchwood.TiVo?Container=%2FNowPlaying&id=1339715' -c /tmp/cookies.txt --retry 12 --retry-delay 10 --digest -u tivo:8104017040 -o /tmp/iTiVo-dlmoore/iTiVoDLPipe --stderr /tmp/iTiVo-dlmoore/iTiVoDL
    2009-04-12 15:47:39 perl /Applications/iTiVo.app/Contents/Resources/tivo-decoder.pl %2FApplications%2FiTiVo%2Eapp%2F 8104017040 >> /tmp/iTiVo-dlmoore/iTiVo.log 2>&1 & echo $! ;exit 0
    /Applications/iTiVo.app/Contents/Resources/tivodecode -n -D -m 8104017040 -o /tmp/iTiVo-dlmoore/iTiVoDLPipe2.mpg /tmp/iTiVo-dlmoore/iTiVoDLPipe
    2009-04-12 15:47:39 timeout: 0 currentFileSize: 0 fullFileSize:966
    2009-04-12 15:47:39 timeout: 1 currentFileSize: 0 fullFileSize:966
    Encryption by QUALCOMM ;)

    2009-04-12 15:47:40 timeout: 0 currentFileSize: 2.95639038085938e-05 fullFileSize:966
    2009-04-12 15:47:40 timeout: 1 currentFileSize: 0 fullFileSize:966
    2009-04-12 15:47:41 timeout: 2 currentFileSize: 0 fullFileSize:966
    2009-04-12 15:47:41 timeout: 0 currentFileSize: 0.7509765625 fullFileSize:966
    2009-04-12 15:47:42 timeout: 1 currentFileSize: 0.7509765625 fullFileSize:966
    2009-04-12 15:47:42 timeout: 0 currentFileSize: 1.8271484375 fullFileSize:966
    2009-04-12 15:47:43 timeout: 0 currentFileSize: 2.927734375 fullFileSize:966
    2009-04-12 15:47:44 timeout: 1 currentFileSize: 2.927734375 fullFileSize:966
    2009-04-12 15:47:44 timeout: 0 currentFileSize: 4.0703125 fullFileSize:966

    - Dan
     
  11. Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    Looks like the timeout is happening because the fake progress reporting isn't doing its thing.. let me change up the code a bit...

    try the new beta :)

    (and sorry for the insane frequent updates)
     
  12. danm628

    danm628 Active Member TCF Club

    2,217
    8
    May 14, 2002
    Vancouver, WA
    I appreciate the insane update rate. A lot. iTiVo is a great program and I appreciate the effort you put in to it.

    I'll try the new beta and see what happens. It will be Monday night before you get any updates; I go to work really early.

    Any additional debug info you need? I can always install Xcode on my system and grab the code.

    - Dan
     
  13. Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    I don't think you'd need to install XCode, but if it still breaks I would appreciate if you did the following and tell me what happens:

    1. Download the movie using the 'decrypt' format. Put it on the Desktop as 'movie.mpg'
    2. Open up Terminal.app and run
      Code:
      osascript /Applications/iTiVo.app/Contents/Resources/elgato.scpt ~/Desktop/movie.mpg ~/Desktop/output.mp4 ~/Desktop/log.txt iPhone

    Those are tilde '~' characters, not minus '-' characters in that invocation...

    If I understand how the Elgato works, that should create an mp4 file in your desktop, and leave a log there called log.txt. If stuff is still breaking, can you attach the log.txt file here so I can look at it. I can't 'fake' simulate having the ElGato card, so I'm just going with how I *think* it should be working.. would love to know if it does...

    Also if the script prints out any errors, tell me please...

    And thank you for helping out with this :)
     
  14. danm628

    danm628 Active Member TCF Club

    2,217
    8
    May 14, 2002
    Vancouver, WA
    I just checked it before hitting the sack. iTiVo was redownloading the file and Elgato was finishing up the decrypt. I've started a download of a decrypted file, I'll run the applescript once it finishes.

    - Dan
     
  15. Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    Also, the script shouldn't 'finish' (return you to the shell prompt) until the encode finishes.. please tell me if the script seems to finish early...
     
  16. danm628

    danm628 Active Member TCF Club

    2,217
    8
    May 14, 2002
    Vancouver, WA
    Just got home and ran some tests with a few different shows (480i 30 and 60 minute shows, 3 hour 1080i show and a SD analog show off cable). The 480i and SD analog shows worked fine.

    The 1080i show produced this error: /Applications/iTiVo.app/Contents/Resources/Scripts/elgato.scpt: execution error: Turbo.264 HD got an error: An error of type -208 has occurred. (-208)

    Just to be sure, I dragged the 1080i file to the Elgato application and manually did a convert to iPhone format. That worked fine.

    If the Elgato Turbo.264 HD has already been started (i.e. application is sitting idle) when the script is started then it runs correctly with no error messages printed. When the script finishes Turbo.264 HD exits.

    If the Elgato application has not already been started then the script prints:
    /Applications/iTiVo.app/Contents/Resources/Scripts/elgato.scpt: execution error: Turbo.264 HD got an error: Can’t get isEncoding. (-1728)
    and exits. The Turbo.264 HD application does start, roughly at the same time the script exits. Running the script again at this point works.

    The log file for the short run has this:
    Monday, April 13, 2009 4:50:28 PM : Starting ElGato
    0 -1 300 0
    11 -1 300 0
    21 -1 300 0
    31 -1 300 0
    41 -1 300 0
    51 -1 300 0
    61 -1 300 0
    71 -1 300 0
    81 -1 300 0
    91 -1 300 0
    101 -1 300 0
    111 -1 300 0
    121 -1 300 0
    131 -1 300 0
    141 -1 300 0
    151 -1 300 0
    161 -1 300 0
    171 -1 300 0
    181 -1 300 0
    191 -1 300 0
    201 -1 300 0
    211 -1 300 0
    221 -1 300 0
    231 -1 300 0
    241 -1 300 0
    251 -1 300 0
    261 -1 300 0
    271 -1 300 0
    281 -1 300 0
    291 -1 300 0
    301 -1 300 0
    311 -1 300 0
    321 -1 300 0
    332 -1 300 0
    342 -1 300 0
    352 -1 300 0
    362 -1 300 0
    372 -1 300 0
    382 -1 300 0
    392 -1 300 0
    402 -1 300 0
    412 -1 300 0
    422 -1 300 0
    432 -1 300 0
    432 100 0

    The long run just has more lines and counts higher.

    - Dan
     
  17. Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    First of all.. Thank you thank you thank you!!
    That's a REALLY helpful bug report :).. I actually have a bunch of useful info to work with now.

    I'll see what I can make out of this. It definitely looks like multiple bugs converging.. I'll see what I can do to fix them all (although I should point out that given the ElGato documentation, this may not be too easy).
     
  18. Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    Ok I'm gonna try launching the application first, then waiting 5 seconds before handing it a file to process. Hopefully that should get rid of the errors you are seeing..
    ( It wasn't clear to me if the error -208 also went away if elgato is running? )

    I also better parse the elgato output to deal with errors from the encoder (don't think there are any here.. but at least I know what to do now).

    Can you check out the *new* beta and tell me if it finally does the right thing?
     
  19. danm628

    danm628 Active Member TCF Club

    2,217
    8
    May 14, 2002
    Vancouver, WA
    After some additional testing I think the -208 error was due to operator error. I can't duplicate it. (Guess -- did I remember to rename the test file to movie.mpg before hitting return? Not sure. Will retest later to be sure.)

    The new beta solves the Elgato startup problem. I can run the script and it correctly starts Turbo.264 HD, requests the encode and waits for the encode to complete. I've only done a full test with one of the 480i videos, it only takes a few minutes. I didn't let the 1080i encode finish, it takes longer and I wanted to test a full download, encode, import to iTunes cycle.

    I did a quick test of the download and encode of the 480i video (since it is still on the TiVo). Download finished, Turbo.264 started, encoded video, finished. And then the download started again.

    - Dan
     
  20. Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    Ok so now we're done to just making sure iTiVo thinks the download was successful and not a failure.. One more bugfix.. looking into it.
     

Share This Page