Jump to content

Reino

Member
  • Posts

    259
  • Joined

  • Last visited

  • Days Won

    3
  • Donations

    0.00 USD 
  • Country

    Netherlands

Posts posted by Reino

  1. With my ±20 year old pc (AMD Athlon XP 3200+ and ATI Radeon HD 3850 (AGP)) watching Youtube videos in-browser is next to impossible, because of the 100% cpu-utilization. It's just too slow. The videocard however does support hardware video-decoding of H.264 up to 1080p.

    To watch and/or download Youtube videos I always use (my own) simple Youtube-extractor + the latest still working MPC-HC on WinXP to watch, or - of course - my own WinXP compatible FFmpeg builds to download.

    My Youtube-extractor is part of an XQuery function module, Xivid, for the command-line tool Xidel (an XML/HTML/JSON parser). It's a simple extractor, in the sense that it doesn't support age-gated-videos. You'd still need youtube-dl / yt-dlp for that. But for "normal" videos, the vast majority I come across, it works absolutely fine and because it doesn't depend on Python it's multitudes faster (on my old system). The extractor uses the Android API call, which means there's no bandwidth-throttling or a need to decrypt signatures.

    Extracting

    • Xidel 0.9.9.8787 or newer. For WinXP download the "openssl.win32"-variant! Besides 'xidel.exe', don't forget to extract 'cacert.pem' as well.
      Alternatively you could download one from my host, which are much smaller because I removed the "debug symbols".
    • OpenSSL 3.2.0 dll-files to be able to open and process virtually any https-url nowadays. Put them in the same map as 'xidel.exe', in 'C:\Windows\system32', or somewhere in %PATH%.
    • 'xivid.xqm'. My XQuery function module with the xivid:youtube() function declaration.

    Watching

    From 'MPC-HC.1.7.11.24.x86.7z' extract everything except the "LAVFilters"-map.
    From 'LAVFiltersXP-0.70.2-beta2-x86.zip' extract - at least - the manifest-file, all dll-files and ax-files to 'MPC-HC.1.7.11.24.x86\LAVFilters'.
    From 'standalone_filters-mpc-be.1.4.6.x86.7z' extract 'MPCVideoDec.ax' anywhere you want basically.

    Then finally in MPC-HC: Options --> External Filters --> Add Filter... --> Browse... --> select 'MPCVideoDec.ax' --> tick the "Prefer"-box.
    This way you can watch most* https progressive-, DASH- and HLS-videostreams with your gpu doing the video-decoding.

    Downloading

    My FFmpeg builds obviously. Nothing more to say. :rolleyes: Discussion on Doom9 Forum.

    Command-lines

    The most basic Xidel-call for a Youtube-video would be...

    xidel.exe -s --module=xivid.xqm -e "xivid:youtube('https://www.youtube.com/watch?v=dQw4w9WgXcQ')"
    xidel.exe -s --module=xivid.xqm -e "xivid:youtube('dQw4w9WgXcQ')"

    ...which returns a JSON with all the different audio- and video formats.

    The following command I use all the time to watch the 720p (itag 22) progressive video:

    FOR /F "delims=" %A IN ('
      xidel -s --module^=xivid.xqm -e "xivid:youtube('dQw4w9WgXcQ')/(formats)()[starts-with(id,'pg')][last()]/url"
    ') DO @"C:\Program Files\Media\MPC-HC.1.7.11.24.x86\mpc-hc.exe" "%A" /close

    When this video doesn't work/play (rare case), I select the DASH variants. Itag 136 (H.264 720p) and itag 140 (AAC) in this case:

    FOR /F "delims=" %A IN ('
      xidel -s --module^=xivid.xqm -e "xivid:youtube('dQw4w9WgXcQ')/formats/`\"C:\Program Files\Media\MPC-HC.1.7.11.24.x86\mpc-hc.exe\" {.()[format='mp4[h264]' and substring-before(resolution,'x') le 1280][last()]/url} /dub {.()[format='mp4[aac]'][last()]/url} /close`"
    ') DO @%A

    The Youtube video- and/or audio-urls don't necessarily need to be quoted, but if you want to do it absolutely right (including the regrettably necessary escape-characters):

    FOR /F "delims=" %A IN ('
      xidel -s --module^=xivid.xqm -e "xivid:youtube('dQw4w9WgXcQ')/formats/`\"C:\Program Files\Media\MPC-HC.1.7.11.24.x86\mpc-hc.exe\" \"{.^(^)[format^='mp4[h264]' and substring-before^(resolution^,'x'^) le 1280][last^(^)]/url}\" /dub \"{.^(^)[format^='mp4[aac]'][last^(^)]/url}\" /close`"
    ') DO @%A

    Then while you're at it, you might as well make the command a bit more readable by prettifying the query:

    FOR /F "delims=" %A IN ('
      xidel -s --module^=xivid.xqm -e "
        xivid:youtube^('dQw4w9WgXcQ'^)/formats/`
          \"C:\Program Files\Media\MPC-HC.1.7.11.24.x86\mpc-hc.exe\"
          \"{.()[format='mp4[h264]' and substring-before(resolution,'x') le 1280][last()]/url}\"
          /dub \"{.()[format='mp4[aac]'][last()]/url}\"
          /close
        `
      "
    ') DO @%A

    And because of the crazy escape-character-rules of cmd/Batch, nothing between the ( \ )-escaped double-quotes (\"...\") needs to be ( ^ )-escaped.

    While the for-loop for the itag 22 video, with only 1 video-url, just feeds the video-url to MPC-HC, the for-loop for the itag 136+140 executes the string generated by Xidel. With more than 1 generated url this is a much better approach than messing with temporary variables and such.

    For downloading it's as easy as:

    FOR /F "delims=" %A IN ('
      xidel -s --module^=xivid.xqm -e "xivid:youtube('dQw4w9WgXcQ')/(formats)()[starts-with(id,'pg')][last()]/url"
    ') DO @ffmpeg.exe -hide_banner -i "%A" -c copy "Rick Astley - Never Gonna Give You Up (Official Music Video).mp4"

    Or with separate audio- and video-urls:

    FOR /F "delims=" %A IN ('
      xidel -s --module^=xivid.xqm -e "xivid:youtube('dQw4w9WgXcQ')/formats/`ffmpeg.exe -hide_banner -i \"{.^(^)[format^='mp4[h264]' and substring-before^(resolution^,'x'^) le 1280][last^(^)]/url}\" -i \"{.^(^)[format^='mp4[aac]'][last^(^)]/url}\" -c copy \"Rick Astley - Never Gonna Give You Up ^(Official Music Video^).mp4\"`"
    ') DO @%A
    
    FOR /F "delims=" %A IN ('
      xidel -s --module^=xivid.xqm -e "
        xivid:youtube^('dQw4w9WgXcQ'^)/formats/`
          ffmpeg.exe -hide_banner
          -i \"{.()[format='mp4[h264]' and substring-before(resolution,'x') le 1280][last()]/url}\"
          -i \"{.()[format='mp4[aac]'][last()]/url}\"
          -c copy \"Rick Astley - Never Gonna Give You Up (Official Music Video).mp4\"
        `
      "
    ') DO @%A

    * LAVFiltersXP 0.70.2 is already pretty old which means that certain videostreams aren't (properly) supported. Youtube livestreams for instance, but also videos from Twitter. Luckily with FFmpeg there's a workaround for that:

    FOR /F "delims=" %A IN ('
      xidel -s --module^=xivid.xqm -e "xivid:youtube('###########')/(formats)()[last()]/url"
    ') DO @ffmpeg.exe -hide_banner -i "%A" -c copy -f nut - | "C:\Program Files\Media\MPC-HC.1.7.11.24.x86\mpc-hc.exe" - /close
  2. 5 hours ago, VistaLover said:

    Without modifying anything in about:config, "userstyles.org" starts to load, but then barfs with a

    Quote

    Application error: a client-side exception has occurred (see the browser console for more information).

    For me this only happens when I don't allow all the Google stuff to load in uMatrix.

    5 hours ago, VistaLover said:

    Incidentally, that "google.com" SSUAO will allow you now to be served the most recent incarnation of the

    https://www.google.com/

    search engine result pages, instead of a dumped-down version "legacy" browsers are being served (Fx < 65.0) .

    I didn't know that. Thanks. But I'm hardly using Google anymore nowadays. I'm very happy with DuckDuckGo, my primary search-engine.

    Uhm, thanks for your elaborate answer! :P

  3. 3 hours ago, AstroSkipper said:

    As I already mentioned, you have to do this via copy and save the CSS code from the stylesheet site such as https://userstyles.org/styles/180927/disable-css-animations-and-transitions-safely.css. Scroll down to the bottom of this site, click onto "Show code", copy it, create in Stylem an empty stylesheet and insert the copied code.

    Ok. Done that. It wasn't obvious to me from your previous posts.

    3 hours ago, AstroSkipper said:

    Then save it by giving the original name provided on this site.

    Which is? "disable-css-animations-and-transitions-safely"? "Disable CSS animations and transitions safely"? Or doesn't it matter?

    Anyway,... no more animations (and 100% cpu usage) on https://developer.mozilla.org/en-US/docs/Web/CSS/animation. The userstyles website itself is still a nightmare though with all the fancy stuff that's loaded... *sigh*

  4. 1 hour ago, nicolaasjan said:

    How did you do that?

    With Python 3.9.13 from here:

    D:\Storage\Media\Binaries>python "yt-dlp_git\yt_dlp\__main__.py" -vgf 22 "8kl6q_9qZOs"
    [debug] Command-line config: ['-vgf', '22', '8kl6q_9qZOs']
    [debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8 (No VT), error utf-8 (No VT), screen utf-8 (No VT)
    [debug] yt-dlp version stable@2023.07.06 [b532a3481] (source)
    [debug] Lazy loading extractors is disabled
    [debug] Python 3.9.13 (CPython x86 32bit) - Windows-XP-5.1.2600-SP3 (OpenSSL 1.1.1i  8 Dec 2020)
    [debug] exe versions: ffmpeg N-102342-g5541cff-Reino (fdk,setts)
    [debug] Optional libraries: Cryptodome-3.17, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, secretstorage-3.3.3, sqlite3-2.6.0, websockets-11.0.2
    [debug] Proxy map: {}
    [debug] Loaded 1863 extractors
    [youtube] Extracting URL: 8kl6q_9qZOs
    [youtube] 8kl6q_9qZOs: Downloading webpage
    [youtube] 8kl6q_9qZOs: Downloading ios player API JSON
    [youtube] 8kl6q_9qZOs: Downloading android player API JSON
    [youtube] 8kl6q_9qZOs: Downloading m3u8 information
    [debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec:vp9.2, channels, acodec, lang, proto
    [debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id
    [info] 8kl6q_9qZOs: Downloading 1 format(s): 22
    https://rr2---sn-32o-bg9e.googlevideo.com/videoplayback?[...]
  5. 13 hours ago, VistaLover said:

    The official yt-dlp has long ago abandoned support for CPython 3.4 and, thus, the Windows XP OS

    "The official yt-dlp binary has long ago abandoned..."

    The source itself, as far as I can tell, is still compatible. Even with my ancient pc. This still works for me:

    python "yt-dlp_git\yt_dlp\__main__.py" -gf 22 "<youtube-id>"
  6. 21 hours ago, AstroSkipper said:

    Hello @Reino! Allow the website userstyles.org completely in eMatrix! Then, check if you have done that correctly:

    For google.com, I use @VistaLover's SSUAO Mozilla/5.0 (%OS_SLICE% rv:65.0) Gecko/20100101 Firefox/65.0.

    I have, as you can see in my screenshot. Other stuff like facebook and pinterest are completely irrelevant.

    As for the useragent...

    On 8/16/2023 at 2:10 AM, VistaLover said:
    general.useragent.override.userstyles.org;Chrome

    ...only this works for me to render the website at all. Changing (or creating) the useragent for google.com doesn't do anything for me with regards to userstyles.org, so I don't understand how it does for you.

    On 8/16/2023 at 2:15 AM, AstroSkipper said:

    Now, I have also installed the extension Stylem and installed the following CSS style via copy and save from userstyles.orghttps://userstyles.org/styles/180927/disable-css-animations-and-transitions-safely 
    This actually stops any CSS animation on the site above and brings my processor back to normal. :cheerleader:

    How? Installing "https://userstyles.org/styles/180927/disable-css-animations-and-transitions-safely", "https://userstyles.org/styles/180927/disable-css-animations-and-transitions-safely.css" with Stylem's "Install from URLs..."-button doesn't work and the website itself complains I'm not using Chrome. @VistaLover already mentioned this. So how did you accomplish this?

  7. 13 hours ago, VistaLover said:

    inside NM28's "about:config" editor, modify the pref

    general.useragent.override.google.com

    to a value of

    Mozilla/5.0 (%OS_SLICE% rv:65.0) Gecko/20100101 Firefox/65.0

    Then, both the homepage of userstyles.org, as well as individual userstyle pages will display as expected!

    It doesn't for me:

    spacer.png

    Mozilla/5.0 (%OS_SLICE% rv:65.0) Gecko/20100101 Firefox/65.0
    Mozilla/5.0 (%OS_SLICE% rv:102.0) Gecko/20100101 Firefox/102.0

    Neither of these two strings work for me.

  8. @roytam1 I want to thank you (once again) for maintaining NM28 for WinXP. Ever since I found out about and started using NM27 and later NM28, whenever I wanted to buy something online, I had to resort to my Android phone, because my bank website (extra security and high-tech features, of course) didn't work... until recently! Last week I found out, obviously because of lots of fixes, updates and maybe even hacks, my bank website did finally work after all this time. Much appreciated!

    On 8/12/2023 at 11:37 AM, NotHereToPlayGames said:

    Been blocking [CSS Animations] for years.  :thumbup

    I've never messed with stuff like this, but my pc also gets nearly unresponsive for sites like reddit, or (from the top of my head) instagram and pinterest. So how do I go about this? Do I need an add-on for this?

  9. @roytam1 It appears Marktplaats, the Dutch Ebay so to speak, has changed some things in the background, because with palemoon-28.10.6a1.win32-git-20230603-d849524bd-uxp-765a6434c-xpmod-sse, when you do any search at all, like this one, the processing "hourglas" (or rather 3 dots in this case) will animate forever. The strange thing is that the Error Console doesn't report anything. One or two weeks ago this website worked just fine.

  10. On 5/14/2023 at 9:54 AM, cmalex said:

    How did You checking the presence of packages? It's exists - http://cygwinxp.cathedral-networks.org/noarch/release/cygport/

    I'd install Cygwin using setup-x86-2.874.exe via runme.bat from  http://cygwinxp.cathedral-networks.org/cathedral/

    Oh, I understand now. Back when I cloned rdp's repo I've left the cygwin installer command practically untouched, which only installs a portion of all the packages. So no wonder it can't find cygport.

    On 5/15/2023 at 8:56 PM, cmalex said:

    Under Cygwin for XP even 3.9.16 work fine (but i didn't try without SSE2! Only in virtual system).

    Thanks for you effort, but I've settled with v3.4.10, which is good enough for me. I've bunched all the necessary patches into one and ultimately these patches proved to be the solution for this thread to get me working Python3 Cygwin install.

    On 5/15/2023 at 8:56 PM, cmalex said:

    Part 2 Cygwin rebaseall. Prepare files for Cygwin rebase

    find /bin /lib /usr -iname '*.so' > /tmp/to_rebase.lst
    find /bin /lib /usr -iname '*.dll' >> /tmp/to_rebase.lst

    Close all Cygwin terminals and programs and run as Admin Cygwin/bin/ash.exe

    /bin/rebaseall -T /tmp/to_rebase.lst

    I'm unfamiliar with the term "rebase" in this case. What does it do and why is it needed?

    On 5/14/2023 at 9:54 AM, cmalex said:

    Offtopic - Do You have in plans to adding brotli, zstd and nghttp2/nghttp3 support to curl?

    No. Honoustly, I can't even remember why I started compiling and uploading Curl binaries in the first place. If I want to download something, then I'll use the Palemoon browser and if I want to scrape / extract something, then I'll use Xidel.

  11. Hello cmalex,

    On 5/12/2023 at 6:42 PM, cmalex said:

    At first look - strange problem in Makefile
    [...]
    Please try to replace "$(VERSION)" with "$(LDVERSION)" in 655 string of Makefile or 641 of Makefile.pre.in

    Thanks. That solves that issue, but the next issue is that it fails to build ALL modules:

    building '...' extension
    [...]
    /usr/lib/gcc/i686-pc-cygwin/5.4.0/../../../../i686-pc-cygwin/bin/ld: cannot find -lpython3.4
    collect2: error: ld returned 1 exit status
    
    [...]
    Failed to build these modules:
    _bisect               _codecs_cn            _codecs_hk
    _codecs_iso2022       _codecs_jp            _codecs_kr
    _codecs_tw            _crypt                _csv
    _ctypes               _ctypes_test          _datetime
    _decimal              _elementtree          _heapq
    _json                 _lsprof               _md5
    _multibytecodec       _multiprocessing      _opcode
    _pickle               _posixsubprocess      _random
    _sha1                 _sha256               _sha512
    _socket               _struct               _testbuffer
    _testcapi             _testimportmultiple   array
    audioop               binascii              cmath
    fcntl                 grp                   math
    mmap                  parser                pyexpat
    resource              select                syslog
    termios               time                  unicodedata
    xxlimited             zlib

     

    On 5/12/2023 at 6:42 PM, cmalex said:

    Package "python3" is a python 3.4.3 with a bunch of patches (look at source package). http://cygwinxp.cathedral-networks.org/x86/release/python3/

    Wow, great find! Seeing so many patches are necessary for Cygwin, it's no wonder I'm having so much difficulty. I would've never been able to solve this on my own.

    At the moment I have this working procedure in my (local) script:

    build_python() {
      download_and_unpack_file http://cygwinxp.cathedral-networks.org/x86/release/python3/python3-3.4.3-1-src.tar.xz python3-3.4.3-1.src
      cd python3-3.4.3-1.src
        #cygport python3.cygport all   # cygport is not available with Cygwin 2.874.
        if [ ! -f "Python-3.4.3_unpacked.successfully" ]; then
          echo -e "\e[1;33mUnpacking 'Python-3.4.3.tar.xz'.\e[0m"
          tar -xf "Python-3.4.3.tar.xz" || exit 1
          touch "Python-3.4.3_unpacked.successfully" || exit 1
          rm "Python-3.4.3.tar.xz" || exit 1
        fi
        if [ ! -f "patch_path-correction.done" ]; then
          sed -r -i "s/(orig)?src\/Python-[0-9\.]*\///" *.patch
          touch "patch_path-correction.done" || exit 1
        fi
        cd Python-3.4.3
          apply_patch ../python3-3.4.3-1.src.patch
          apply_patch ../3.4-dbm-cygwin.patch
          apply_patch ../3.1-enable-new-dtags.patch
          apply_patch ../3.4-tkinter-cygwin.patch
          apply_patch ../3.4-ctypes-cygwin.patch
          apply_patch ../3.1-PATH_MAX.patch
          apply_patch ../3.1-ncurses-abi6.patch
          apply_patch ../3.2-export-PySignal_SetWakeupFd.patch
          apply_patch ../3.4-distutils-soname.patch
          apply_patch ../3.2-distutils-shlibext.patch
          apply_patch ../3.4-pep3149-cygwin.patch
          apply_patch ../3.4-thread-cygwin64.patch
          ac_cv_func_bind_textdomain_codeset=yes do_configure --prefix=/usr --enable-shared --enable-ipv6 --with-dbmliborder=gdbm --with-libc= --with-libm= --with-system-expat --with-system-ffi --without-ensurepip   # 'configure'-options from '../python3.cygport'.
          do_make install
        cd ..
      cd ..
    }

    At first I saw this 'python3.cygport' file. After some reading I realized that with an internal tool called "cygport" I could automatically compile and install the whole Python release, BUT I soon found out that Cygwin 2.874 (the latest WinXP compatible version) doesn't even have this tool. For a website that hosts this latest WinXP compatible Cygwin release I find that really strange. Guess I'll have to do it myself after all.

    I've had a look at these patches (I really don't know what they're for, but they're probably necessary) and found out that you won't need '3.2-getpath-exe-extension.patch' and '3.4-select-cygwin.patch' if you're already starting off with 'python3-3.4.3-1.src.patch'.
    Next I've added the 'configure'-options from 'python3.cygport'. In the end this produced a working Python3 Cygwin install! :cheerleader:

    On 5/12/2023 at 6:42 PM, cmalex said:

    UPD2: With patches from 3.4.3 (last - python3-3.4.3-1.src.patch - must be applued with "-f") 3.4.10 compiles and works under Cygwin.

    `patch --force` you mean? Nice to see you got it working for v3.4.10. I'll have a look at it soon.
    What 'configure'-options did you use?

  12. 21 hours ago, cmalex said:

    Please remove python39._pth and try yt-dlp.exe once more.

    I feel like such an id*** for not respecting the last line of your simple batch-file. That works. Thanks!

    21 hours ago, cmalex said:

    Sorry... It turned out that I have different versions of the files in different places...

    Don't be sorry. It's something you couldn't have known. It's just a warning for other users.

    21 hours ago, cmalex said:

    And can i ask You to publish at least  one lastest dev files for Your's OpenSSL and FFMpeg shared (includes and lib)?

    I hope openssl-3.1.0-win32-dev-xpmod-sse.7z would suffice. And FFmpeg: ffmpeg-6.1-588-4006c71-win32-dev-xpmod-sse.7z.

    21 hours ago, cmalex said:

    Why do You need exactly 3.4.10? Official 3.4.4 work perfectly without SSE2.

    On 1/8/2023 at 12:07 AM, Reino said:

    Looking at https://www.python.org/downloads/windows/ you'll see it doesn't mention "Note that Python 3.4.10 cannot be used on Windows XP or earlier.", so I guess it's the latest official Windows XP compatible release.

     

    21 hours ago, cmalex said:

    Under MSYS i'd just add python folder to PATH variable (in form of "/d/Programs/Python3.4.4").

    I'm not using MSYS. I'm using Cygwin Bash, which all started like this.
    A win32 Python installation won't work, because it (the 'python.exe') can't open Unix format paths, so I have to compile it from source.

    21 hours ago, cmalex said:

    Can You please give full Makefile, config.log and config.status?

    Python-3.4.10_config-files.7z

  13. 18 hours ago, cmalex said:

    Look like You had run python before folder renaming. Just remove recursively all *.pyc files and/or __pycache__ folders from Lib folder.

    That's right and that fixes it. Thanks.

    18 hours ago, cmalex said:

    I'm sorry, I forgot to mention that the python39._pth should be located near python.exe.  So i wrote bat to run from python folder...

    And if error "ModuleNotFoundError: No module named '_distutils_hack'" appeared - please try to upgrade pip and setuptools -

    python -m pip install -U pip setuptools

    I've ran your little batch-file from within 'C:\Program Files\Essentials\Python39\' and 'python39._pth' now looks like:

    C:\Program Files\Essentials\Python39
    .
    Lib
    Lib/site-packages

    Next...

    C:\Program Files\Essentials\Python39>python -m pip install -U pip setuptools
    Requirement already satisfied: pip in c:\program files\essentials\python39\lib\site-packages (23.1.2)
    Requirement already satisfied: setuptools in c:\program files\essentials\python39\lib\site-packages (67.6.0)
    Collecting setuptools
      Using cached setuptools-67.7.2-py3-none-any.whl (1.1 MB)
    Installing collected packages: setuptools
      Attempting uninstall: setuptools
        Found existing installation: setuptools 67.6.0
        Uninstalling setuptools-67.6.0:
          Successfully uninstalled setuptools-67.6.0
    Successfully installed setuptools-67.7.2
    
    C:\Program Files\Essentials\Python39>python -m pip install -e "D:\Storage\Media\Binaries\yt-dlp_git"
    Obtaining file:///D:/Storage/Media/Binaries/yt-dlp_git
      Installing build dependencies ... done
      Checking if build backend supports build_editable ... done
      Getting requirements to build editable ... done
      Installing backend dependencies ... done
      Preparing editable metadata (pyproject.toml) ... done
    Requirement already satisfied: mutagen in c:\program files\essentials\python39\lib\site-packages (from yt-dlp==2023.3.4) (1.46.0)
    Requirement already satisfied: pycryptodomex in c:\program files\essentials\python39\lib\site-packages (from yt-dlp==2023.3.4) (3.17)
    Requirement already satisfied: websockets in c:\program files\essentials\python39\lib\site-packages (from yt-dlp==2023.3.4) (11.0.2)
    Requirement already satisfied: certifi in c:\program files\essentials\python39\lib\site-packages (from yt-dlp==2023.3.4) (2022.12.7)
    Requirement already satisfied: brotli in c:\program files\essentials\python39\lib\site-packages (from yt-dlp==2023.3.4) (1.0.9)
    Building wheels for collected packages: yt-dlp
      Building editable for yt-dlp (pyproject.toml) ... done
      Created wheel for yt-dlp: filename=yt_dlp-2023.3.4-0.editable-py2.py3-none-any.whl size=47819 sha256=445d73e5e3b9059666921bff5b0959db44e017eacba8fe029a6ae09d3c57dbf2
      Stored in directory: C:\DOCUME~1\Admin\LOCALS~1\Temp\pip-ephem-wheel-cache-yx6zbvri\wheels\46\b0\a5\bd49c961a5d74be392b5155310a656db3ad66862420fc9ba49
    Successfully built yt-dlp
    Installing collected packages: yt-dlp
      Attempting uninstall: yt-dlp
        Found existing installation: yt-dlp 2023.3.4
        Uninstalling yt-dlp-2023.3.4:
          Successfully uninstalled yt-dlp-2023.3.4
    Successfully installed yt-dlp-2023.3.4

    But then...

    C:\Program Files\Essentials\Python39>yt-dlp
    Traceback (most recent call last):
      File "C:\Program Files\Essentials\Python39\Lib\runpy.py", line 197, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "C:\Program Files\Essentials\Python39\Lib\runpy.py", line 87, in _run_code
        exec(code, run_globals)
      File "C:\Program Files\Essentials\Python39\Scripts\yt-dlp.exe\__main__.py", line 4, in <module>
    ModuleNotFoundError: No module named 'yt_dlp'

    If '__main__.py' is now hard linked to 'D:\Storage\Media\Binaries\yt-dlp_git\yt_dlp\__main__.py', I don't understand why 'yt-dlp.exe' doesn't work.

    22 hours ago, Reino said:

    After having added 'C:\Program Files\Essentials\Python39\' and 'C:\Program Files\Essentials\Python39\Scripts' to %PATH%, it works.

    Initially I've added these 2 maps at the beginning of %PATH%...

    C:\>ECHO %PATH:;= & ECHO.%
    C:\Program Files\Essentials\Python39\
    C:\Program Files\Essentials\Python39\Scripts
    C:\WINDOWS\system32
    C:\WINDOWS
    [...]
    D:\Storage\Media\Binaries\DLLs

    ...but that caused some issues with Xidel. On WinXP I have to use the OpenSSL variant of Xidel if I want to open urls, in which case it will need 'libcrypto-3.dll' and 'libssl-3.dll' (or 'libcrypto-1_1.dll' and 'libssl-1_1.dll' from the older OpenSSL release) with zlib support(!), somewhere in %PATH% (in my case in 'D:\Storage\Media\Binaries\DLLs').

    Your Python39 archive also comes with these OpenSSL dlls, but presumably without zlib support, so I had to prioritize 'D:\Storage\Media\Binaries\DLLs' and move it in front of the Python39 maps.

    Did you compile everything in your Python39 archive yourself? If so, do you think you'll be able to help me out with this issue? :rolleyes:

  14. On 5/8/2023 at 8:38 PM, nicolaasjan said:

    Does that also mean you will stop providing FFmpeg builds for XP? :o

    As long as this computer works, I'll probably keep on compiling FFmpeg, or at least I'll try to. No promises though.

    On 5/8/2023 at 10:48 PM, cmalex said:

    1. You can use cmd

    python -m yt_dlp %*

    After having added 'C:\Program Files\Essentials\Python39\' and 'C:\Program Files\Essentials\Python39\Scripts' to %PATH%, it works. Thanks.

    D:\Storage\Media\Binaries\yt-dlp_git>python -m yt_dlp --version
    D:\Storage\Media\Binaries>python "yt-dlp_git\yt_dlp\__main__.py" --version
    2023.03.04

     

    On 5/8/2023 at 10:48 PM, cmalex said:

    2. You can reinstall to aquire yt-dlp.exe file in Scripts folder (linked to full python path, so You can place it everywere)

    python -m pip install yt-dlp --no-deps -I

    That works too. I don't have much experience with Python, so if I understand correctly this 'yt-dlp.exe' it creates in the Scripts-dir (which is really small in size) is a module binary and is a sort of shortcut method (and hardcoded to that "site-packages\yt-dlp"-dir, which it will always depend on) to be able to quickly run yt-dlp, right?

    On 5/8/2023 at 10:48 PM, cmalex said:

    3. You can install it from folder (for example - local git repo "d:\git\yt-dlp\" ) with pip as editable. But there some strange with paths. It need python39._pth (as portable) with full path to this dir during install. Then You need to remove this file.

    I've tried that. First by removing the already installed package:

    python -m pip uninstall yt-dlp

    Then by running that bat-file:

    D:\Storage\Media\Binaries\yt-dlp_git>cd /d "D:\Storage\Media\Binaries\yt-dlp_git\"
    D:\Storage\Media\Binaries\yt-dlp_git>echo D:\Storage\Media\Binaries\yt-dlp_git  1>python39._pth
    D:\Storage\Media\Binaries\yt-dlp_git>echo . 1>>python39._pth
    D:\Storage\Media\Binaries\yt-dlp_git>echo Lib 1>>python39._pth
    D:\Storage\Media\Binaries\yt-dlp_git>echo Lib/site-packages 1>>python39._pth
    D:\Storage\Media\Binaries\yt-dlp_git>python -m pip install -e "D:\Storage\Media\Binaries\yt-dlp_git"
    Obtaining file:///D:/Storage/Media/Binaries/yt-dlp_git
      Installing build dependencies ... error
      error: subprocess-exited-with-error
    
      × pip subprocess to install build dependencies did not run successfully.
      ¦ exit code: 2
      ?-> [1 lines of output]
          C:\Program Files\Essentials\Python39\python.exe: can't open file 'C:\Program Files\Essentials\yt-dlp_py39\Lib\site-packages\pip': [Errno 2] No such file or directory
          [end of output]
    
      note: This error originates from a subprocess, and is likely not a problem with pip.
    error: subprocess-exited-with-error
    
    × pip subprocess to install build dependencies did not run successfully.
    ¦ exit code: 2
    ?-> See above for output.
    
    note: This error originates from a subprocess, and is likely not a problem with pip.

    As you can see I've extracted your archive to 'C:\Program Files\Essentials\Python39', but it looks as though "yt-dlp_py39" is hardcoded somewhere.

  15. Hello cmalex,

    19 hours ago, cmalex said:

    My main comp also doesn't have SSE2 support (SL-75KAV + AthlonXP 2000+).

    AMD Athlon XP 3200+ on an ASUS A7N8X-E Deluxe here. ;)
    Because of a highly optimized WinXP iso, created with nLite (and the reason why I joined this forum years ago), I was able to postpone the purchase of a new pc for a lot of years. This year I do plan to finally buy a new one though. I've always had oldschool tower (computer case) pcs, but this time I will definitely buy an AMD Phoenix APU mini-pc when I can find a good deal.

    19 hours ago, cmalex said:

    I see Python binaries and libraries (without an installer), but no yt-dlp. Or do I misunderstand?

    19 hours ago, cmalex said:

    PS. A thousand thanks to You for Your non-SSE2 builds and Xidel discussions and examples.

    You're welcome. And nice to see some other Xidel users.

  16. 19 hours ago, VistaLover said:

    The second link will fetch a yt-dl build with (experimental) "Lazy Extractors" support turned ON

    What are "lazy extractors"?

    13 hours ago, nicolaasjan said:

    (here is a test build).

    Thanks, but yt-dlp doesn't work on my non-SSE2 cpu.

    13 hours ago, nicolaasjan said:

    What makes you think that? There are still occasional commits and building from source still works.

    Occasional commits indeed, mostly by 1 person. Youtube-dl's main developers abandoned the project (2 years ago?). The question is how long dirkf will keep this up.

  17. With one little difference though compared to my previous release. Thanks for mentioning.

    Btw, your youtube-dl url in your sig is first of all dead, but also links to a yt-dlp archive.

    On 3/12/2023 at 9:58 AM, loblo said:

    Youtube-dl still supports as low as python 2.6 and there is no sign this is going to change so there is not too much to worry about for xp users IMO. You can always fall back on it whatever happens with the dlp fork.

    If I may be so bold (and a bit off-topic)... One day will come when yt-dlp loses compatible with WinXP, while at the same time youtube-dl won't be updated anymore. For WinXP users with old hardware an alternative could then be my own simple Youtube-extractor, which is part of an XQuery function module for the command-line tool Xidel (an XML/HTML/JSON parser).

    It's a simple extractor, in the sense that it doesn't support age-gated-videos. You'd still need youtube-dl for that. But for "normal" videos it works absolutely fine and because it doesn't depend on Python it's multitudes faster (on my old system). The extractor uses the Android API call, which means there's no bandwidth-throttling or a need to decrypt a signature.

    On 2/28/2023 at 3:54 PM, nicolaasjan said:
    yt-dlp -f 22 https://www.youtube.com/watch?v=ppojLHm-Z1I

    The most basic call for this Youtube video would be...

    xidel.exe -s --module=xivid.xqm -e "xivid:youtube('https://www.youtube.com/watch?v=ppojLHm-Z1I')"
    xidel.exe -s --module=xivid.xqm -e "xivid:youtube('ppojLHm-Z1I')"

    ...which returns a JSON with all the different audio- and video formats.

    My old computer is too slow to watch Youtube videos in-browser, so personally I use the following command A LOT to directly watch a Youtube video (the itag 22 variant in this case) with Media Player Classic - Home Cinema (utilizing the gpu instead of the cpu):

    FOR /F "delims=" %A IN ('
      xidel -s --module=xivid.xqm -e "xivid:youtube('ppojLHm-Z1I')/(formats)()[starts-with(id,'pg')][last()]/url"
    ') DO @"C:\Program Files\Media\MPC-HC.1.7.11.24.x86\mpc-hc.exe" %A /close

     

  18. [off-topic]
    For simple progressive videos, sure:

    xidel "https://url-to/video.mp4" --download .

    The Youtube-url you mention is a program-url and not a direct video-url. You have to recover that video-url first.

    As it just so happens, I've created my own Youtube extractor for my hobby-project Xivid (a function module for Xidel). The most basic usage would be:

    xidel -s --module=xivid.xqm -e "xivid:youtube('https://www.youtube.com/watch?v=dQw4w9WgXcQ')"

    This returns a JSON with the direct video-urls of all the different formats it can find. For the DASH-formats you'll need FFmpeg, so with Xidel you'll only be able to download the "pg-1", "pg-2" and "pg-3" formats directly. If you want to download the 720p variant, you could do for example:

    xidel -s --module=xivid.xqm -e "()" -f "xivid:youtube('dQw4w9WgXcQ')/(formats)()[id='pg-3']/url" --download "Rick Astley - Never Gonna Give You Up (Official Music Video).mp4"

    [/off-topic]

×
×
  • Create New...