johnymarek / media-translate

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

Several Youtube Videos do not play #76

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Open a youtube video (like this http://www.youtube.com/watch?v=aJpLXhwf-Lo)
2. it will not play
3. get error "cannot play media file" 

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.
this started to happen some time ago, but it only happens on certain videos, 
others play fine, can't seem to find why

Original issue reported on code.google.com by shan...@gmail.com on 7 May 2012 at 5:36

GoogleCodeExporter commented 8 years ago
The same happens to me with 2.0.9.
Today the wituation is even worst, it seems that no one video can be played.
Need to update plugins?

Original comment by acevol...@gmail.com on 12 May 2012 at 9:00

GoogleCodeExporter commented 8 years ago
all videos from youtube cannot be played since a few days ago. 
From console noticed that download seemed to be successful, but showed message 
"video_load error" at the end when the process stopped.

Original comment by uyn...@gmail.com on 16 May 2012 at 3:03

GoogleCodeExporter commented 8 years ago
I have the same youtube problem with version 2.0.10

Original comment by SergioLu...@gmail.com on 17 May 2012 at 11:36

GoogleCodeExporter commented 8 years ago
I think Youtube did some changes again to how they deliver videos :( a plugin 
change is required, I hope Serge has the time to fix it, in the meantime I will 
see if I can find how to fix it in the plugins.

Original comment by shan...@gmail.com on 17 May 2012 at 11:38

GoogleCodeExporter commented 8 years ago
for reference purposes, while youtube has failed playing videos recently, other 
modules in the media translate system seem to work fine so far.

Original comment by uyn...@gmail.com on 18 May 2012 at 3:19

GoogleCodeExporter commented 8 years ago
yeah, the media translate works perfectly fine, its just that youtube changed 
how they deliver videos yet again

Original comment by shan...@gmail.com on 18 May 2012 at 3:20

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Did you try with low quality configuration for Youtube ? (RssEX settings menu)
YT seem to change/add more "itag=" format numbers.

The plugin supports only 22(HD) and 18(LD) 
Now, other formats are introduced so 22 and/or 18 may be missing.
We need smarter management.

// 2012.03.27 list of video formats
// fmt=5    240p          vq=small       flv  mp3
// fmt=18   360p          vq=medium      mp4  aac
// fmt=34   360p          vq=medium      flv  aac
// fmt=43   360p          vq=medium      vp8  vorbis
// fmt=35   480p          vq=large       flv  aac
// fmt=44   480p          vq=large       vp8  vorbis
// fmt=22   720p          vq=hd720       mp4  aac
// fmt=45   720p          vq=hd720       vp8  vorbis
// fmt=37  1080p          vq=hd1080      mp4  aac
// fmt=46  1080p          vq=hd1080      vp8  vorbis

But the problem could be more serious. I will check tonight.

Original comment by lorolo...@gmail.com on 18 May 2012 at 7:29

GoogleCodeExporter commented 8 years ago
I tried it something yesterday and I ended up doing something with PHP I can 
get the video format, but I cannot make it play at all on my player :S so I am 
hoping is not something more serious

Original comment by shan...@gmail.com on 18 May 2012 at 9:49

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
vb6ro.cod@gmail.com you think you can paste the complete changes ? I cannot 
make it work even with wget :S 

Original comment by shan...@gmail.com on 21 May 2012 at 9:04

GoogleCodeExporter commented 8 years ago
The problem is this:

Starting with  March of 2012 Youtube now expects to see the result of the 
cookie when downloading vids. Even though the URL ia correct if cookies are not 
kept and an error "403 Forbidden" ia received. The download prog "msdl" from 
media-translate needs support for saving and loading cookies.   

Original comment by matyas.m...@gmail.com on 23 May 2012 at 3:07

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
#13 actually, you might be right, I just tried it again and I get this

Connecting to o-o.preferred.uninet-qro1.v18.lscache8.c.youtube.com 
(189.254.88.13:80)
Connecting to v18.nonxt8.c.youtube.com (173.194.26.241:80)
wget: server returned error: HTTP/1.1 403 Forbidden

weird thing is that I tried it yesterday  and it was working...

Original comment by shan...@gmail.com on 23 May 2012 at 4:03

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
#16, no, it does not seem to work... I think #13 is right to say that its 
looking for "cookies" :( 

Original comment by shan...@gmail.com on 24 May 2012 at 12:03

GoogleCodeExporter commented 8 years ago
For your information, following #16, it does not seem to work for Youtube,
neither does it seem to work for the shoutcast modules after the suggested
changes.

Original comment by uyn...@gmail.com on 24 May 2012 at 7:19

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Doesn't work, vb6ro.cod... a blank error message shows up when trying to view a 
video...
The quotes in:
      movie = "http://127.0.0.1/cgi-bin/scripts/util/youtube.cgi?stream,, + url;
Do not need to be closed somewhere?

Original comment by pcmar...@gmail.com on 25 May 2012 at 5:25

GoogleCodeExporter commented 8 years ago
yes, they should be

    movie = "http://127.0.0.1/cgi-bin/scripts/util/youtube.cgi?stream,," + url;

and it does work :) 

Thanks a lot vb6ro.cod! :D

Original comment by shan...@gmail.com on 25 May 2012 at 5:50

GoogleCodeExporter commented 8 years ago
hmmm the quotes get deleted, but just close them after stream,, and before the 
+ 

Original comment by shan...@gmail.com on 25 May 2012 at 5:56

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I supposed quotes go there, but it still doesn't work to me. Just to verify I'm 
doing things right: where should I put youtube.cgi?
I'm using /var/www/cgi-bin/scripts/util/youtube.cgi
Sorry for being such a Linux newbie :)

Original comment by pcmar...@gmail.com on 26 May 2012 at 4:00

GoogleCodeExporter commented 8 years ago
yo should put it anywhere you want, make sure it has the right permissions 
(execute) but make sure to point to it on the RSS, FYI this method does not 
work all the time :S it seems it works on some videos and not on others, also 
it only works for HD videos, if you set it to lq (hdc=0) it will fail, but its 
better than nothing.

Original comment by shan...@gmail.com on 26 May 2012 at 5:36

GoogleCodeExporter commented 8 years ago
I'm sure the script is on the proper place. If I get into 
http://playeraddress/cgi-bin/scripts/util/youtube.cgi I get a 500 error, and 
not a 404. I assume this is OK for the RSS to find it. It does have execute 
permissions as well. No videos play to me, either low or HQ.
Where or how can I get some debug information to see what the F is happening??

Original comment by pcmar...@gmail.com on 26 May 2012 at 6:51

GoogleCodeExporter commented 8 years ago
I have also been trying out the changes as suggested by vb6ro.cod
Apart from the youtube.cgi, and the double quote, I 've also modified the 
following by adding awk in the respective folder.
---
AWK=awk
[ -x /usr/local/etc/translate/bin/awk ] && AWK=/usr/local/etc/translate/bin/awk
---

And in the yt_entry.rss, direct the wget to the respective folder as well:
---
EOF
#exec wget -q -O -  "$stream_url" 
exec /opt/bin/wget -q -O -  "$stream_url" 
fi
return $RC_FAIL
-----

Despite these steps, the videos still do not play.

Please help.
regards.

Original comment by uyn...@gmail.com on 1 Jun 2012 at 1:44

GoogleCodeExporter commented 8 years ago
#28, the script should NOT give you an error 500, that probably means the 
script has an error.

#29, to be honest this "fix" only works for some videos and not others, I will 
say its a 50-50 chance. what I have done is a PHP script that will load only my 
subscriptions and then use the script provided by vb6ro but still, it only 
works on some videos and only in HD I have not been able to make it work on LD 
which is what I sometimes prefer unless Serge comes up with a better solution 
to all of this, I am assuming the problem is on Youtube side and not on the 
script

Original comment by shan...@gmail.com on 1 Jun 2012 at 4:07

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
#32 vb6ro

ahh cool! I will try that, as the other solution only works for HD and for some 
videos for me :( have you tried LD and it works? 

where can I download xLiveCZ ? 

Original comment by shan...@gmail.com on 1 Jun 2012 at 5:09

GoogleCodeExporter commented 8 years ago
I found out that my problems were because my system was using the wget included 
in busybox, if I use the standalone wget, it seems to work on all vides and on 
LD too... 

Original comment by shan...@gmail.com on 1 Jun 2012 at 10:01

GoogleCodeExporter commented 8 years ago
nevermind :S still works only sometimes, vb6ro that PHP file you posted is only 
to get the source mp4 file, but how do you play it from PHP ? I tried exec and 
it does not work :( 

Original comment by shan...@gmail.com on 1 Jun 2012 at 10:10

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I got it to work, but its still not perfect... now videos play fine, but it 
crashes if the video is to long... like on this video 
http://www.youtube.com/watch?v=SWFrn_0OwRA

Original comment by shan...@gmail.com on 2 Jun 2012 at 8:00

GoogleCodeExporter commented 8 years ago
Hi Shanti,
you can get to work yutube on the S9?
I use wget, but still gives me 403 Forbidden.

which is the version of your wget ?

Sorry for my English, I speak Spanish.

Sergio
Argentina

Original comment by SergioLu...@gmail.com on 5 Jun 2012 at 3:03

GoogleCodeExporter commented 8 years ago
Sergio, 

Si, si pude, yo tenia el problema del 403 pero era por que utilize el wget que 
viene en el busybox, despues busque un wget con el find / -name wget y encontre 
varios, utilize uno por uno cada de esos poniendo el path completo 
(/opt/bin/wget por ejemplo) y me funciona mejor, aunque aun no del todo.

* english * 

Yes it works, the problem with the 403 for me was that I was using the wget 
that comes embeded in busybox, after I found another wget with find / -name 
wget I used one of those using the complete path, but it doesn't work 100% 
either way.

Original comment by shan...@gmail.com on 5 Jun 2012 at 9:42

GoogleCodeExporter commented 8 years ago
Solution #19 by vb6ro.cod@gmail.com works ALWAYS on my IAMM NTR-83 with a 
little modification.
1) Create youtube.cgi in /usr/local/etc/www with the next code and let it 
executable:

#!/bin/sh
#
#   http://code.google.com/media-translate/
#   Copyright (C) 2010  Serge A. Timchenko
#
#   This program is free software: you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation, either version 3 of the License, or
#   (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program. If not, see <http://www.gnu.org/licenses/>.
#

#
# Translate CGI module
# 'youtube.com' plug-in
#
# version: 2.7 27.01.2012 23:40
#
# http://www.youtube.com/v/JZtcw6GIxTY
# http://www.youtube.com/watch?v=JZtcw6GIxTY
# http://www.youtube.com/movie?v=xO19ipsCxfI
# http://m.youtube.com/watch?gl=RU&client=mv-google&hl=ru&v=V-_YxX94cQ8
# http://www.youtube.com/embed/0v1ijbQocqo
#
# 
http://www.youtube.com/watch?v=v--IqqusnNQ&feature=list_related&playnext=1&list=
AVGxdCwVVULXeKBZbzNyDrXn1k_UU4pSf9
#
# options:
#   HD:[0|1]

#unset RESOLVE_CACHE_ENABLED
TRANSLATE=${TRANSLATE:-/usr/local/etc/translate}

. $TRANSLATE/lib/common

CACHEPATH=${CACHEPATH:-/tmp}
TEMP=${TEMP:-/tmp}

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

TMPFILE=$TEMP/$$.tmp
AWK=awk
[ -x /usr/local/etc/translate/bin/awk ] && AWK=/usr/local/etc/translate/bin/awk
[ ! -d $CACHEPATH ] && CACHEPATH=$TEMP

arg_cmd=`echo "$QUERY_STRING" | awk -F, '{print $1}'`
arg_opt=`echo "$QUERY_STRING" | awk -F, '{print $2}'`
arg_url=`echo "$QUERY_STRING" | awk -F, '{for(i=3; i<NF; i++) printf "%s,", 
$(i); printf "%s", $(NF); }'`

arg_url=`urldecode_s "$arg_url"`
arg_opt=`urldecode_s "$arg_opt"`
if echo "${arg_url}" | grep -qs 
'youtube\.com.*\(/embed/\|/v/\|/watch?\|movie?\).*$'; then

  hdc=1
  local video_id=`echo "$arg_url" | sed -e 's/.*[?&]v=//;s/.*\///;s/&.*//'`
  local CACHEFILE=$CACHEPATH/yt.$video_id
  local USERAGENTG="Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"

  local tsttime=
  local fmt_url_map=

  if [ -z "$fmt_url_map" ]; then
      host_response=`$MSDL -q -o ${TMPFILE} -p http --useragent "${USERAGENTG}" http://www.youtube.com/watch?v=$video_id 2>&1`
      if [ -f ${TMPFILE} ]; then
        fmt_url_map=`grep -i 'url_encoded_fmt_stream_map=' ${TMPFILE} | sed -n '1p'`
        if [ -z "$fmt_url_map" ]; then
            fmt_url_map=`grep -i 'fmt_url_map=' ${TMPFILE} | sed '1p'`
            fmt_url_map=`echo "$fmt_url_map" | unidecode | unescapeXML | $AWK '{match($0, /&fmt_url_map=([^&]*)&/, arr);print arr[1];}' | urldecode`
          else
            fmt_url_map=`echo "$fmt_url_map" | unidecode | unescapeXML | $AWK '{match($0, /&url_encoded_fmt_stream_map=url%3D([^&]*)&/, arr);print arr[1];}' | urldecode | urldecode`
        fi
      fi
  fi

  if [ -n "$fmt_url_map" ]; then
    stream_type='video/mp4'
    stream_url=''
    server_type='youtube'
    protocol='http'
    if echo "$fmt_url_map" | grep -qs ",url="; then
        #22 / HD720
        [ -n "$hdc" ] && stream_url=`echo $fmt_url_map | awk 'BEGIN{RS=",url="} /itag=22/{print $0}' | sed 's/;.*//'`
        #18 / MEDIUM (default)
        [ -z "$stream_url" ] && stream_url=`echo $fmt_url_map | awk 'BEGIN{RS=",url="} /itag=18/{print $0}' | sed 's/;.*//'`
    else
        #22 / HD720
        [ -n "$hdc" ] && stream_url=`echo $fmt_url_map | awk '{match($0,/.*22\|([^,]+),?/,arr);print arr[1]}'`
        #18 / MEDIUM (default)
        [ -z "$stream_url" ] && stream_url=`echo $fmt_url_map | awk '{match($0,/.*18\|([^,]+),?/,arr);print arr[1]}'`
    fi
  fi
cat <<EOF
Content-type: video/mp4

EOF
exec wget -q -O -  "$stream_url"
fi
return $RC_FAIL

2) open yt_search_feed.rss and change:
urlToPlay = translate_base_url+"stream,HD:"+hd+","+urlEncode(url);
to
urlToPlay = 
"http://127.0.0.1/cgi-bin/youtube.cgi?stream,HD:"+hd+","+urlEncode(url);

3) open yt_entry.rss and change:
urlToPlay = translate_base_url+"stream,HD:"+hd+","+urlEncode(url);
to
urlToPlay = 
"http://127.0.0.1/cgi-bin/youtube.cgi?stream,HD:"+hd+","+urlEncode(url);

