
==========================================================
Youtube parser doc, in case youtube changes responses again
==========================================================

A) put feed.pl and youvid.pl in the directory 
   /home/<mythuser>/.mythtv/mythstream/parsers/youtube
B) add a mythstream stream item with
   url: http://youtube.com/rss/global/top_viewed_today.rss
   parser: youtube/feed

Steps used by this parser to get the video flv file:

1. Youtube best viewed rss feed is accessed:
 http://youtube.com/rss/global/top_viewed_today.rss

2. in every item node there is a link child node:
 <link>http://youtube.com/?v=qkq0w6ua_Sg</link>

3. in the "link" html source there is text like:
  video_id:'xxxxxxxx'&l='yyy'&t='zzzzzzzzzzzz'

4. Then the video url is constructed: 
  http://www.youtube.com/get_video?video_id=xxxxxxxxx&t=zzzzzzzzzzzzzzzzzzzzzz

5. This url will return a http 30x to a flv file
  http://youtubexxxxnet/xxxx/xxxx/xxxx/xxxxx.flv

For old mplayer (2006):
	- mplayer crashes while opening the step 4 url, mythstream parser takes over
	- mythstream parses the url in step 4 and silently follows the 30x to the flv
	- mythstream will (obviously) not find a playable url in that flv file
	- the video play attempt fails

	Reolution: use the STREAM_DL handler (download and play stream item in GUI) in youvid.pl
	This works, but it's a nasty hack. Problem is the dynamic nature of the urls, causing
	Mythstream to download a new copy of the flv file every time the rss feed is refreshed
	and the video is accessed.

	A solution: let the mythstream parser (harvester.cpp) return the 30x destination 
	URL - instead of following it silently. This however can break other url's, 
	and frankly, mplayer should be able to handle http 30x properly. 

For mplayer versions before 19 aug 2007:
	- 30x is handled correctly
	- mplayer stops playing after 0 sec due to seek error

	Resolution:
	1) use the STREAM_DL handler (download and play stream item in GUI) in youvid.pl
	2) upgrade mplayer svn > 19 aug 2007

