Suspicious attachment dropped
Hello all!
I'm new to "link," so sorry if I commit any faux pas ; )

Our SBS has a rather appalling streaming service called SBS On Demand, where 
you can watch a selection of programmes (and movies) shown on SBS. " 
https://www.sbs.com.au/ondemand/ "
Unfortunately, due to some Government shenanigans, I am unable to watch it at 
home.
Also unfortunate, but due to SBS shenanigans instead, you must now create an 
"account" to watch anything:  It is for advertising, though I don't see why 
this is necessary for advertising as SBS upload pretty much everything about 
what movies you watch (even the synopsis) to FacePuke and a whole host of other 
equally disreputable sites.

Anyhow, I wanted to watch "Ip Man:  The Legend is Born" (and also the sequel): 
but SBS said it "expires" in twelve days (that was yesterday).  This made me 
unhappy.  If L*-**n is there, she will know why---are you?   Well?  Hello?

Well, I found out---after much misadventure---that, if you go to the page of 
your movie--- " 
https://www.sbs.com.au/ondemand/video/321665091631/ip-man-the-legend-is-born " 
for me---and add " /single " after " /video ",  (in the URL; w/o quotes) you 
can watch it w/o an account.
This is all very well and good for getting around SBS shenanigans, but I still 
can't watch it smoothly at home (don't pretend that you are surprised, 
'iiNet.'---super-fast my arse):  For that, I need to have a good copy on my HDD.

This took me longer than I'd care to admit, but I discovered (yes---I did 
discover---for myself at least) that the answer is in the " application/smil " 
file.
The "smil" for "Ip Man:  The Legend Begins" can be got fro " 
https://www.sbs.com.au/api/video_release/smil/!id!321665091631 ".  Just replace 
the number after the  !  with the number of your video.
For "Ip Man:  The Final Fight" (the sequel) " 
https://www.sbs.com.au/ondemand/video/417085507546/ip-man-the-final-fight " the 
"smil" is at " http://www.sbs.com.au/api/video_release/smil/!id!417085507546 ". 
 Yes I know.---Too many quotes.

Once you have your smil---" !id!321665091631 " in my case---you need to open it 
up:  For this, you can use any old (or new) text editor.  Mine starts off like:
===
=               <smil xmlns="http://www.w3.org/2005/SMIL21/Language";>
=               <head>
=               </head>
=               <body>
=               <seq>
=               <par>
=               <video 
src="http://sbsvodns-vh.akamaihd.net/i/vod/SBS_Production/managed/2017/04/05/2017-04-05_492869_128K.mp4,,.csmil/master.m3u8?_b=1000&amp;b=0-2000&amp;a_=off";
 title="Ip Man: The Final Fight" abstract="This unique biopic of the oft-filmed 
Wing Chun martial arts master follows Ip Man in his later life, where he 
reluctantly begins a series of challenges from rival kung fu schools and is 
soon drawn into the dark and dangerous world of the Triads. Directed by Hong 
Kong cult icon Herman Yau, starring Anthony Wong, Eric Tsang, Gillian Chung, 
Anita Yuen, Jordan Chan and Marvel Chow.  (From Hong Kong, in Cantonese) 
(Action) (2013) #SBSMovies @SBSMovies" copyright="SBS" dur="5778000ms" 
guid="492869" 
categories="Genre::Film,Section::Section,Section::Section/Programs,Channel::Channel/SBS2,Film/Action
 Adventure,Film/Biography,Film/Cult,Film/Martial Arts" 
ratings="urn%3Awww.acma.gov.au%3Atv:m%20v%2C%20a" type="application/x-mpegURL" 
clipBegin="0:00" clipEnd="24:43.125">
=               </video>
=               <textstream 
src="http://videocdn.sbs.com.au/u/video/SBS/managed/closedcaptions/2017/04/05/492869.DFXP";
 type="application/ttaf+xml"/>
=               <textstream 
src="http://videocdn.sbs.com.au/u/video/SBS/managed/closedcaptions/2017/04/05/492869.SRT";
 type="text/srt"/>
