Networked Media Tank
[Apple Trailers] Could this be a way for trailers to work once again? - Printable Version

+- Networked Media Tank (http://www.networkedmediatank.com)
+-- Forum: Community Jukebox, Themes, & UserApps Section (/forumdisplay.php?fid=106)
+--- Forum: YAMJ - Yet another Movie Jukebox (/forumdisplay.php?fid=70)
+--- Thread: [Apple Trailers] Could this be a way for trailers to work once again? (/showthread.php?tid=59961)

Pages: 1 2


[Apple Trailers] Could this be a way for trailers to work once again? - cableguy711 - 03-11-2012 08:54 PM

http://blog.hd-trailers.net/tutorials/how-to-download-hd-trailers-from-apple/

I came across this link with how to change the USER AGENT STRING to say that Quicktime is requesting the download. This works in any webbrowser. Is there a way to make YAMJ tell apple its Quicktime when requesting the download of the file?
I'm not a programer so I dont know, but could this be implemented into YAMJ with a plugin?


RE: [Apple Trailers] Could this be a way for trailers to work once again? - Omertron - 03-12-2012 08:53 AM

Look at the date on the post... 2007


RE: [Apple Trailers] Could this be a way for trailers to work once again? - accident - 03-12-2012 04:03 PM

Also apple is a little dyamic in this area.. just randomly it seems a different method will work.. So to fix first that method needs to be happening and you need to be fast enough at finding and fixing it before it changes.. Also the layout of the website to get the trailer link out of it changes all the time. It might just be for 1 new title that's a paid ad for a couple weeks and then it changes again. There's so many variations someone could spend a full time job just working on finding trailers at apple.

There's just really no good spot to get trailers reliably on the internet, at least in english.


RE: [Apple Trailers] Could this be a way for trailers to work once again? - Pernod - 03-12-2012 04:44 PM

SwissCenter has been scraping and streaming the trailers without issue for a few years now. I think the only change I had over the years is when they moved to the trailers subdomain.

The Apple site is actually powered by JSON feeds to get the listings, then follow the 'location' in the feeds to scrape the trailer page for the trailer url's.

http://trailers.apple.com/trailers/home/feeds/just_added.json
http://trailers.apple.com/trailers/home/feeds/exclusive.json
http://trailers.apple.com/trailers/home/feeds/just_hd.json
http://trailers.apple.com/trailers/home/feeds/most_pop.json
http://trailers.apple.com/trailers/home/feeds/genres.json
http://trailers.apple.com/trailers/home/feeds/studios.json

http://trailers.apple.com/trailers/home/scripts/quickfind.php?callback=searchCallback&q=MOVIENAME


RE: [Apple Trailers] Could this be a way for trailers to work once again? - accident - 03-12-2012 04:46 PM

Pernod is norminated to update yamj apple trailer plugin.


RE: [Apple Trailers] Could this be a way for trailers to work once again? - Omertron - 03-12-2012 04:56 PM

Wow, thanks Pernod. Another thing to add to my list of stuff to do.
Although JSON is a breeze to use, so it should be easy to update that.
How do you work out the trailer name from a search?
http://trailers.apple.com/trailers/home/scripts/quickfind.php?callback=searchCallback&q=avatar
I can see that Avatar has 3 trailers, but how do I get to the actual file names?


RE: [Apple Trailers] Could this be a way for trailers to work once again? - Pernod - 03-12-2012 05:26 PM

(03-12-2012 04:46 PM)accident Wrote:  Pernod is norminated to update yamj apple trailer plugin.

Well, Java is not my thing, and I don't use YAMJ. But after looking at the code it is already using the callback method I posted previosuly to do the search. Chances are that it's retrieving the url correctly, if not then probably only minor update required.

The problem is likely the streaming, as we know it requires the Quicktime user-agent.

In SwissCenter I have a PHP streaming script that I use for all internet videos, that allows specifying the user-agent.

ie. stream_url.php?user_agent=QuickTime%2F7.6&url=http%3A%2F%2Ftrailers.apple.com%2F405%2Fus%2Fmedia%2Ftrailers%2Findepend​ent%2Fintruders%2Fintruders-tlr1_h640w.mov&ext=.mov

The script will then connect to the url using the specified user_agent and echo the data to the player. It also handles YouTube videos by first scraping the YouTube video page for the required authentication keys to allow streaming.


RE: [Apple Trailers] Could this be a way for trailers to work once again? - accident - 03-12-2012 05:30 PM

why do you scrape youtube/ there is an api to make apps that use youtube videos.. eversiion uses syabas's version of it to direct stream to the players for youtube url trailers..

Do you have some type of automated find youtube trailers scanner in swisscenter? I would love to see that type of option in yamj also. Maybe tied to a skin property to specify you can play them streamed...


RE: [Apple Trailers] Could this be a way for trailers to work once again? - Pernod - 03-12-2012 05:42 PM

(03-12-2012 05:30 PM)accident Wrote:  why do you scrape youtube/ there is an api to make apps that use youtube videos.. eversiion uses syabas's version of it to direct stream to the players for youtube url trailers..

Wasn't aware of that. I have eversion source but not delved into it yet, on my todo list.

Quote:Do you have some type of automated find youtube trailers scanner in swisscenter? I would love to see that type of option in yamj also. Maybe tied to a skin property to specify you can play them streamed...

No, though it does play YouTube trailers obtained from themoviedb. It's to allow users to sign-in to YouTube and play their favourites, subscriptions, etc. Similar to the 200 series app, but better access to user profile.


(03-12-2012 04:56 PM)Omertron Wrote:  How do you work out the trailer name from a search?
http://trailers.apple.com/trailers/home/scripts/quickfind.php?callback=searchCallback&q=avatar
I can see that Avatar has 3 trailers, but how do I get to the actual file names?

You still have to scrape the page specified in 'location'.


RE: [Apple Trailers] Could this be a way for trailers to work once again? - accident - 03-12-2012 05:59 PM

(03-12-2012 05:42 PM)Pernod Wrote:  
(03-12-2012 05:30 PM)accident Wrote:  why do you scrape youtube/ there is an api to make apps that use youtube videos.. eversiion uses syabas's version of it to direct stream to the players for youtube url trailers..

Wasn't aware of that. I have eversion source but not delved into it yet, on my todo list.

You probably wouldn't notice it.. there's only a couple lines of code to detect it's a youtube video being played and reformating the url for the player.swf which syabas makes and includes the youtube player/access to the api via that. Actually I should say interfaces with the youtube player.. the actual youtube player is stored at youtube it's imported into the flash and plays via that.

But when lundman was looking for about to be in theater trailers, we went looking at the api, that section wasn't in the api but the api was rather full featured especially for normal browser needs you might be scraping for.

I'm not sure if the native players can play a youtube url right now via the api but for flash support.. I know the 200 public can do some flv but it's poor.. the 200 RC2 can do it better. The popbox, v8 are pretty up to date there and I haven't tested direct playing on the 300s.

Quote:No, though it does play YouTube trailers obtained from themoviedb.

How reliable have you found the urls? Last time I checked many were low quality or not even valid anymore. that was over a year ago.


RE: [Apple Trailers] Could this be a way for trailers to work once again? - Pernod - 03-12-2012 07:35 PM

(03-12-2012 05:59 PM)accident Wrote:  I'm not sure if the native players can play a youtube url right now via the api but for flash support.. I know the 200 public can do some flv but it's poor.. the 200 RC2 can do it better. The popbox, v8 are pretty up to date there and I haven't tested direct playing on the 300s.

I'm streaming the mp4 video, to be compatible with 100 series, so I'll stick with what I have for now.

Quote:How reliable have you found the urls? Last time I checked many were low quality or not even valid anymore. that was over a year ago.
Agreed, I give Apple trailers preference over anything retrieved from themoviedb.


RE: [Apple Trailers] Could this be a way for trailers to work once again? - Aurium - 04-04-2012 09:10 PM

Hi guys,

Just caught the end of this thread.

So is there a way to get Yamj to scan the Apple trailer site for just specific movie types?

Can you use a wildcard of sorts to scan/scrape?

I've looked at a few of the links for the download part of a trailer and to date they seem pretty standard, that is in the following;

http://trailers.apple.com/movies/sony_pictures/totalrecall/totalrecall-tlr1_h1080p.mov

After checking some others, each movie has the option of 480 or 720 as well as 1080, the last part of the filename changes as such too.

The movie studio also changes so I was wondering if it is possible to scan say http://trailers.apple.com/'wildcard'_h1080p.mov

I ramble as I type so excuse the layout.

Regards

Aurium


RE: [Apple Trailers] Could this be a way for trailers to work once again? - Omertron - 04-04-2012 10:16 PM

I've not had the chance to try this out and see if I can get it to work with YAMJ


RE: [Apple Trailers] Could this be a way for trailers to work once again? - idbirch - 04-05-2012 07:57 AM

(03-12-2012 04:44 PM)Pernod Wrote:  then follow the 'location' in the feeds to scrape the trailer page for the trailer url's.

Hi pernod, I recently cobbled together an AutoIt script for doing this but fell over at this stage - I can get the trailer page's address OK from a search on movie title but can't get the actual URLs for the trailers themselves from that page. It seems they are hidden in some horrible javascript drop-down which I can't see at all when I grab the page source. How did you get around this?

I resorted to just grabing '/trailers/home/xml/current_720p.xml' as that conains direct links but of course that limits me to only a handful (130-ish) of trailers at any one time.


RE: [Apple Trailers] Could this be a way for trailers to work once again? - Omertron - 04-08-2012 03:53 PM

I tried out the current trailer scanner today:
Code:
trailers.scanner.enable=true
trailers.scanner=apple
trailers.download=true
trailers.rescan.days=0
appletrailers.resolution=720p
appletrailers.download=true
appletrailers.max=1
tried for three popular movies that usually cause issues, namely "Mission Impossible Ghost Protocol", "Avatar" and "Toy Story 3".

All downloaded trailers fine