Just one further comment: some videos does not start at the first time, but 
starts always at the second selection.

Original comment by acevol...@gmail.com on 6 Jun 2012 at 11:05

GoogleCodeExporter commented 8 years ago
... Mmmmm all videos that yesterday worked, now do not work. 

Original comment by acevol...@gmail.com on 6 Jun 2012 at 7:52

GoogleCodeExporter commented 8 years ago
acevol; like I said on my other comments, this fix works sometimes and 
sometimes it does not ;( I can watch videos for hours and then the next hour no 
way to make it work, or even worse the player crashes :( we need a way to debug 
why it happens 

Original comment by shan...@gmail.com on 6 Jun 2012 at 7:57

GoogleCodeExporter commented 8 years ago
I'm referring to the same video link that yesterday worked but today no. Very 
strange 

Original comment by acevol...@gmail.com on 6 Jun 2012 at 8:07

GoogleCodeExporter commented 8 years ago
Yes that also happens to me, it's better than nothing but the fix is not 100% 
solution :-( 

Original comment by shan...@gmail.com on 6 Jun 2012 at 8:13

GoogleCodeExporter commented 8 years ago
Serge.A.Timchenko has been released the official upgrade for youtube.com, but 
still it seems don't work. At least in my system.
Is there anyone this update work?

Original comment by acevol...@gmail.com on 9 Jun 2012 at 5:36

GoogleCodeExporter commented 8 years ago
no, it still doesn't work for me either :( 

Original comment by shan...@gmail.com on 9 Jun 2012 at 6:01

GoogleCodeExporter commented 8 years ago
It is very strange because the link that has been extracted is a link to a mp4 
file, so I suppose it should work.
I mean: when you have the play instruction:
playItemURL(urlToPlay, 0);

urlToPlay is working link to a mp4 file like that:

http://o-o.preferred.wind-trn1.v11.lscache6.c.youtube.com/videoplayback?upn=ZCH_
5dfkF_M&sparams=cp%2Cid%2Cip%2Cipbits%2Citag%2Cratebypass%2Csource%2Cupn%2Cexpir
e&fexp=907003%2C914025%2C912602%2C907217%2C907335%2C921602%2C919306%2C919316%2C9
12804%2C913542%2C919324%2C912706&ms=au&itag=18&ip=151.0.0.0&signature=74F5FD591E
0C8C2815797A30349FC0618E90DB24.ACA26BC82C6C8F498AE5B1B360BCC10096CE12E1&sver=3&m
t=1339222211&ratebypass=yes&source=youtube&expire=1339247129&key=yt1&ipbits=8&cp
=U0hSTlJPVV9HU0NOMl9KSVlCOnY5X19YWnV1QS1W&id=ef285b6981f44b01&quality=medium&fal
lback_host=tc.v11.cache6.c.youtube.com&type=video/mp4

... so why does it not work?

Original comment by acevol...@gmail.com on 9 Jun 2012 at 7:15

GoogleCodeExporter commented 8 years ago
it seems the problem has never been getting the mp4 url, but there is something 
else we are missing, as the fixes previously posted also got the mp4 without a 
problem but it didn't play either, maybe Youtube is uping the security on 
system like ours and not letting you watch videos like that, lets hope not :( 

Original comment by shan...@gmail.com on 9 Jun 2012 at 7:35