VideoHelp Forum




+ Reply to Thread
Results 1 to 24 of 24
  1. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Image
    [Attachment 74137 - Click to enlarge]

    Image
    [Attachment 74138 - Click to enlarge]

    Image
    [Attachment 74139 - Click to enlarge]

    Image
    [Attachment 74141 - Click to enlarge]

    Image
    [Attachment 74142 - Click to enlarge]

    Image
    [Attachment 74143 - Click to enlarge]


    This is al all-in-one Channel 4 (All4) downloader. Much of the grunt work is from Diazole's code.
    The decryptor is Pywidevine using an awd. I also choose to give shaka-packager to N_m3u8DL-RE as the method to decrypt and merge. See the script if you do not wish to use shaka.
    As usual there are two files. chan4_loader.py and C4.py. C4.py will work on its own as a single episode downloader.

    All4 are a real pain when it comes to curation of their output. Titles have no common standard. The first audio track is sometimes the commentary track - and there is no way of knowing which a the time of downloading. So two audio tracks are downloaded. You can choose in your player.
    Programme file names: I assume your downloads are for personal use; they are named accordingly.
    https://files.videohelp.com/u/301890/channel4.zip
    Noob Starter Pack. Just download every Widevine mpd! Not kidding!.
    https://files.videohelp.com/u/301890/hellyes6.zip
    Quote Quote  
  2. Member
    Join Date
    Dec 2022
    Location
    Lesotho
    Search Comp PM
    I like to download the audio described track but as you say you never know in which order they will be. Half way through a series, they change it.

    First two episodes of Celebrity SAS, the default audio track is AD. This is one of the reasons I use mkv as it's easy to sort this out.

    Thanks for the script, I'll give it a thump.
    Quote Quote  
  3. Member
    Join Date
    Dec 2022
    Location
    Lesotho
    Search Comp PM
    Works great. I like the ability to download a specific episode by URL.

    For some reason, it didn't download subs?

    Code:
    "id='subtitles-0':for=all",
    Quote Quote  
  4. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by sipho View Post
    Works great. I like the ability to download a specific episode by URL.

    For some reason, it didn't download subs?

    Code:
    "id='subtitles-0':for=all",
    change that line to this one. I fix the zip later; I'm sure there will be other teething problems
    Code:
     
                "id='0'",
    Noob Starter Pack. Just download every Widevine mpd! Not kidding!.
    https://files.videohelp.com/u/301890/hellyes6.zip
    Quote Quote  
  5. Nice work! That search function is a great addition.

    A quick tip regarding the track selection, you can do it by specifying the id in N_m3u8DL-RE:

    Code:
    # standard audio track
     -sa id="audio_eng=128000" 
    
    # audio descriptive track
     -sa id="audio_eng_1=128000"
    Quote Quote  
  6. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by stabbedbybrick View Post
    Nice work! That search function is a great addition.

    A quick tip regarding the track selection, you can do it by specifying the id in N_m3u8DL-RE:

    Code:
    # standard audio track
     -sa id="audio_eng=128000" 
    
    # audio descriptive track
     -sa id="audio_eng_1=128000"
    Thanks. I like how a user interface can grow over a few iteration into something useful. And this current iteration sort of works fairly intuitively. Escaping out of sections mainly works but room for improvement.

    Re audio tracks. You should tell All4. Sometimes the audio-description track is labelled as the prime audio. Calling tracks by id does not work for all downloads on All4 unfortunately.
    Noob Starter Pack. Just download every Widevine mpd! Not kidding!.
    https://files.videohelp.com/u/301890/hellyes6.zip
    Quote Quote  
  7. Originally Posted by A_n_g_e_l_a View Post

    Re audio tracks. You should tell All4. Sometimes the audio-description track is labelled as the prime audio. Calling tracks by id does not work for all downloads on All4 unfortunately.
    Really? I genuinely did not know that. I've must have had some serious luck so far

    That makes things more difficult indeed. Having multiple tracks isn't a big deal anyway, but stuff like this just bugs me. It's almost as if they don't care about the hard work we go through to illegally download their content.
    Quote Quote  
  8. Member
    Join Date
    Dec 2022
    Location
    Lesotho
    Search Comp PM
    Originally Posted by stabbedbybrick View Post

    Really? I genuinely did not know that. I've must have had some serious luck so far

    That makes things more difficult indeed. Having multiple tracks isn't a big deal anyway, but stuff like this just bugs me. It's almost as if they don't care about the hard work we go through to illegally download their content.
    First two episodes of Celebrity SAS S05 that I grabbed with your script had the AD track flagged as default. Easy to fix of course post download but All4 do that quite often.
    Quote Quote  
  9. Script works excelent!

    But i cannot get 1080p video from this URL: https://www.channel4.com/programmes/best-of-the-word/on-demand/27631-001

    The script appears to get żincorrect? MPD, that only has 768x576 max video resolution:

    Image
    [Attachment 74262 - Click to enlarge]


    In developer tools in Google Chrome i can see current MPD, different from what the script finds:

    Image
    [Attachment 74263 - Click to enlarge]


    And this MDP has 1440x1080 max video resolution:

    Image
    [Attachment 74264 - Click to enlarge]


    Its there a way to change MPD before download?
    Quote Quote  
  10. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by javarg View Post
    Script works excelent!

    But i cannot get 1080p video from this URL: https://www.channel4.com/programmes/best-of-the-word/on-demand/27631-001

    The script appears to get żincorrect? MPD, that only has 768x576 max video resolution:

    Its there a way to change MPD before download?
    I have two All4 scripts, one private and one in this release, and each use different end-points from which to get the mpd. Both script return the the same 768 x 576 offer. I noted in another forum that the script you have actually finds TWO 1080p offers from its mpd normally. One being at a bit rate of over 5000 kbps. So what if happening here, and why you see 1440, I have no idea.

    So if you have an mpd offering better then, the only quick and easy way for this abnormal download would be to change your script temporarily, You could try changing the User Agent string at line 55 and 62 in the pre-formatted headers. If you can locate it in developer tools change it to what your browser uses.

    Or if that fails - add the line a 322 or thereabouts Image
    [Attachment 74267 - Click to enlarge]
    by adding
    Code:
    mpd = input("Enter your MPD ")
    Remove it when you've finished otherwise the script will always halt here. One caveat; different mpd may not have the same keys so decryption may not work.

    [edit] Just tried using a browser to see what its mpd offers and I get this:
    Image
    [Attachment 74269 - Click to enlarge]

    Still only 576.

    If you like this style of script then see https://forum.videohelp.com/threads/411884-UK-Free-to-Air-Downloader for some more (and an updated C4.p (but still finds 576. )
    Last edited by A_n_g_e_l_a; 9th Oct 2023 at 05:20.
    Noob Starter Pack. Just download every Widevine mpd! Not kidding!.
    https://files.videohelp.com/u/301890/hellyes6.zip
    Quote Quote  
  11. Member
    Join Date
    Dec 2020
    Location
    Croatia
    Search PM
    the old version of diazole's channel4 script grabs a 1080p stream
    Quote Quote  
  12. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by ampersand View Post
    the old version of diazole's channel4 script grabs a 1080p stream
    I think its more complex than code difference. Why would my browser provide an mpd that doesn't have the stream? I am in the UK and don't see it. You appear to be in Croatia and do? Server differences? Who knows?

    Unfortunately, I can only code to download what I can see.
    Noob Starter Pack. Just download every Widevine mpd! Not kidding!.
    https://files.videohelp.com/u/301890/hellyes6.zip
    Quote Quote  
  13. Member
    Join Date
    Dec 2020
    Location
    Croatia
    Search PM
    the old diazole script has consistently given me 1080p versions of these old shows while the new script gives me 576p versions
    maybe he found a different url while trawling with http toolkit or a similar sniffer?
    Quote Quote  
  14. Originally Posted by A_n_g_e_l_a View Post
    Originally Posted by ampersand View Post
    the old version of diazole's channel4 script grabs a 1080p stream
    I think its more complex than code difference. Why would my browser provide an mpd that doesn't have the stream? I am in the UK and don't see it. You appear to be in Croatia and do? Server differences? Who knows?

    Unfortunately, I can only code to download what I can see.
    I use Windscribe VPN (Free, London - Crumpets location), Windows 10 Pro 22H2 and Google Chrome (--disable-features=LockProfileCookieDatabase)

    Gonna try with Ubuntu and post the results later
    Quote Quote  
  15. Originally Posted by ampersand View Post
    the old version of diazole's channel4 script grabs a 1080p stream
    Can you share this old version? I guess the old script takes the MPD that contains the video in 1080p
    Quote Quote  
  16. Member
    Join Date
    Dec 2020
    Location
    Croatia
    Search PM
    Originally Posted by javarg View Post
    Originally Posted by ampersand View Post
    the old version of diazole's channel4 script grabs a 1080p stream
    Can you share this old version? I guess the old script takes the MPD that contains the video in 1080p
    this should be it:
    https://mega.nz/file/43ZQRapb#m9ALiFENkOgIrXn3v3jgP4ZN7gyQaydx_WyNOchwCNU
    Quote Quote  
  17. Thanks ampersand,

    Definitely with the previous version of the script I was able to obtain and download the 1080p version

    I don't have enough knowledge to understand why one script gets an MPD and another a different MPD. But with this script I got the MPD shown in Developer Tools in Chrome:

    Image
    [Attachment 74354 - Click to enlarge]


    Image
    [Attachment 74355 - Click to enlarge]
    Quote Quote  
  18. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Isn't this series from the 1990s? Did they even have 1080p 30 years ago?
    Noob Starter Pack. Just download every Widevine mpd! Not kidding!.
    https://files.videohelp.com/u/301890/hellyes6.zip
    Quote Quote  
  19. Member
    Join Date
    Dec 2020
    Location
    Croatia
    Search PM
    Originally Posted by A_n_g_e_l_a View Post
    Isn't this series from the 1990s? Did they even have 1080p 30 years ago?
    not on tv, I'm guessing they're upscaling from whatever they filmed these on, but it does look a smidgeon better than the 576p version
    Quote Quote  
  20. Channel 4 have several endpoints with different output. You get the high quality streams (1080p @ 5000 kb/s) by using the Android endpoint, and the normal 1080p is PC/web. Sometimes the android enpoint won't have the 1080p in any version while the web stream does. And it's not only old content either, several new American sitcoms have 576p max when using android version while offering 1080p in web. This is completely up to Channel4 and how they've decided to store everything.

    The only way to get both versions is to either use something like Freevine that let's you choose endpoint in the settings, or have various versions of scripts lying around.
    Quote Quote  
  21. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by larits View Post
    Channel 4 have several endpoints with different output. You get the high quality streams (1080p @ 5000 kb/s) by using the Android endpoint,
    That may have been the case but I am specifically NOT using an android endpoint and for most modern produced video from channel4 I get two offerings of 1080p. I am more than happy with that.

    Image
    [Attachment 74365 - Click to enlarge]
    Noob Starter Pack. Just download every Widevine mpd! Not kidding!.
    https://files.videohelp.com/u/301890/hellyes6.zip
    Quote Quote  
  22. Originally Posted by A_n_g_e_l_a View Post
    That may have been the case but I am specifically NOT using an android endpoint and for most modern produced video from channel4 I get two offerings of 1080p. I am more than happy with that.

    image
    Considering you're using Diazole's code, and judging by that uri, you are using the android version. If we look at the source xml:

    Code:
    <videoProfile name="widevine-stream-4"><stream bitrate="0" 
    filesize="9972"><uri>http://ak.dash01.stream.c4assets.com/wvmod-stream/CH4_33_05_42_73532008001001_003_HD.mpd?c3.ri=13502445647459337483</uri>
    
    <brand4oDAtomUrl>http://android-mod-dash01.channel4.com/pmlsd/grand-designs/4od.atom</brand4oDAtomUrl>
    
    <siteSectionId>android.channel4.com/4od</siteSectionId>
    I'm not trying to make a thing out of it, just looking to inform. If you come across a video where you're getting 576p max it's worth looking at the web endpoint to see if there are alternative streams.
    Quote Quote  
  23. Member
    Join Date
    Feb 2022
    Location
    Search the forum first!
    Search PM
    Originally Posted by larits View Post
    Originally Posted by A_n_g_e_l_a View Post
    That may have been the case but I am specifically NOT using an android endpoint and for most modern produced video from channel4 I get two offerings of 1080p. I am more than happy with that.

    image
    Considering you're using Diazole's code, and judging by that uri, you are using the android version. If we look at the source xml:

    Code:
    <videoProfile name="widevine-stream-4"><stream bitrate="0" 
    filesize="9972"><uri>http://ak.dash01.stream.c4assets.com/wvmod-stream/CH4_33_05_42_73532008001001_003_HD.mpd?c3.ri=13502445647459337483</uri>
    
    <brand4oDAtomUrl>http://android-mod-dash01.channel4.com/pmlsd/grand-designs/4od.atom</brand4oDAtomUrl>
    
    <siteSectionId>android.channel4.com/4od</siteSectionId>
    I'm not trying to make a thing out of it, just looking to inform. If you come across a video where you're getting 576p max it's worth looking at the web endpoint to see if there are alternative streams.
    Well! Blow me down! I never really looked a the minutiae of Diazole's code just used it as a tool and tweaked whatever to get it working
    Noob Starter Pack. Just download every Widevine mpd! Not kidding!.
    https://files.videohelp.com/u/301890/hellyes6.zip
    Quote Quote  
  24. Member
    Join Date
    Dec 2023
    Location
    England
    Search PM
    This is great. Thanks.
    Last edited by IrishMarty; 31st Dec 2023 at 11:31.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!