#62 Apple Trailers - working config but problem playing trailers

pre 0.12 SVN
closed-fixed
Jin
General (19)
1
2010-01-16
2010-01-16
Mr. Healer
No

This belongs to mediatomb 0.12, Revision 2055 from SVN.

(I'm a newbie and checked the forums about this issue. I found no solution for that. So if this is already fixed or explained somewhere else I apologize to putting in this bug report.)

I have a config.xml like escribed in http://juliensimon.blogspot.com/2008/12/mediatomb-012-on-ps3-video-thumbnails.html

I can see "Apple Trailers" section in the "Online Serives" fine. Both on my PS3 and in any WebBrowser. When choosing a trailer, the PS displays an error about invalid content, Same in my browser (e. g. FF) I'm linked to a survey side at apple.com, but the trailer isn't playing.

After a little research I found out, that the RSS feed that is curl'ed wih mediatomb is linked to URLs like http://images.apple.com/... or http://movies.apple.com/...

It seems, that this is no longer working. To play the trailers URLs beginning with http://www.apple.com/... are needed. Maybe this needs to be fixed/coded in ./srv/atrailers_service.cc.

I'm using a workaround like this for now and it works great, both in my PS3 and in the FireFox browser:

in ./src/atrailers_service.cc I commented the URLs and added URLs on my local webserver (my IP in this case is 192.168.0.1)

//#define ATRAILERS_SERVICE_URL_640 "http://www.apple.com/trailers/home/xml/current.xml"
//#define ATRAILERS_SERVICE_URL_720P "http://www.apple.com/trailers/home/xml/current_720p.xml"
#define ATRAILERS_SERVICE_URL_640 "http://192.168.0.1/current.xml"
#define ATRAILERS_SERVICE_URL_720P "http://192.168.0.1/current_720p.xml"

I fetch the RSS feeds an change every occourance of images.www.apple.com and movies.apple.com to www.apple.com with a shell script like this one:

<pre>
#!/bin/sh

AT_DWNL_PATH_=/tmp/
AT_RSS_=current
AT_RSS720_=current_720p
AT_EXT_=.xml
AT_LWWW_PATH_=/srv/www/htdocs/

wget -q http://www.apple.com/trailers/home/xml/$AT_RSS_$AT_EXT_ -O $AT_DWNL_PATH_$AT_RSS_.1$AT_EXT_
wget -q http://www.apple.com/trailers/home/xml/$AT_RSS720_$AT_EXT_ -O $AT_DWNL_PATH_$AT_RSS720_.1$AT_EXT_

sed 's/movies.apple.com/www.apple.com/g' $AT_DWNL_PATH_$AT_RSS_.1$AT_EXT_ > $AT_DWNL_PATH_$AT_RSS_.2$AT_EXT_
sed 's/images.apple.com/www.apple.com/g' $AT_DWNL_PATH_$AT_RSS_.2$AT_EXT_ > $AT_LWWW_PATH_$AT_RSS_$AT_EXT_

sed 's/movies.apple.com/www.apple.com/g' $AT_DWNL_PATH_$AT_RSS720_.1$AT_EXT_ > $AT_DWNL_PATH_$AT_RSS720_.2$AT_EXT_
sed 's/images.apple.com/www.apple.com/g' $AT_DWNL_PATH_$AT_RSS720_.2$AT_EXT_ > $AT_LWWW_PATH_$AT_RSS720_$AT_EXT_

rm $AT_DWNL_PATH_$AT_RSS_*$AT_EXT_

</pre>

That's all!

Discussion

  • Jin

    Jin - 2010-01-16

    Read the answer here:
    http://www.linuxjournal.com/content/tech-tip-view-apple-movie-trailers-firefox-linux

    Most important quote:
    "A few months ago Apple updated their movie trailers site. This update restricts the viewing of Apple Trailers on non-approved systems."

    Basically, if these bastards do not like your user agent - they will not feed you the URL. I tested it with wget:
    wget -U "QuickTime/7.6.2 (qtver=7.6.2;os=Windows NT 5.1Service Pack 3)" http://movies.apple.com/movies/independent/44inchchest/44inchchest_h640w.mov
    will give you the movie, while omitting -U will give you the index.html

    But your finding is very interesting, at least it seems that they forgot to or decided not to use that hack when www.apple.com is used.

    For now I will simply update the URL, but I guess for the future we will have to proxy the movies through the server and fake the user agent.

    Thanks for your investigation.

     
  • Jin

    Jin - 2010-01-16
    • status: open --> open-accepted
     
  • Mr. Healer

    Mr. Healer - 2010-01-16

    Thank you for the link to linuxjournal, I didn't had it. They describe the same soution, changing vrom images/moviews to www. apple.com will give you access to the most files.

    As I saw, curl can also send a user-agent string, but this won't solve the problem - right? curl is only used in atrailser_service.cc to get the xml feeds, not the trailer itself?

    So what do you mean with "For nor I will simply update the URL" - something like the sed commands I posted or something in the code that will replace to www. in the xml file itself.

     
  • Jin

    Jin - 2010-01-16

    Yes, if we had to fake the user agent we would have to proxy the video streams, so that the player gets them from us, like it is done with YouTube now.

    Please try rev 2056, I do the URL hack as you suggested now and it seems to work. Don't forget to update/reimport the online content so the links get updated in the database.

     
  • Jin

    Jin - 2010-01-16
    • priority: 5 --> 1
    • status: open-accepted --> open-fixed
     
  • Mr. Healer

    Mr. Healer - 2010-01-16

    Yeah, Rev. 2056 works in my system and PS3 too. No need for the script and the fake with my local www-server anymore. I tested a few movies like I did with the script. The results are all the same. Most of the trailers are working, some like S.. and the C... 2 don't (German PS3 error message: "Daten sind defekt" = invalid data) still don't work, but I think this has a different reason.

    Thanks!

     
  • Mr. Healer

    Mr. Healer - 2010-01-16
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks