Jump to content

Python 3.5 Runtime Redistributable backported to XP


FranceBB

Recommended Posts

Not sure what's going on with 'pip install theano'. It worked for me (or seemed to). Maybe a Python expert can chime in?

On the second screen shot, try executing each 'pip install' command separately; i.e., 'pip install -U conda', 'pip install numpy', etc. Some of these don't seem to exist, but others installed fine for me.

Link to comment
Share on other sites


I was able to get past the crash in tornado by installing an older version:

pip uninstall tornado
pip install tornado==5.1.1

... but now I'm getting a crash in zmq! Seems to be looking to link libzmq.lib. I'm not sure that lib can even be built on Win XP.

Link to comment
Share on other sites

On 3/11/2019 at 3:49 PM, Mathwiz said:

Trying to build it now. Despite the fact that I'm building on WinXP, I still had to explicitly tell it to build for WinXP:


perl Configure VC-WIN32 -D_WIN32_WINNT=0x0501

Without the -D just about every test failed; apparently the stupid Configure script just assumes Win 7+ rather than grabbing the version it's actually running on :rolleyes:. That may explain why so many of the "compatible with XP" builds aren't actually compatible with XP.

Edit: Final (apparently XP-compatible) build of OpenSSL v1.1.1b is about 3 MB when written to a .7z archive file. You can download it from my company's Web site.

New openssl v1.1.1c for XP available! lib*_static.lib files are included now, so the .7z files for both versions are now about 5.6 MB each.

Link to comment
Share on other sites

3 hours ago, Mathwiz said:

New openssl v1.1.1c for XP available! lib*_static.lib files are included now

Thank you that you made the effort because openssl v1.1.1c for XP. With the files libcrypto_static.lib and libssl_static.lib (renamed libcrypto.lib and libssl.lib) it worked this time and no dll's of the bin directory are needed anymore. :thumbup

cryptography 2.7 module with OpenSSL -1.1.1c (thanks to @Mathwiz) for Python 3.4.4 on WXP, I have tested so far with the following modules:

altgraph==0.16.1
appdirs==1.4.3
asn1crypto==0.24.0
cffi==1.12.3
colorama==0.4.1
cryptography==2.7
future==0.17.1
idna==2.8
macholib==1.11
packaging==19.0
pefile==2019.4.18
pyasn1==0.4.5
pycparser==2.19
PyInstaller==3.4
pyOpenSSL==19.0.0
pyparsing==2.4.0
PySocks==1.7.0
pywin32==221
pywin32-ctypes==0.2.0
six==1.12.0
urllib3==1.25.3
 

For Installing:

Uninstall the older cryptography module beforehand (pip uninstall cryptography), then simply unpack the two directories in the python directory
python34\lib\site-packages.

Download

Note:
The manually installed cryptography module can be uninstalled the usual way (pip uninstall cryptography)!

One more note, unfortunately it did with v1.5 ProxHTTPSProxyMII not worked with TLS 1.3. Furthermore, it is questionable in how far the script of ProxHTTPSProxyMII v1.5 already supports TLS 1.3.

:)

Edited by heinoganda
Link to comment
Share on other sites

  • 3 months later...

Sorry to interfere, but what about the Streamlink project? It also does not work officially under XP, but I managed to build and run it. The problem is that FFMpeg with OpenSSL support is required for normal operation. I know that @Reino regularly builds FFMPeg for XP and even tried the FFMpeg buildscript that @Reino created. But unfortunately, all executable files are compiled by default without OpenSSL support and I don’t know how to enable this option when compiling from a script. Would you recommend something? Thanks a lot.

Link to comment
Share on other sites

I'm not familiar with Streamlink, but I can't find anything on that website about OpenSSL being a requirement for FFmpeg to open https-urls. Do my binaries (with MbedTLS) not work?

I understand Streamlink is a similar project as Youtube-dl and my own Xivid. May I ask what video from what website you're trying to watch/download?

Anyway, if you still would like to compile FFmpeg with OpenSSL, then this should do I guess:

