VideoHelp Forum




+ Reply to Thread
Results 1 to 22 of 22
  1. Member
    Join Date
    Mar 2024
    Location
    United Kingdom
    Search PM
    Overview

    The following is a semi-automated guide to install stabbedbybrick's fork of Devine, any dependencies and stabbedbybrick's Devine services!

    The fork has these added features:
    • Adds N_m3u8DL-RE as a downloader
    • Download audio and video tracks directly instead of via a proxy
    (see full changelog here)


    This guide assumes a few things:
    • OS is Windows 11 24H2
    • Python is not already installed
    • Git is not already installed
    • Required binaries will be downloaded to C:\devine-bin
    • Devine will be downloaded to C:\devine
    • Devine services will be downloaded to C:\devine-services
    If any of these are not true, please proceed with caution.



    1. Python Installation

    Note: Python 3.13.0 support is not available at the time of posting this guide
    1. Open a new Command Prompt (cmd.exe) instance
    2. Download the 3.12.7 64-bit Windows installer release of Python:
      Code:
      curl -L -O https://www.python.org/ftp/python/3.12.7/python-3.12.7-amd64.exe
    3. Execute the following:
      Code:
      python-3.12.7-amd64.exe /passive PrependPath=1 Include_tcltk=0 Include_test=0

    2. Git Installation
    1. Download the latest 64-bit version of git from: https://git-scm.com/downloads/win
    2. Install - accept all the default options if you are unsure

    3. Other Binary Dependencies
    1. Execute the following:
      Code:
      mkdir C:\devine-bin && cd C:\devine-bin
      curl -L -O https://github.com/shaka-project/shaka-packager/releases/download/v2.6.1/packager-win-x64.exe
      curl -L -O https://www.gyan.dev/ffmpeg/builds/packages/ffmpeg-7.1-essentials_build.zip
      tar -x -f ffmpeg-7.1-essentials_build.zip ffmpeg-7.1-essentials_build/bin
      move ffmpeg-7.1-essentials_build\bin\* . && rmdir /S /Q ffmpeg-7.1-essentials_build && del ffmpeg-7.1-essentials_build.zip
      curl -L -O https://github.com/nilaoda/N_m3u8DL-RE/releases/download/v0.2.1-beta/N_m3u8DL-RE_Beta_win-x64_20240828.zip
      tar -x -f N_m3u8DL-RE_Beta_win-x64_20240828.zip
      move N_m3u8DL-RE_Beta_win-x64\N_m3u8DL-RE.exe . && rmdir /S /Q N_m3u8DL-RE_Beta_win-x64 && del N_m3u8DL-RE_Beta_win-x64_20240828.zip
      curl -L -O https://mkvtoolnix.download/windows/releases/87.0/mkvtoolnix-64-bit-87.0.7z
      tar -x -f mkvtoolnix-64-bit-87.0.7z mkvtoolnix/mkvmerge.exe
      move mkvtoolnix\mkvmerge.exe . && rmdir /S /Q mkvtoolnix && del mkvtoolnix-64-bit-87.0.7z
      curl -L -O https://github.com/CCExtractor/ccextractor/releases/download/v0.93/CCExtractor.msi
      msiexec /a CCExtractor.msi TARGETDIR="C:\devine-bin\ccextractor_temp" /q
      move ccextractor_temp\PFiles\CCExtractor . && rmdir ccextractor_temp /S /Q && del CCExtractor.msi

    4. Devine Installation
    1. Open a new Command Prompt (cmd.exe) instance
    2. Execute the following:
      Code:
      mkdir C:\devine
      git clone https://github.com/stabbedbybrick/devine.git C:\devine
      cd C:\devine
      git checkout n_m3u8dl_re
      python.exe -m pip install --upgrade pip
      pip install --upgrade setuptools
      pip install poetry
      python -m venv venv
      venv\Scripts\activate.bat
      poetry config virtualenvs.in-project true
      poetry install

    5. Devine Services Installation
    1. Execute the following:
      Code:
      mkdir C:\devine-services
      git clone https://cdm-project.com/stabbedbybrick/devine-services.git C:\devine-services

    6. Configure Devine
    1. Execute the following:
      Code:
      mkdir %LOCALAPPDATA%\devine\WVDs
    2. Add your Widevine Device (.wvd) file to this directory - not covered in this guide. Information is readily available elsewhere in this forum!
    3. Execute the following to create a new config file:
      Code:
      notepad %LOCALAPPDATA%\devine\devine.yaml
    4. Add the following lines to the config file, replacing {} with the correct values:
      Code:
      directories:
        services: C:\devine-services\services
      
      credentials:
        ALL4: {ALL4 USERNAME}:{ALL4 PASSWORD}
      
      cdm:
        default: {NAME OF WVD FILE WITHOUT EXTENSION}
      
      downloader: n_m3u8dl_re
      
      n_m3u8dl_re:
        use_proxy: false
      
      dl:
        downloads: 4
        workers: 16
        sub_format: srt

    7. Final Steps
    1. Add binary directories to the user path. Execute the following:
      Code:
      for /f "usebackq tokens=2,*" %A in (`reg query HKCU\Environment /v PATH`) do set USER_PATH=%B
      setx PATH "C:\devine-bin;C:\devine-bin\CCExtractor;%USER_PATH%"
    2. Create a user friendly shortcut. Execute the following:
      Code:
      echo @echo off > "%LOCALAPPDATA%\Programs\Python\Python312\Scripts\devine.bat"
      echo C:\devine\venv\Scripts\python.exe C:\devine\venv\Scripts\devine %* >> "%LOCALAPPDATA%\Programs\Python\Python312\Scripts\devine.bat"

    8. Test
    1. Open a new Command Prompt (cmd.exe) instance
    2. Test the install by downloading an episode of Gogglebox from the ALL4 service:
      Code:
      devine dl -w S24E10 all4 gogglebox
    3. Once completed. The video file (mkv) should be in a directory in %USERPROFILE%\Downloads\devine\


    Thanks to @pssh for the previous guides - used as a basis for the above!
    And finally a special thanks to @stabbedbybrick for the devine fork and of course all the services!
    Last edited by SaintyUK; 27th Nov 2024 at 11:51.
    Quote Quote  
  2. Hi Sainty. Here's the bottom half of my attempt to install the Other Binary Dependencies (Step 3). The CLI hangs. Can you interpret what the problem is (something to do with toolnix by the look of it)? Many thanks indeed.
    Code:
    C:\devine-bin>curl -L -O https://mkvtoolnix.download/windows/releases/87.0/mkvtoolnix-64-bit-87.0.7z
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 26.7M  100 26.7M    0     0  2845k      0  0:00:09  0:00:09 --:--:-- 2912k
    
    C:\devine-bin>tar -x -f mkvtoolnix-64-bit-87.0.7z mkvtoolnix/mkvmerge.exe
    tar: LZMA codec is unsupported
    tar: mkvtoolnix/mkvmerge.exe: Not found in archive
    tar: Error exit delayed from previous errors.
    
    C:\devine-bin>move mkvtoolnix\mkvmerge.exe . && rmdir /S /Q mkvtoolnix && del mkvtoolnix-64-bit-87.0.7z
    The system cannot find the file specified.
    
    C:\devine-bin>curl -L -O https://github.com/CCExtractor/ccextractor/releases/download/v0.93/CCExtractor.msi
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
      0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
    100 22.8M  100 22.8M    0     0  2634k      0  0:00:08  0:00:08 --:--:-- 2911k
    
    C:\devine-bin>msiexec /a CCExtractor.msi TARGETDIR="C:\devine-bin\ccextractor_temp" /q
    
    C:\devine-bin>move ccextractor_temp\PFiles\CCExtractor . && rmdir ccextractor_temp /S /Q && del CCExtractor.msi
    Quote Quote  
  3. Member
    Join Date
    Mar 2024
    Location
    United Kingdom
    Search PM
    Ah, it look like the version of Windows you are using does not support 7zip files.
    Probably best to go and get 7zip and then manually extract the mkvtoolnix-64-bit-87.0.7z file and then place mkvmerge.exe in C:\devine-bin
    Quote Quote  
  4. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    Thanks for sharing the guide
    --[----->+<]>.++++++++++++.---.--------.
    [*drm mass downloader: widefrog*]~~~[*how to make your own mass downloader: guide*]
    Quote Quote  
  5. Member
    Join Date
    Mar 2024
    Location
    United Kingdom
    Search PM
    Originally Posted by 2nHxWW6GkN1l916N3ayz8HQoi View Post
    Thanks for sharing the guide
    No problem at all. Thanks to you also, for everything you've done for the forum! I've learnt a lot from you!
    Quote Quote  
  6. Hello again, Sainty. My C drive is smallish and I like to put as little in there as possible. Accordingly,I put my devine in the folder D:\Free after executing the steps in your guide one at a time to make sure my amendments didn't cause the CLI commands to fail. It seemed to go well until I tried to test it and got this:
    Code:
    D:\Free\devine>devine dl -w S24E10 all4 gogglebox
      File "D:\Free\devine\venv\Scripts\devine", line 2
        D:\Free\devine\venv\Scripts\python.exe
           ^
    SyntaxError: unexpected character after line continuation character
    Can you suggest why it doesn't like the letter F (or the word Free)? My continued thanks.
    Quote Quote  
  7. Member
    Join Date
    Mar 2024
    Location
    United Kingdom
    Search PM
    Originally Posted by pooksahib View Post
    Hello again, Sainty. My C drive is smallish and I like to put as little in there as possible. Accordingly,I put my devine in the folder D:\Free after executing the steps in your guide one at a time to make sure my amendments didn't cause the CLI commands to fail. It seemed to go well until I tried to test it and got this:
    Code:
    D:\Free\devine>devine dl -w S24E10 all4 gogglebox
      File "D:\Free\devine\venv\Scripts\devine", line 2
        D:\Free\devine\venv\Scripts\python.exe
           ^
    SyntaxError: unexpected character after line continuation character
    Can you suggest why it doesn't like the letter F (or the word Free)? My continued thanks.
    Hmmm. What is the contents of the shortcut file. Run the following and screenshot\copy:
    Code:
    type "%LOCALAPPDATA%\Programs\Python\Python312\Scripts\devine.bat"
    Quote Quote  
  8. No problem. The second cap is the script where I thought the problem was (given that it began with a hash and an exclamation mark). I amended it (my amendment is the line below the #! line) but it made no difference.
    Image Attached Thumbnails Click image for larger version

Name:	zz.jpg
Views:	15
Size:	40.6 KB
ID:	83649  

    Click image for larger version

Name:	zzz.jpg
Views:	13
Size:	37.3 KB
ID:	83650  

    Last edited by pooksahib; 22nd Nov 2024 at 15:17.
    Quote Quote  
  9. Member
    Join Date
    Mar 2024
    Location
    United Kingdom
    Search PM
    Looks pretty good to me. Does the following work?

    Code:
    cd /D D:\Free\devine
    venv\Scripts\activate.bat
    devine dl -w S24E10 all4 gogglebox
    Quote Quote  
  10. I'm a frayed knot. Looks like I've made a wee error somewhere in the install so I'll maybe start again. While I'm here, does devine do Plex? I'm thinking not as there's no folder for it within 'services'. Thanks for giving me your time.
    Image Attached Thumbnails Click image for larger version

Name:	zz.jpg
Views:	16
Size:	48.2 KB
ID:	83653  

    Quote Quote  
  11. Member
    Join Date
    Mar 2024
    Location
    United Kingdom
    Search PM
    Having thought about this again, I'm not entirely sure why in your instance this is required, but I'm fairly confident this will work for you:

    Code:
    echo "@echo off" > "C:\Program Files\Python312\Scripts\devine.bat"
    echo """D:\Free\devine\venv\Scripts\python.exe"" ""D:\Free\devine\venv\Scripts\devine"" %*" >> "C:\Python311\Scripts\devine.bat"
    Also as far as I'm aware no one has ported the Plex service over to devine yet.
    Quote Quote  
  12. Hi again. No, that code wasn't a fix, unfortunately. I've moved devine out of the Free folder so it's now D:\devine. Hopefully, I found all the references to Free and deleted them. Here's what happens when I run the 'test download' command. It seems to be running (without having been asked) that command you just gave me. Is there a way to 'clear' that command?
    Image Attached Thumbnails Click image for larger version

Name:	zz.jpg
Views:	25
Size:	51.5 KB
ID:	83661  

    Quote Quote  
  13. Sainty: Step 7b is "Create a user friendly shortcut. Execute the following:..." Is it essential to do this (to my mind shortcut=optional)? And what IS the shortcut, what does it make me do differently when running, say, "devine dl -w S24E10 all4 gogglebox"? Thank you.
    Quote Quote  
  14. Member
    Join Date
    Mar 2024
    Location
    United Kingdom
    Search PM
    Originally Posted by pooksahib View Post
    Sainty: Step 7b is "Create a user friendly shortcut. Execute the following:..." Is it essential to do this (to my mind shortcut=optional)? And what IS the shortcut, what does it make me do differently when running, say, "devine dl -w S24E10 all4 gogglebox"? Thank you.
    It is not essential, however if you don't create a shortcut similar to this you'll not be able to use devine outside of the python virtual environment.
    You would need to active the venv by executing this first
    Code:
    C:\devine\venv\Scripts\activate.bat
    Quote Quote  
  15. Noted, thanks for that, I've now run the shortcut. Doing your test was only halfway successful, though. The Service was Authenticated but a Token wasn't valid. I couldn't find anything regarding invalid tokens that I could understand so I wonder if you could suggest cause and cure? Thanks.
    Image Attached Thumbnails Click image for larger version

Name:	zztoken.jpg
Views:	18
Size:	74.2 KB
ID:	83760  

    Quote Quote  
  16. Member
    Join Date
    Mar 2024
    Location
    United Kingdom
    Search PM
    Never seen that before. Try deleting the cache directory for the all4 service: %LOCALAPPDATA%\devine\Cache\ALL4
    Quote Quote  
  17. That's got it, nice one, thanks. Howevah... Can you tell me anything about this (again, can't seem to google anything useful). I'm in the UK and I turned off the VPN before running. Continued thanks...

    IGNORE. Putting a hash before "downloader: n_m3u8dl_re" in the yaml fixed it. Don't know why...
    Image Attached Thumbnails Click image for larger version

Name:	zzmanifest.jpg
Views:	19
Size:	76.1 KB
ID:	83761  

    Last edited by pooksahib; 27th Nov 2024 at 05:07.
    Quote Quote  
  18. Originally Posted by SaintyUK View Post
    1. Open a new Command Prompt (cmd.exe) instance
    2. Download the 3.12.7 64-bit Windows installer release of Python:
      Code:
      curl -L -O https://www.python.org/ftp/python/3.12.7/python-3.12.7-amd64.exe
    3. Execute the following:
      Code:
      python-3.12.7-amd64.exe /passive PrependPath=1 Include_tcltk=0 Include_test=0
    Hi Sainty. Just curious: do these commands achieve anything different than downloading from the python site and installing as normal (and checking the Add to Path box)?
    Quote Quote  
  19. If I can put it another way, then: if my Python was already installed would I need to run
    Code:
    (pythonversion).exe /passive PrependPath=1 Include_tcltk=0 Include_test=0
    or is it just a case of putting something else into 'path'? Thanks.
    Quote Quote  
  20. Member
    Join Date
    Mar 2024
    Location
    United Kingdom
    Search PM
    No, it does nothing nothing special. Just installs Python and includes in the PATH.
    Quote Quote  
  21. Member
    Join Date
    Jan 2025
    Location
    England
    Search Comp PM
    Thank you SaintyUK for all this help!

    I've installed devine, after falling foul of the 7z trap and the cache problem, both of which you've sorted out above. One thing not mentioned is the naming convention for series: they have to be in lower-case, with space replaced by a hyphen (not an underscore).

    I've been playing with ITV downloads and thought it might help others if I gave some examples. The main thing is that you have to find the URL of the whole series by logging on to ITVX. You don't have to set up a new service - it just works

    This downloads Ring out your dead from Midsomer Murders. Note s5e3 is fine (no need for leading zeros):
    devine dl -w s5e3 itv https://www.itv.com/watch/midsomer-murders/Ya1096

    This lists information about all the episodes (which you will probably cancel, since there are so many):
    devine dl --list itv https://www.itv.com/watch/midsomer-murders/Ya1096

    This lists information about just one episode, so you can check the quality available:
    devine dl -–list -w s5e3 itv https://www.itv.com/watch/midsomer-murders/Ya1096

    If you want to limit the quality, add a -q flag: devine dl -q 720p -w s5e3 itv https://www.itv.com/watch/midsomer-murders/Ya1096

    One thing I haven't worked out is how to change the target directory, because I'd like to make that Downloads rather than the default.

    But the main point of this post is to say thank you for such clear instructions and scripts - much better than the usual confusing jumble of things that half work, with steps omitted.
    Quote Quote  
  22. Member
    Join Date
    Mar 2024
    Location
    United Kingdom
    Search PM
    I'd suggest always checking the help for each service, for example: devine dl all4 -?
    Also don't forget about the search functionality. It should give you the correct string to use in the dl command.

    Thank you for the feedback. Much appreciated!
    Quote Quote  



Similar Threads

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