aldofle / media-translate

Automatically exported from code.google.com/p/media-translate
0 stars 0 forks source link

some Youtube videos do not work #66

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. open www.youtube.com/watch?v=mb22gVX3Sdw on your browser it plays
2. open it with Media Translate in media player and "cannot play media file" is 
displayed
3. using latest 2.0.10 version

What is the expected output? What do you see instead?
Play Video

What version of the product are you using? On what operating system?
2.0.10

Please provide any additional information below.
using a Diyomate s9 

Original issue reported on code.google.com by shan...@gmail.com on 20 Dec 2011 at 2:38

GoogleCodeExporter commented 9 years ago
this also happens on http://www.youtube.com/watch?v=JaFVr_cJJIY and a few other 
"Movies" on youtube

Original comment by shan...@gmail.com on 20 Dec 2011 at 2:39

GoogleCodeExporter commented 9 years ago
Some hints for solution:

http://www.youtube.com/watch?v=JaFVr_cJJIY

1. To play, it needs to be logged-in google/youtube as valid user.
Maybe this already works by Sergey's user YT menu interface (someone to test it 
please) or it could be find a workaround on that direction.

2. By "forcely" replacing of original URL with this newly supported format, it 
seems to play without login:

http://www.youtube.com/embed/JaFVr_cJJIY

The trick could be done by plugin modification.

Original comment by lorolo...@gmail.com on 20 Dec 2011 at 7:42

GoogleCodeExporter commented 9 years ago
That is exactly true, and it does not work in media translate even with a user 
in the YT interface, because it does not log in the user, it just fetches the 
users RSS feeds. but that sounds like a workaround, now lets hope Sergey kindly 
fixes it :) 

Original comment by shan...@gmail.com on 20 Dec 2011 at 7:48

GoogleCodeExporter commented 9 years ago
I think, I found a solution, but again I couldn check it immediatelly :)
Here you go:
In translate.cgi, replace the line:

USERAGENT="Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.2.13) 
Gecko/20101203 Firefox/3.6.13"

with this one:
USERAGENT="Mozilla/5.0 (compatible; Googlebot/2.1; 
+http://www.google.com/bot.html)"

and let me know if that works.

Thanks

Original comment by lorolo...@gmail.com on 22 Dec 2011 at 4:17

GoogleCodeExporter commented 9 years ago
In case it works, the more elegant solution is to temporary change the user 
agent in youtube plugin only if "verify_age" appears in URL, see how the people 
are doing this in javascript (the source where I found all this stuff):
http://userscripts.org/scripts/review/94184

Original comment by lorolo...@gmail.com on 22 Dec 2011 at 4:43

GoogleCodeExporter commented 9 years ago
It works! :D, and yeah a more elegant solution could be the use of the 
Javascript, but on the other hand if it doesn't change anything else, why can't 
we just leave it with the new settings ? :) 

great job on finding a solution! :) 

Original comment by shan...@gmail.com on 22 Dec 2011 at 5:16

GoogleCodeExporter commented 9 years ago
Nevermind I found out why it wouldn't work for all, we need to find a way to 
only change the useragent for youtube url :) 

Original comment by shan...@gmail.com on 22 Dec 2011 at 5:20

GoogleCodeExporter commented 9 years ago
Check attached 

Original comment by lorolo...@gmail.com on 22 Dec 2011 at 5:27

Attachments:

GoogleCodeExporter commented 9 years ago
heheh I was just going to say I found a solution

     USERAGENT="Mozilla/5.0 (compatible; Googlebot/2.1;  +http://www.google.com/bot.html)"  
      host_response=`$MSDL -q -o ${TMPFILE} -p http --useragent "${USERAGENT}" http://www.youtube.com/watch?v=$video_id 2>&1`
      USERAGENT="Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13"   

Original comment by shan...@gmail.com on 22 Dec 2011 at 5:28

GoogleCodeExporter commented 9 years ago
but yours is more elegant ;) 

Original comment by shan...@gmail.com on 22 Dec 2011 at 5:29

GoogleCodeExporter commented 9 years ago
fixed r601

Original comment by Serge.A.Timchenko@gmail.com on 29 Dec 2011 at 8:52