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. Dec 4, 2008 #61 of 741
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    Ok, so I had some trouble mapping some of your arguments since afaik they don't apply to h.264, but I believe changing your video options to:

    Code:
    -of lavf -lavfopts format=ipod -ovc x264 -vf scale=320:240,harddup -ofps 30000/1001 -x264encopts threads=4:bitrate=560:level_idc=13:partitions=4x4:subq=4:bframes=0:nocabac:global_header
    I think your 'speed' win on encoding comes from the fact that you're encoding using the simplest of encoding (baseline 1.3) which is fast but not very good. ipods support level 3.0, and quicktime up to level 4.1...

    Also, I notice you're using threads=4, which is only useful on a 4-core or 4-cpu system. I'd switch it to threads=auto and let it pick the right number.

    however, the interesting question: is the speed now comparable?
     
  2. Dec 4, 2008 #62 of 741
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    Awesome. Does it work if you set the resolution back to 1280x720 ?

    Tell me what options you used, I'll put them into the next beta...
     
  3. Dec 4, 2008 #63 of 741
    fatespawn

    fatespawn New Member

    139
    0
    Oct 14, 2007
    Chicagoish, IL
    This may a bit OT, but I thought I'd provide some comparison numbers. I encoded a 30min SD program last night with VisualHub. I have 3 mac's. Here were my results.

    Powerbook G4 1.5Ghz 177 minutes
    Dual G5 2.0 Ghz Powermac 57 minutes
    iMac 2.4 Ghz intel Core Duo 21 minutes

    The output file was an h264 640x480 file at about 1100kbps

    So, your 7 hours with a 1.42 Ghz G4 processor is substantially slower than my 1.5Ghz G4 but it may have to do with your source video and the fact you have 1500kbps selected.

    -fate
     
  4. Dec 4, 2008 #64 of 741
    bohbot16

    bohbot16 New Member

    21
    0
    Sep 21, 2008
    Katonah, NY
    I think the main benefit to handbrake over mencoder is multi-threaded encoding to h.264. It's beneficial to those of us with multi-core (or multiple) processors.

    Ideally for me iTiVo would use comskip then mencoder to produce commercial-free MPEG2, then use handbrake to compress the resulting file to an iTunes-friendly h.264 mp4 file.
     
  5. Dec 4, 2008 #65 of 741
    Fofer

    Fofer XenForo Rocks! TCF Club

    82,147
    307
    Oct 29, 2000
    Yeah, that'd be super cool.
     
  6. Dec 4, 2008 #66 of 741
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    mencoder uses the same libx264 to encode, and therefore also supports multi-threading (that's what threads=auto does in the arguments list). HOWEVER, I believe handbrake will also multi-thread the de-interlace, which mencoder doesn't do (not sure how much of an improvement that leads to).

    I believe if I cut out commercials with mencoder (with no re-encoding), and then encode with handbrake, there will be an audio/video sync problem.. but I guess I might as well try it before assuming anything :)
     
  7. Dec 4, 2008 #67 of 741
    kas25

    kas25 New Member

    411
    0
    Mar 10, 2003
    NJ
    I am not having any luck with either Apple TV preset on my Tivo S 3. It seems to keep restarting itself. Is everyone else having success?
     
  8. Dec 4, 2008 #68 of 741
    AudioNutz

    AudioNutz New Member

    318
    0
    Nov 9, 2008
    I'm glad I'm not the only one that wants this as a feature. I really like having the option of saving the non-encoded file to go back to my TiVo, and then also having the file ready for my iPod if I happen to be traveling that week.

    ALSO... Has anyone given any thought to XGrid capabilities? Wouldn't it be nice (for those of us with multiple computers) to have iTiVo pass some of the processing tasks to other CPUs on the local LAN for processing simultaneously. (Can you tell I've been a VisualHub user? It has these capabilities)
     
  9. Dec 4, 2008 #69 of 741
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    Well, what you're asking for is this:

    select "MPEG2-TS" as your encoder (that will keep the original data from the tivo, but cut out commercials). Then load up handbrake, and encode the result to any other format you like (ipod, whatever).
    (The only extra is you want iTiVo to do that in one step). Every time I've tried it I get massive audio/video sync issues where the cuts happen. Does it work for you?
     
  10. Dec 4, 2008 #70 of 741
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    That will happen if/when mplayer or handbrake add code to support this. As far as I know it's not in their plans though. You may want to contact them and suggest it as an option.
     
  11. Dec 4, 2008 #71 of 741
    kas25

    kas25 New Member

    411
    0
    Mar 10, 2003
    NJ
    To clarify, I just selected a SD 30 minute show and it took about 15 minutes to code but when it said it was about done it started coding again. Does it do multiple passes?
     
  12. Dec 4, 2008 #72 of 741
    AudioNutz

    AudioNutz New Member

    318
    0
    Nov 9, 2008
    I'm trying the new code that you gave me, but it doesn't look good. I've been processing the same 30min show for two hours, and it's less than 1/2 way done.

    If I understand KMTTG correctly, I think that's what it does. (I'm the guy that got KMTTG to work on Macintosh, but I would still prefer to use iTiVo if I can get some of the features/performance to be equal) But I don't think KMTTG it's using "Handbrake", it's using ffmpeg. I'm observing it use mencoder to do the comcut, then save the mpeg file, then feed the cut mpeg file into the ffmpeg for the encode for iPod process.

    BUT... That may not be the most elegant way. What if we put a "Fork" in the iTiVo workflow, that downloaded the show once, decrypted once, then simultaneously did two things:
    1. comcut>encode for iPod (Or whatever your favorite device is)
    2. comcut>encode for mpeg (TiVo)
    Or, you could do them in-line with each other, but I'm just trying to brainstorm about a more elegant way, that would be easy to write. (Maybe comcut once, then encode twice)

    Yes, I think you have an idea of what we're asking for with this request. Like I mention, I think this is what KMTTG does, and it's not perfect, but try it and you tell me if you agree. The only other thing that I would add to this right now is that I would prefer the two files (mp4, mpeg) go to different download locations.

    When speaking about XGrid, you wrote:
    Again, I think it doesn't need to be that exotic in the execution. I think VisualHub simply sends the file over to the other computer, and then gives that computer a command to fire up ffmpeg with a particular argument, and then sends the file back to the output location. The code (mencoder, ffmpeg) still needs to be installed on both Macs, and each of them needs to be aware of the other on the network. (I'm also wondering if ssh commands would be easier than using XGrid to issue these commands) It would be slick if this could happen, especially for a person like me, who has 5 Macs & 4 PeeCees on their home network.

    But, I digress, just file it away in the back of your mind for the next time you have warm thoughts about the folks who enjoy iTiVo. :D


    Which leads me to my next (NEW) question about the existing code: Right now I have an elaborate workflow where I download the show from one of my 2 TiVo's, then decrypt & encode for iPod. This is great, but then I also need to .zip the file, re-name it, and then move it to a different volume of my XServe. I do this because that volume of the XServe is available to the outside world via FTP, and I can pick these shows up when I'm traveling. (My company does not allow me to share out to AFP or SMB points when I'm at my office, so I use FTP protocol)

    My question is this: I see the "Run when Download completes" feature in the Advanced tab of the preferences. What is this feature meant for? Can I execute a terminal command that .zips the file, then moves it? Maybe I can use it to execute an Automator action, or execute an AppleScript?

    I looked in the documentation, but I don't think I see the intent of this feature. (Maybe I ask too much?)
     
  13. Dec 5, 2008 #73 of 741
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    Yeah not really documented, but it's a valid use of 'run when'. If you mouseover it will tell you what variables are supported, and then it simply runs whatever command you specify in a shell after the download/add to itunes finishes. Just make sure to put the variables in quotes since a lot of show names have spaces in them.

    So for example, if you put in something like
    tar -czf /tmp/output.tgz "$file" ; scp /tmp/output.tgz john@otherhost:/tmp/

    it *should* do what you want. Feature is not really tested/debugged yet though...
     
  14. Dec 5, 2008 #74 of 741
    fatespawn

    fatespawn New Member

    139
    0
    Oct 14, 2007
    Chicagoish, IL
    Yoav,

    Any luck finding your divide by zero error? I have a G5 I'm using and would like to test it out. My intel iMac works like a champ..... but that's my wife's computer and she gets testy when I start lurking over in her corner.
     
  15. Dec 5, 2008 #75 of 741
    AudioNutz

    AudioNutz New Member

    318
    0
    Nov 9, 2008
    Ha! Another argument for grid-based processing... She wouldn't even need to know you're borrowing her processing power... :D
     
  16. Dec 5, 2008 #76 of 741
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    Nothing yet. The place I thought it was happening seems to not be 'it'.

    It 'looks' like it's happening right when it's doing the math to figure out how much space is available on your tivo, but nowhere there can I find a zero to divide by :(. So still working on it.
     
  17. Dec 5, 2008 #77 of 741
    AudioNutz

    AudioNutz New Member

    318
    0
    Nov 9, 2008
    I did some further testing today with this argument. It took us from 5+ hrs down to 2hrs. It's still not the 20 minutes that ffmpeg is doing, but it's better.
     
  18. Dec 5, 2008 #78 of 741
    hdfatboy2003@mac

    hdfatboy2003@mac New Member

    27
    0
    Nov 10, 2008
    Memcoder is outputting the fps in native 59.96fps which the AppleTV can't handle. 24fps is slightly choppy, so I upped it to 30fps. It works for both 1080i and 720p sources. I changed the encoder video options to the below and all is happy now.

    -of lavf -ofps 30 -lavfopts format=mp4 -ovc x264 -x264encopts nocabac:level_idc=30:bitrate=2000:threads=auto:bframes=0:global_header -vf pp=lb,dsize=960:540:0,scale=-8:-8,harddup
     
  19. Dec 5, 2008 #79 of 741
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    Ok beta 4 is up
    changes are to allow you to use 'mencoder' to cut up the show, and then 'handbrake' to re-encode it (to remove commercials and encode with handbrake).

    I also threw in a few more catches to try and see if I can figure out where the divide by zero is happening on 10.4, so if anyone with 10.4 can try it out and tell me if it's still happening -- and send me the debug log when it does -- I'd appreciate it.
     
  20. Dec 5, 2008 #80 of 741
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    Woot.. Thank you so much!

    Will put the change in (just released a beta so missed that one). It should make it into the next beta..
     

Share This Page