PDA

View Full Version : Auto import to S1 from Youtube



shox
07-28-2006, 01:08 AM
I had a thought to build a system to automatically import YouTube videos into my S1 T60 DirecTivo. I figure here are a few things needed for this:

GreaseMonkey YouTube video download script:
http://www.joshkinberg.com/blog/archives/2005/11/greased_google.php

MFS_FTP on the Tivo itsef

Something to convert the downloaded YouTube video to the proper format for insertion.

Has anyone accomplished this? It would be ideal to have a "Send to Tivo" button right on the web page. Click and off it goes right into Now Playing.

drez
07-28-2006, 04:18 AM
Well I don't have a one click solution for you but this is pretty easy.


I found this Firefox extension called DownloaderHelper (https://addons.mozilla.org/firefox/3006/) that will save the .flv (flash video) very easily.

I remembered from the regular ffmpeg documentaion that ffmpeg supported FLV so I did a test to see if bcc's ty-ffmpeg (which btw is the best tivo development since tivoserver) (http://www.dealdatabase.com/forum/showthread.php?p=258392#post258392) kept the FLV support.

I was plesently surprised to find out that it did.

hint: download ffmpeg-1.4-win.rar and Cygwin.rar and extract both into the same folder.


After a few test conversions (ended up having to force 4:3, audio frequency,etc)... I settled on this line for my S2:


ffmpeg -i "video.flv" -vcodec mpeg2video -b 3000 -aspect 4:3 -acodec mp2 -ar 44100 -ac 2 -ab 192 "video.ty"


this line should work for your S1:


ffmpeg -i "video.flv" -vcodec mpeg2video -b 3000 -aspect 4:3 -s 720x480 -r 29.97 -acodec mp2 -ar 32000 -ac 2 -ab 192 "video.ty"






I uploaded a .ty from a video from google & one from youtube... they both worked.

intresting posts for you to read:
http://dealdatabase.com/forum/showthread.php?p=260529#post260529
http://www.dealdatabase.com/forum/showthread.php?p=260490#post260490
http://dealdatabase.com/forum/showthread.php?p=259563#post259563
http://dealdatabase.com/forum/showthread.php?p=259860#post259860

if you really want a oneclick, make a .bat based on rbautch's .bat that will upload with ncftpput (last link) after the flv is converted. Then figure out how to make greasemonkey run the .bat.



I'll have to push my couch farther away from the TV to enjoy all these TV shows :P ... thanks for the idea.

ciper
07-28-2006, 07:52 AM
How about a script that uses wget to grab the page then grep + cut for the filename and pass this back to wget to download the file. Once the file is finished pass the local filename to ffmpeg for transcoding. The output of ffmpeg can be passed to a scripted ftp session connecting to mfs_ftp.

All you would need to do is supply the initial url of the page to this script and the show would end up on your tivo eventually.
When you upload a show to mfs_ftp how do you get it to show up in the NPL?

(if you cant tell Im in a scripting sort of mood)

shox
07-29-2006, 01:46 AM
That's great info Drez - thanks. I'm in the process of trying to patch ffmpeg since the v1.4 patch fails a few hunks. Looks like something in the source tree changed recently that breaks the diff.

At any rate, when I get it working I'll upload an OSX binary of ffmpeg. I will also look at batching with ncftput. If that works, Greasemonkey is the easy last step since the other guy already created a script to save off the FLV files.

This will really impress my geek friends - especially with a S1 DirecTivo box that is 5 years old :)