Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
2nd September 2020, 23:30 | #1 | Link |
Registered User
Join Date: Nov 2005
Posts: 705
|
Windows XP compatible non-SSE2 FFmpeg binaries
On Zeranoe's forum I had a topic where once every 4 months I would post new FFmpeg binaries that are Windows XP compatible and will work on old CPUs without SSE2 instruction sets (like my own AMD Athlon XP 3200+).
Because Zeranoe took down his forum not so long ago I thought I'd create a topic here on Doom9 in the hope some of you might still find these binaries useful. This all began end 2016 when (as far as I could tell) no one was willing to create WinXP- and old-CPU compatible FFmpeg binaries anymore. Windows XP doesn't support TLS 1.2 and the latest compatible FFmpeg binary back then couldn't open TLS 1.2 encrypted https-urls either, which a lot of websites started using. This was the main reason I wanted to see if I could compile my own FFmpeg binaries. With the help of a third-party cryptography-library (OpenSSL, GnuTLS, or MbedTLS) I could solve that issue. I had never compiled software before. In fact, it was literally my first encounter with Linux (Cygwin) Bash! But after my first attempts I forked Roger Pack's cross-compilation-script and the rest is history. Binaries: https://rwijnsma.home.xs4all.nl/files/ffmpeg/?C=M;O=D Github: https://github.com/Reino17/ffmpeg-windows-build-helpers My FFmpeg binaries are compiled with --enable-libfdk-aac, but they don't contain the actual code because of an incompatible license. You can download libfdk-aac separately here and put the dll-file in the same folder as 'ffmpeg.exe', or in any folder listed in the %PATH%-variable. This was made possible with the help of a patch created by Gianluigi Tiesi. My FFmpeg binaries are also compiled with --enable-frei0r. You can download frei0r video filtering plugins separately here and put the 'frei0r-1' folder in the same folder as 'ffmpeg.exe'. This was also made possible with the help of a patch created by Gianluigi Tiesi. Build-configuration: Code:
--arch=x86 --target-os=mingw32 --prefix=/cygdrive/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32 --cross-prefix=/cygdrive/[...]/cross_compilers/mingw-w64-i686/bin/i686-w64-mingw32- --extra-cflags='-O2 -march=pentium3 -mtune=athlon-xp -mfpmath=sse -msse' --pkg-config=pkg-config --pkg-config-flags=--static --extra-version=Reino --enable-gpl --enable-gray --enable-version3 --disable-bcrypt --disable-debug --disable-doc --disable-htmlpages --disable-manpages --disable-mediafoundation --disable-podpages --disable-txtpages --disable-w32threads --enable-avisynth --enable-frei0r --enable-filter=frei0r --enable-gmp --enable-libaom --enable-libass --enable-libfdk-aac --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libjxl --enable-libmp3lame --enable-libopenmpt --enable-libopus --enable-librubberband --enable-libsoxr --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-mbedtls Code:
FFmpeg buildscript: xz 5.4.6 --> 5.6.2 SDL2 2.30.3 --> 2.30.6 freetype 2.13.2 --> 2.13.3 mbedtls 2.28.8 --> 2.28.9 mpg123 1.32.6 --> 1.32.7 libopenmpt 0.7.6 --> 0.7.9 harfbuzz 8.4.0 --> 9.0.0 *git --> latest commit ffmpeg 7.1-596-5bc3b7f (N-115062) --> 7.1-2362-6aafe61 (N-116828) Optional external libraries for use with FFmpeg: frei0r-plugins 2.3.2-16-fdc9f32 --> 2.3.3-3-cbb507d
__________________
My hobby website Last edited by Reino; 1st September 2024 at 22:26. Reason: New binaries |
3rd September 2020, 02:47 | #2 | Link |
Registered User
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,103
|
Many thanks...
I already downloaded the new builds, also the new ffms2 C-plugin. Will start testing right away. And it is good to see you supporting your builds here at Doom9, should give you more visibility compared to the deceased Zeranoe forum. Cheers manolito |
3rd September 2020, 05:23 | #3 | Link |
Registered User
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,103
|
Sorry, no joy this time with both ffmpeg builds (static and shared)...
The new ffms2 build seems to work fine so far (only made two test encodes). But both ffmpeg builds crash immediately after calling them. I get the old error popup which is very familiar. No idea if it is WinXP, or if the missing SSE2 capability causes it. Cheers manolito |
3rd September 2020, 09:09 | #4 | Link |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 3,087
|
Sweet. I still gotta test the new builds, but just like I said on MSFN last year: Doom9 is the international encoding forum and pretty much everyone is here, so you're definitely gonna have more visibility than on the zeranoe's forum.
Anyway, thank you for the builds, I'll try them as soon as I get back home! |
3rd September 2020, 09:52 | #5 | Link |
Registered User
Join Date: Aug 2015
Posts: 311
|
The error text in english is probably this:
"The NtCreateFile API failed. This error should never be returned to an application, it is a place holder for the Windows Lan Manager Redirector to use in its internal error mapping routines" Also, found this: https://github.com/msys2/MINGW-packa...ment-479645419 |
3rd September 2020, 23:31 | #6 | Link | |
Registered User
Join Date: Nov 2005
Posts: 705
|
Hmm, this is very strange, because here on WinXP Pro SP3 my binaries run just fine.
Doing a search for "NtCreateFile" returns: Code:
[...]\i686-w64-mingw32\include\ddk\ntifs.h [...]\i686-w64-mingw32\include\winternl.h [...]\i686-w64-mingw32\lib\libntdll.a [...]\i686-w64-mingw32\lib\libntoskrnl.a Quote:
It could be that something else in the MinGW-w64 buildscript is causing this though.
__________________
My hobby website |
|
4th September 2020, 00:54 | #7 | Link | |
Registered User
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,103
|
Quote:
My system is absolutely standard, the CPU is an Intel Celeron Coppermine 1.1 GHz. If you need any more information, just let me know. For now I am back to the older version... BTW the new libfdk DLL works just fine with the older ffmpeg binary. Is it safe to use it, or are there any catches? |
|
4th September 2020, 16:04 | #8 | Link |
Registered User
Join Date: Nov 2005
Posts: 705
|
Maybe you could run the binary through Dependency Walker and see what it has to say.
I also came across "Bugs in NTDLL.dll of non-english editions of Windows® XP". This website claims - if I understand correctly - the issue you're experiencing could be a bug in 'NTDLL.dll' of your German Windows XP because of a specific security update.
__________________
My hobby website |
5th September 2020, 02:21 | #9 | Link |
Registered User
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,103
|
Did some more troubleshooting, this is what I found:
First of all FFMpeg, FFPlay and FFProbe all behave identical, they all display the same error message. My ancient desktop machine has been updated with the PosReady updates as long as they worked, no other software has problems with it. I have two other XP laptops which were not updated with the PosReady updates, and I tried to replace NTDLL.dll on my desktop with older versions of this file from the laptops. No luck, these older versions prevented the desktop computer from booting altogether with a WinLogon error. Then I used DependencyWalker on the desktop testing both the 4 months old build plus the new build. The results are here: https://www.sendspace.com/file/6cnfxq The old build also shows a couple of missing dependencies, but it does work. I then retrieved the other two XP laptops from the vault and tested the new FFmpeg build there. Both laptops were updated up to the last official XP updates, but no PosReady updates. The first laptop was an old Medion Netbook Akoya E1210 (made by MSI) with an Intel Atom CPU. SSE2 capable. This time FFmpeg also crashed, but the error message was different. This time it said that the application could not start because of a missing MFPlat.dll file. The other XP laptop was a Medion Akoya 96360 with an AMD Turion64 X2 CPU, also SSE2 capable. Same error as above. So these crashes have nothing to do with the SSE2 capability of the CPU, it is solely WinXP related. And I really wonder why these new binaries work on your AMD Athlon CPU... //EDIT// Could it be that your latest builds rely on some Windows Media Foundation functions which are not available under WinXP? Is it possible to remove the Media Foundation requirements from the build script? Last edited by manolito; 5th September 2020 at 03:41. |
5th September 2020, 10:29 | #10 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,011
|
No idea if anybody can make any sense out of below,
is KDiff of both results from dependency walker posted by Mani, Left is from older one "ffmpeg-4.3-3133-1128aa8-win32-static-xpmod-sse.dwi", right from newer "ffmpeg-4.4-853-276d86a-win32-static-xpmod-sse.dwi". At the end, older working one is cut off after new one exits with error. As Png files [for those that dont have kdiff or other installed] 1) 2) 3) 4) 5) EDIT: I missed out less interesting/matching sections. EDIT: Old one fails to find module QUSEREX.dll, new fails to find MFPLAT.dll. Quote:
uses these from MFPLAT.dll Code:
MFCreateAlignedMemoryBuffer MFCreateMediaType MFCreateSample MFShutdown MFStartup
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 5th September 2020 at 10:55. |
|
5th September 2020, 12:39 | #11 | Link | ||
Registered User
Join Date: Aug 2015
Posts: 311
|
From ffmpeg Changelog:
Quote:
Quote:
Then the obvious solution is to recompile it with --disable-mediafoundation option. |
||
5th September 2020, 13:05 | #12 | Link |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 3,087
|
Actually, I haven't experienced the same problems you guys are facing.
It might be because of several reasons, but on my computer it works like a charm: Screenshot Windows XP x86 all updates + POSReady Updates 'till June 2019 + custom kernel with PAE Enabled. My Intel Xeon CPU supports SSE, SSE2, SSSE3, SSE4.1, SSE4.2, though. I'm not sure whether the issues you guys are facing are related to your CPU instructions set or if it's due to the fact that I'm using One Core API (custom kernel with backported functions). Anyway, it works over here. Same goes for ffms2 C plugin which works like a charm. Last edited by FranceBB; 5th September 2020 at 13:11. |
5th September 2020, 13:37 | #13 | Link | ||
Registered User
Join Date: Nov 2005
Posts: 705
|
Hmm, this is getting weirder and weirder.
Quote:
As far as the "The NtCreateFile API failed"-error is concerned, it's really strange that only your German localized WinXP suffers from this. FranceBB, your WinXP is English (International)? I can't imagine any of the changes in 'cross_compile_ffmpeg.sh' are the cause of this, so this night I'll put my pc to work and revert gcc to 9.3.0 and maybe revert binutils and the others too. [edit] Here too: Code:
LoadLibraryA("C:\WINDOWS\system32\QUSEREX.DLL") called from "FFMPEG-4.4-853-276D86A-WIN32-STATIC-XPMOD-SSE.EXE" at address 0x01AEBA86. LoadLibraryA("C:\WINDOWS\system32\QUSEREX.DLL") returned NULL. Error: The specified module could not be found (126). GetProcAddress(0x00000000, "QueueUserAPCEx_Init") called from "FFMPEG-4.4-853-276D86A-WIN32-STATIC-XPMOD-SSE.EXE" at address 0x01AEB915 and returned NULL. Error: The specified procedure could not be found (127). GetProcAddress(0x77C10000 [MSVCRT.DLL], "___lc_codepage_func") called from "FFMPEG-4.4-853-276D86A-WIN32-STATIC-XPMOD-SSE.EXE" at address 0x0270D40E and returned 0x77C330F4. [/edit] Quote:
In 'ffbuild/config.log' I can indeed see mediafoundation=yes. Even though there's no reason not to autodetect MediaFoundation, because FFmpeg doesn't support WinXP anymore after all, it's really strange it is detected in my case. I guess I'll have to add --disable-mediafoundation.
__________________
My hobby website Last edited by Reino; 5th September 2020 at 13:46. |
||
5th September 2020, 22:48 | #15 | Link | |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 3,087
|
Yep. EN US (International).
I changed it in 2013 as I didn't like the localized one I had from 2001 to 2013 anymore and I wanted everything to be in English. (There's probably a post on MSFN buried somewhere in the XP section) Quote:
Anyway, thank you Reino and long live to XP. |
|
5th September 2020, 23:12 | #16 | Link |
Registered User
Join Date: Nov 2005
Posts: 705
|
I guess it was --disable-mediafoundation after all. So no need to revert anything in the MinGW-w64 buildscript.
I've recompiled and replaced all 3 FFmpeg archives, as well as FFMS2, just to be sure.
__________________
My hobby website |
6th September 2020, 00:40 | #17 | Link |
Registered User
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,103
|
Beautiful, your new builds work nicely...
FWIW you mentioned that you use a patch by Sherpya for your builds. Sherpya's FFmpeg builds used to be XP compatible on my ancient XP machine, but not any more. His latest build from June 2020 crashes right on startup with the same error popup as your build before the fix. Looks like for XP users your builds are now the only game in town... |
6th September 2020, 01:57 | #18 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,011
|
Big up to Reino, thanks very much
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
6th September 2020, 12:15 | #19 | Link |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,590
|
your build remind me of this
btw, is build for xp mean remove some of the features from ffms2 and ffmpeg? or they the same as non-xp one?
__________________
See My Avisynth Stuff |
6th September 2020, 15:47 | #20 | Link | |
Registered User
Join Date: Nov 2005
Posts: 705
|
Quote:
Just like my own binaries before the fix, for me Sherpya's 'ffmpeg.exe' doesn't crash upon simply invoking ffmpeg.exe, BUT does crash the moment I use -c:v libx264. According to his source (see "GLOBAL_CFLAGS") he does compile FFmpeg for non-SSE2 cpus, so I don't know what causes this crash. A bit off-topic, but what puzzles me is how relatively small his binaries are. His 'ffmpeg.exe' has more components/libraries on board and is even compiled with --enable-hardcoded-tables (which if I'm correct increases filesize), but is still ~18MB smaller than mine. From the top of my head... libx265 doesn't support high bit-depth, but apart from that everything is the same. Only made compatible for WinXP and non-SSE2 cpus.
__________________
My hobby website |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|