Very crude wrapper but it works again. The video does not show up in the
browser but rather its own window, I like this beter because it keeps a copy
of the video in the Downloads directory.
I have used this to watch about 10 movie trailers on the Apple site so far.
In Ubuntu you need to un-install the totem plugin for Firefox
(totem-mozilla) and install the mplayer plugin (mozilla-mplayer) then move
/usr/bin/mplayer to /usr/bin/mplayerbin and then use this script as
/usr/bin/mplayer
This scrpt should try to run mplayer.bin normally if you are playing a file
locally but if you are playing a MOV file from a URL it will fake the
user-agent.
Happy hacking.
#!/bin/bash
# This wrapper is to fix the sabotage caused when Apple.com tried to stop
Linux users from watching movie trailers.
#echo "$@" >> /tmp/mplayer.log
#echo
"-------------------------------------------------------------------------------"
>> /tmp/mplayer.log
DOWNLOAD_MOV=0
USE_AGENT=0
MOV_URL=""
FILE_NAME=""
while [ $# -gt 0 ]; do
if [ "$1" = "-user-agent" ]; then
USE_AGENT=1
fi
TEST_MOV_URL=`echo $1 | grep http:// | grep .mov`
if [ ! "$TEST_MOV_URL" = "" ]; then
echo "this is a mov url" >> /tmp/mplayer.log
DOWNLOAD_MOV=1
MOV_URL="$TEST_MOV_URL"
FILE_NAME=`basename $MOV_URL`
fi
shift
done
echo "ok here DOWNLOAD_MOV='$DOWNLOAD_MOV'" >> /tmp/mplayer.log
if [ $DOWNLOAD_MOV -eq 1 ]; then
echo "wget -U 'QuickTime/13.3.7 (qtver=13.3.7;os=Windows Sucks ass Patch
35)' $MOV_URL -O $HOME/Downloads/$FILE_NAME" >> /tmp/mplayer.log
wget -U 'QuickTime/13.3.7 (qtver=13.3.7;os=Windows Sucks ass Patch 35)'
$MOV_URL -O $HOME/Downloads/$FILE_NAME &
sleep 2
/usr/bin/mplayer.bin $HOME/Downloads/$FILE_NAME
exit
fi
echo "mplayer.bin $@" >> /tmp/mplayer.log
/usr/bin/mplayer.bin $@
On Thu, Aug 27, 2009 at 11:14 AM, Royce Souther <[email protected]> wrote:
> Thanks to Derek on LLUG for this link that explains how Apple is trying to
> prevent Linux users from using their site.
> http://ubuntuforums.org/showthread.php?t=1245441
>
> The wget user-agent command works.
> wget -U QuickTime/13.3.7
> http://movies.apple.com/movies/fox/avatar/avatar2009aug0820a-tsr_h1080p.mov
>
> I changed the version number so anyone reading the logs will know I got
> them back.
>
> Derek has tried the Firefox work around for mplayer but with no luck so
> far.
> Here is my twist on the mplayer command
> mplayer -user-agent 'QuickTime/13.3.7 (qtver=13.3.7;os=Windows Sucks ass
> Patch 35)' '
> http://movies.apple.com/movies/sony_pictures/district9/district9-tlr1_720p.mov
> '
>
> And just so you know that is a real version of Windows, I have the box it
> came in and is says that on the front in big black letters that I wrote with
> a Sharpie pen.
>
> It works so I am going to try to wrap it in a shell script and I will post
> the script when I get it working.
>
>
> --
> Easy, fast GUI development.
> http://PerlQt.wikidot.com
>
--
Easy, fast GUI development.
http://PerlQt.wikidot.com
_______________________________________________
clug-talk mailing list
[email protected]
http://clug.ca/mailman/listinfo/clug-talk_clug.ca
Mailing List Guidelines (http://clug.ca/ml_guidelines.php)
**Please remove these lines when replying