As most know by now, YouTube (actually google's video servers) supply the iPod Touch and iPhone with videos in h.264 (MP4) format. I've been looking over the traffic between my iPT and Google using Wireshark and see that you can actually get ahold of the MP4 files directly from links supplied by Google. I've been downloading them for a while now, but my current method involves logging the iPT with a squid proxy and having a perl script parse the logs and present the user with links to the videos. What I really want is a method to search for and access the videos from the computer and cut the iPT out of the loop. Afterwards, I want to sync up the videos using iTunes. I know already that iTunes treats these videos just like any other MP4 file and will readily sync them with my iPT. YouTube.app uses Google's GData API for accessing YouTube videos. Google will not send out the links to the MP4's unless the device properly authenticates itself. The iPT does this when you perform a "search". When the search is performed, it passes over the GET request, user-agent, and a GoogleAuthentication login followed by a 180+ character string. This string appears unique to each device, we have two iPTs here and the key is different on both. If the key is accepted, an XML file is sent over with search results and links to the MP4's of the search results. If it is not accepted, it sends over a partially blank page or the regular RSS feed for that search with links to the FLV files. So it appears Google wants to restrict access to the MP4s to Apple devices only. I'm mainly interested in where this authentication key is kept, and if it can be found on the host system - such as in iTunes. I'll be posting later tonight with some packet dumps showing the exchanges and some of my discoveries.