=               </par>
=               <par>
===
What we're interested in is the second URL, which is just before the synopsis: 
" 
http://sbsvodns-vh.akamaihd.net/i/vod/SBS_Production/managed/2017/04/05/2017-04-05_492869_128K.mp4,,.csmil/master.m3u8?_b=1000&amp;b=0-2000&amp;a_=off
 ".
This is a link to the " master.m3u8 " file for our movie.  We can download the 
" master.m3u8 ", and open it up in our favourite media player (VLC), but it is 
not the actual movie, just a special sort of link to it online.

To get the movie, we have to open the " master.m3u8 " in the same way we opened 
the "smil," and copy the first URL we see (it is on the third line):  This is 
the link to the "index_0_av.m3u8 " file (there are other indexes, but they are 
lower quality).  My link is " 
http://sbsvodns-vh.akamaihd.net/i/vod/SBS_Production/managed/2014/09/18/2014-09-18_411628_,1500,1000,512,128,K.mp4.csmil/index_0_av.m3u8?null=0
 ".
Of course, you could've skipped downloading the "master" file, but that 
requires you to change the URL to that of the index.

Now open up the index.
You will see a whole bunch of URL that look like " 
http://sbsvodns-vh.akamaihd.net/i/vod/SBS_Production/managed/2014/09/18/2014-09-18_411628_,1500,1000,512,128,K.mp4.csmil/segment1_0_av.ts?null=0
 "
These are links to all the video segments---this particular one is for the 
first segment, " segment1_0_av.ts ": the "1" indicates that it is the first 
segment, the "0" that it is from the highest quality index.
You can watch any of these segments on their own, but to watch the whole movie, 
you need to download every one of them.  Mine has 576 segments: obviously you 
can not do it manually.

I am not very good with scripting, so I had to look up online how to do it.
A template I found for either a " .bat " or " .cmd " batch file that will 
download them all is enclosed between the lines of equal signs.
=======================
FOR /L %%G IN (1,1,576) DO powershell -Command "(New-Object 
Net.WebClient).DownloadFile('http://example.address/segment%%G_0_av.ts?null=0', 
'Folder\segment%%G_0_av.ts')"
=======================
The three numbers (1,1,576) tell the command to replace %%G with all the 
integers from (1, up to ,576) one at a time. 
You need to replace http://example.address/segment%%G_0_av.ts?null=0 with your 
segment address and Folder\ with the local folder you want it saved to.
You also need to replace 576 with your last segment number,
It is important that when you replace the example address with your movie 
address, that you replace the segment number with %%G, and that you do not 
remove %%G from the file name.  If you do not follow this rule, you will either 
download one segment 576 times, or download all the segments, but delete every 
one except the last, or just download one segment once.
My file, which I have attached---you can modify it with notepad---, looks like:
=======================
MKDIR "%USERPROFILE%\Videos\Ip Man The Legend Begins"
FOR /L %%G IN (1,1,576) DO powershell -Command "(New-Object 
Net.WebClient).DownloadFile('http://sbsvodns-vh.akamaihd.net/i/vod/SBS_Production/managed/2014/09/18/2014-09-18_411628_,1500,1000,512,128,K.mp4.csmil/segment%%G_0_av.ts?null=0',
 '%USERPROFILE%\Videos\Ip Man The Legend Begins\segment%%G_0_av.ts')"
=======================
Run the batch file by double clicking on it, and it will download all 576 
segments to a folder "Ip Man The Legend Begins" (which it creates) in your 
Videos folder.

Next, you will need to make a new index for your segments:  This index is the 
file that you will open to play the movie.  You  c a n  play the original 
index, like the master, but that will just show you the online original, not 
the one you downloaded, and it will be a big waste your bandwidth.
The easiest way to make a new index is to use a find and replace text editing 
tool to delete everything around " segment1_0_av.ts " (doing this for all 
segments, not just 1) on the URL line.  It would probably be best to use a CMD 
script for this, but as I said before, I don't know much about this.
I have included an " index.m3u8 " file which should work for "Ip Man The Legend 
Begins", if you put it in that folder, so long as you don't rename the 
segments, but it will definitely not work for any film with more segments.


I hope this wasn't  t o o  unhelpful,
Reubs Newbs.
_______________________________________________
Link mailing list
Link@mailman.anu.edu.au
http://mailman.anu.edu.au/mailman/listinfo/link

Reply via email to