diff --git a/build_locally_with_various_option_prompts.bat b/build_locally_with_various_option_prompts.bat
index a4cdb6a..76a4c92 100755
--- a/build_locally_with_various_option_prompts.bat
+++ b/build_locally_with_various_option_prompts.bat
@@ -40,14 +40,7 @@ IF NOT EXIST cygwin_local_install (
 ENDLOCAL
 SET PATH=%cd%\cygwin_local_install\bin;%PATH%
 
-ECHO.
-SET /P "static=Would you like to build static FFmpeg binaries [Y/n]?"
-ECHO.
-IF /I "%static%"=="n" (
-	bash.exe -c "./cross_compile_ffmpeg.sh --build-ffmpeg-static=n %2 %3 %4 %5 %6 %7 %8 %9"
-) ELSE (
-	bash.exe -c "./cross_compile_ffmpeg.sh %1 %2 %3 %4 %5 %6 %7 %8 %9"
-)
+bash.exe -c "./cross_compile_ffmpeg.sh %1 %2 %3 %4 %5 %6 %7 %8 %9"
 
 ECHO.
 ECHO Done with local build. Check output above to see if successfull.
diff --git a/ffmpeg_local_builds/cross_compile_ffmpeg.sh b/ffmpeg_local_builds/cross_compile_ffmpeg.sh
index 6db6a09..38326a1 100755
--- a/ffmpeg_local_builds/cross_compile_ffmpeg.sh
+++ b/ffmpeg_local_builds/cross_compile_ffmpeg.sh
@@ -1154,11 +1154,11 @@ build_ffmpeg() {
     sed -i.bak "/enabled libfdk_aac/s/&.*/\&\& require_headers fdk-aac\/aacenc_lib.h/;/require libfdk_aac/,/without pkg-config/d;/    libfdk_aac/d;/    libflite/i\    libfdk_aac" configure # Load 'libfdk-aac-1.dll' dynamically.
   fi
   init_options="--arch=x86 --target-os=mingw32 --cross-prefix=$cross_prefix --pkg-config=pkg-config --pkg-config-flags=--static --extra-version=Reino --enable-gray --enable-version3 --disable-debug --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-w32threads"
-  config_options="$init_options --enable-avisynth --enable-frei0r --enable-filter=frei0r --enable-gmp --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --extra-cflags=-DCACA_STATIC --enable-libfdk-aac --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenmpt --enable-libopus --enable-librubberband --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --extra-cflags=-DLIBTWOLAME_STATIC --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzvbi --enable-mbedtls"
+  config_options="$init_options --enable-avisynth --enable-frei0r --enable-filter=frei0r --enable-gmp --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --extra-cflags=-DCACA_STATIC --enable-libfdk-aac --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenmpt --enable-libopus --enable-librubberband --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --extra-cflags=-DLIBTWOLAME_STATIC --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzvbi"
   # 'configure' needs '--extra-cflags=-DCACA_STATIC ' for libcaca. Otherwise you'll get "undefined reference to `_imp__caca_create_canvas'" and "ERROR: caca not found using pkg-config".
   # 'configure' needs '--extra-cflags=-DLIBTWOLAME_STATIC' for libtwolame. Otherwise you'll get "undefined reference to `_imp__twolame_init'" and "ERROR: libtwolame not found". 'twolame.pc' does contain "Cflags.private: -DLIBTWOLAME_STATIC" nowadays, but pkg-config doesn't support this entry.
   if [[ "$non_free" = "y" ]]; then
-    config_options+=" --enable-nonfree --enable-decklink"
+    config_options+=" --enable-nonfree --enable-openssl"
     # Other possible options: '--enable-openssl'.
   fi
   for i in $CFLAGS; do
@@ -1228,10 +1228,9 @@ build_dependencies() {
   build_fontconfig
   build_gmp # For RTMP support configure FFmpeg with --enable-gmp.
   build_mbedtls # For HTTPS TLS 1.2 support on WinXP configure FFmpeg with --enable-mbedtls.
-  #if [[ "$non_free" = "y" ]]; then # Nonfree alternative to MbedTLS.
-  #  build_openssl-1.0.2
-  #  build_openssl-1.1.1
-  #fi
+  if [[ "$non_free" = "y" ]]; then # Nonfree alternative to MbedTLS.
+    build_openssl-1.1.1
+  fi
   build_libogg
   build_libvorbis
   build_libopus
@@ -1261,9 +1260,9 @@ build_dependencies() {
   build_libmysofa # Needed for FFmpeg's SOFAlizer filter (https://ffmpeg.org/ffmpeg-filters.html#sofalizer).
   build_frei0r
   build_libcaca
-  if [[ "$non_free" = "y" ]]; then
-    build_libdecklink
-  fi
+  #if [[ "$non_free" = "y" ]]; then
+  #  build_libdecklink
+  #fi
   build_zvbi
   build_fribidi
   build_libass

Next run:

build_locally_with_various_option_prompts.bat --build-ffmpeg-static=y --disable-nonfree=n

 

Link to comment
Share on other sites

On 9/8/2019 at 1:30 PM, -SnooPY- said:

what about the Streamlink project? It also does not work officially under XP, but I managed to build and run it.

Hello :) ; I am indeed quite familiar with that project, though running it on Vista SP2 32-bit, for which minimal official support does exist (but the lead developer there is quite keen on axing Vista support soon... :angry: ); as far as I'm aware, the app is just a Python script that does support Python versions 2.7.x and upwards - Python 2.7.16 to 3.4.4 is, as you may already know, XP compatible, so one just has to install Python and then install SL via pip (which will also fetch all needed dependencies).

On 9/8/2019 at 1:30 PM, -SnooPY- said:

The problem is that FFMpeg with OpenSSL support is required for normal operation.

How so? In most cases, SL uses native Python libraries/dependencies to extract stream URIs from pages and then either feed (stream) them to a media player of choice (I think the current default is VLC, but they are keen on switching to mpv (no longer XP+Vista compatible :angry: ) or save them to disk; in most cases, FFmpeg is just being used as a muxing application, to place elementary (raw) streams into a media container (usually Matroska) that can be handled by the player's input API...

Please provide examples where FFMpeg+OpenSSL support is required for normal operation. ;)

On 9/8/2019 at 1:30 PM, -SnooPY- said:

I know that @Reino regularly builds FFMPeg for XP

FWIW, the provided FFmpeg binaries have been compiled with --enable-mbedtls, mbedtls being a rebrand of PolarSSL; it is a crypto open source library able to handle all the tasks managed by its OpenSSL counterpart... 

On 9/8/2019 at 1:30 PM, -SnooPY- said:

But unfortunately, all executable files are compiled by default without OpenSSL support and I don’t know how to enable this option when compiling from a script.

OpenSSL has a restrictive (non-free) license, so builds with it enabled statically can't be redistributed; using a build script to build custom binaries one will use on one's own machines, it is necessary to configure the build script with "--enable-nonfree --enable-openssl" (that's what I had to do with the media-autobuild_suite when it was still Vista 32-bit compatible - ca. spring 2017); @Reino does provide openssl win32 binaries in

https://rwijnsma.home.xs4all.nl/files/other/

perhaps when placed alongside his FFmpeg binaries, they are being loaded in a dynamic fashion? (Added later:... probably NOT - just misled by the behaviour of the libfdk-aac DLLs... :blushing: )

EDIT: When I started composing this post, @Reino's reply wasn't live; thanks :thumbup for the detailed info there...

Edited by VistaLover
Link to comment
Share on other sites

5 hours ago, Reino said:

I'm not familiar with Streamlink, but I can't find anything on that website about OpenSSL being a requirement for FFmpeg to open https-urls. Do my binaries (with MbedTLS) not work?

You are absolutely right, this is clearly not mentioned anywhere. I want to emphasize what I think the problem is the lack of OpenSSL support. Of course, I could be wrong. Yesterday I tried to watch the live broadcast from Facebook: https://www.facebook.com/snookernews2u/videos/418828755653697 And got a 404 error.
Today the situation is different. Now it’s not a live broadcast and stream coding "on the fly" through FFMpeg just doesn’t happen:

[cli] [info] Found matching facebook plugin for URL https://www.facebook.com/snookernews2u/videos/418828755653697/
[plugin.facebook] [error] Skipped DASH manifest with SegmentBase streams
[cli] [info] Available streams: sd (worst, best)
[cli] [info] Opening stream: sd (http)

Nevertheless, everything works fine, because FFMpeg is not used at all.

 

Link to comment
Share on other sites

cmd log:

D:\Storage\Media\Binaries>FOR /F "delims=" %A IN ('xivid.bat -f pg-1 "https://www.facebook.com/snookernews2u/videos/418828755653697"') DO FFmpeg\ffprobe-4.3-dev-327-g83e0b71-win32-static-xpmod-sse.exe -hide_banner -i "%A"

D:\Storage\Media\Binaries>FFmpeg\ffprobe-4.3-dev-327-g83e0b71-win32-static-xpmod-sse.exe -hide_banner -i "https://scontent.fams1-1.fna.fbcdn.net/v/t58.24163-6/10000000_3132632673445436_976815818309512751_n.mp4?_nc_cat=111&efg=eyJybHIiOjYwMSwicmxhIjo0MDk2LCJ2ZW5jb2RlX3RhZyI6InNkIn0=&_nc_oc=AQnzRjCSLAodz1hBWIehCEMKqMrxIeITIglbPiVjv3JQOqP2vy_tCAdv7ufQoo1Nl-Q&rl=601&vabr=334&_nc_ht=scontent.fams1-1.fna&oh=8660d1e982d33f21cac9c930bb4fa634&oe=5D76EB48"
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'https://scontent.fams1-1.fna.fbcdn.net/v/t58.24163-6/10000000_3132632673445436_976815818309512751_n.mp4?_nc_cat=111&efg=eyJybHIiOjYwMSwicmxhIjo0MDk2LCJ2ZW5jb2RlX3RhZyI6InNkIn0=&_nc_oc=AQnzRjCSLAodz1hBWIehCEMKqMrxIeITIglbPiVjv3JQOqP2vy_tCAdv7ufQoo1Nl-Q&rl=601&vabr=334&_nc_ht=scontent.fams1-1.fna&oh=8660d1e982d33f21cac9c930bb4fa634&oe=5D76EB48':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.41.100
  Duration: 03:00:49.49, start: 0.000000, bitrate: 334 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 640x360, 262 kb/s, 30 fps, 30 tbr, 16k tbn, 60 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (HE-AAC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 63 kb/s (default)
    Metadata:
      handler_name    : SoundHandler

Youtube-dl...

FOR /F "delims=" %A IN ('youtube-dl.exe -gf dash_sd_src "https://www.facebook.com/snookernews2u/videos/418828755653697"') DO FFmpeg\ffprobe-4.3-dev-327-g83e0b71-win32-static-xpmod-sse.exe -hide_banner -i "%A"

...produces the same url and FFprobe shows the same output.

As said before, my FFmpeg binaries are compiled with MbedTLS. You can FFprobe opens the https-url just fine.

I don't have Facebook myself, so I can't check on a livestream atm.

Link to comment
Share on other sites

4 hours ago, Reino said:

As said before, my FFmpeg binaries are compiled with MbedTLS. You can FFprobe opens the https-url just fine.

I don't have Facebook myself, so I can't check on a livestream atm.

I also can’t check any livestreams now. Perhaps, the results will be slightly different.  So far we can only state that any "non-DASH" streams work fine in all cases.

Thank you for your experiments, they were very useful. It became completely clear that the problem was most likely not in FFmpeg, not in OpenSSL, and not in mbedTLS. Good luck!

Link to comment
Share on other sites

  • 1 month later...
On 5/31/2019 at 1:23 PM, Mathwiz said:

New openssl v1.1.1c for XP available! lib*_static.lib files are included now, so the .7z files for both versions are now about 5.6 MB each.

OpenSSL v1.1.1d for XP is now available. Only a few minor fixes since v1.1.1c, so it may not be worth the trouble to rebuild Python's Cryptography module with it, but here it is anyway, just in case.

Link to comment
Share on other sites

  • 2 weeks later...

Somebody tried to run under XP FontForge - free font editor (via One-Core-API project, of course)? I am interested in Python fontforge.pyd module, but it fails with the following error:

Python 2.7.16 (default, Mar  7 2019, 06:52:08)  [GCC 7.4.0 32 bit] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import fontforge
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: DLL load failed: The specified procedure could not be found.
>>>

Dependency Walker log:

LoadLibraryExA("c:\program files\fontforgebuilds\lib\python2.7\site-packages/fontforge.pyd",
0x00000000, LOAD_WITH_ALTERED_SEARCH_PATH) returned NULL. Error: The specified procedure could not be found (127).

I read in MSDN about LoadLibraryExA function and decided that an error is likely due to unsupported in XP LOAD_WITH_ALTERED_SEARCH_PATH flag.
I also looked into One-Core-API project sources, but unfortunately did not understand how function LoadLibraryExA should work if LOAD_WITH_ALTERED_SEARCH_PATH flag is nevertheless set.

I suppose that we need some kind of workaround to this case - https://github.com/Skulltrail192/One-Core-Api/blob/93711e91694b6c1e7643d0092ed88f1e21f0cd94/dll/wrappers/base/kernel32_wrapper/module.c  ( line 360 ). I would like to hear your opinion on this issue. Thanks a lot.

Link to comment
Share on other sites

LOAD_WITH_ALTERED_SEARCH_PATH is supported in all Windows versions. However if HKLM\..\SafeDllSearchMode is 0, the current directory is searched before the System and Windows directories instead of after.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...