View Full Version : Windows XP compatible non-SSE2 FFmpeg binaries
manolito
11th May 2024, 21:14
Thank you Reino for your contributions. Excuse my ignorance but how, with an example, can I use Ffmpeg with libfdkaac to convert an audio file? Since both are separated.
Hi GMJCZP,
there are several ways to use libfdk_aac. First of all I suggest to have a look at the documentation here:
https://trac.ffmpeg.org/wiki/Encode/AAC
The commandline parameters are a little different than for the built-in AAC encoder, so you might want to have a look.
Your next decision will be if you want to use the software using the command line interface, or if you prefer a GUI.
For a CLI I made a simple template you can alter depending on your needs:
"Full Path\ffmpeg.exe" -y -i "Source file name with full path" -crf 19.0 -preset medium -tune film -vcodec libx264 -acodec libfdk_aac -ac 2 -ar 48000 -b:a 160k "Output file name with full path"
Just edit the script according to your needs and run it.
As an alternative you can use an ffmpeg GUI which may be easier and also more powerful. My favorite is dmMediaConverter by Marius Dalacu. Marius was nice enough to integrate libfdk seamlessly into his software, so it is easy to use and still very powerful.
You can find all the necessary info and download links here:
https://forum.doom9.org/showthread.php?p=1979037#post1979037
You should also read the following posts for some additional info and recommendations...
If you got questions, please don't hesitate to ask.
Cheers
manolito
GMJCZP
11th May 2024, 22:14
Thank you Manolito for your response. I have used libfdkaac but I have never used it with ffmpeg outside of their compilation. In the first post Reino explains how to do it (map?) but I would like an example to understand what it is like to use both separately. Anyway, I'll check your information.
manolito
12th May 2024, 01:10
Looks like I do not really understand what you mean... :(
I have used libfdkaac but I have never used it with ffmpeg outside of their compilation
The libfdk file which can be downloaded from Reino's link does not do anything by itself, it depends on a compatible FFmpeg version which can use it just like it was incorporated in the FFmpeg binary itself. So it makes no sense to me when you say that you have used libfdk-aac-2.dll before, but never used it with FFmpeg.
Are you talking about some very different libfdkaac file? Please clarify...
Cheers
manolito
Reino
12th May 2024, 14:11
Excuse my ignorance but how, with an example, can I use Ffmpeg with libfdkaac to convert an audio file? Since both are separated.As I explained in post #1, put the dll-file in the same map as 'ffmpeg.exe', or in any map listed in the %PATH%-variable. Next, please consult https://trac.ffmpeg.org/wiki/Encode/AAC (https://trac.ffmpeg.org/wiki/Encode/AAC).
1. Against what AviSynth+ version you build ffms2?The latest (headers only (https://github.com/Reino17/ffmpeg-windows-build-helpers/blob/master/ffmpeg_local_builds/cross_compile_ffmpeg.sh#L792-L799)).
2. What's the used AviSynth+ version when you try to run the script?Uh... v2.6.0. :o
While reading your question, immediately my gut feeling was, this could be the root cause. Somehow it never crossed my mind to try to use a more up-to-date Avisynth install. I feel so dumb! :rolleyes:
I've uploaded a new ffms2_cplugin build, which uses the latest revision (from https://github.com/qyot27/ffms2_cplugin.git (https://github.com/qyot27/ffms2_cplugin.git)) and is linked against ffmpeg-6.2-609-238f9de (my previous FFmpeg build from begin this year).
I've installed AviSynthPlus_3.7.3_20230715_xp.exe (https://github.com/AviSynth/AviSynthPlus/releases/download/v3.7.3/AviSynthPlus_3.7.3_20230715_xp.exe) and did some tests. This new ffms2_cplugin build works perfectly now. No more errors. So it was my mistake afterall, not using an up-to-date Avisynth install.
FranceBB
13th May 2024, 09:38
Oh, that's very good to know!
But... to avoid having a blob in the plugins+ folder, would you mind uploading ffms2 as static rather than shared? Pretty pretty please?
Reino
13th May 2024, 23:54
I think you misunderstand. You always have to compile ffms2 with --enable-shared (https://github.com/Reino17/ffmpeg-windows-build-helpers/blob/master/ffmpeg_local_builds/cross_compile_ffmpeg.sh#L1120), in order to get 'ffms3.dll'. Hence "shared" in the archive name.
But I can see where the confusion is coming from. Especially because I don't put "shared" in the archive name of libfdk-aac, frei0r, or openssl either. So I've renamed the content or the entire ffms2 dir (https://rwijnsma.home.xs4all.nl/files/ffms2/). I think it's more clear now. Also the filesize would be an indication whether FFmpeg was linked statically, or not.
FranceBB
14th May 2024, 07:46
Ahhhhh it was just the name hahahahahahaha gotcha.
Yep, it's indeed static and it works like a charm, I've just put it in my plugins+ folder and I used FFMpegSource2("test.mp4", atrack=-1). Nice! :D
manolito
15th May 2024, 21:12
After reading some FFmpeg docs I am a bit scared about version 7.1 backward compatibility. Here is the important part from the 7.0 documentation:
This release is not backwards compatible, removing APIs deprecated before 6.0. The biggest change for most
library callers will be the removal of the old bitmask-based channel layout API, replaced by the AVChannelLayout API
allowing such features as custom channel ordering, or Ambisonics. Certain deprecated ffmpeg CLI options were also
removed, and a C11-compliant compiler is now required to build the code.
I wonder if this is relevant for me, since I do use some fairly old software under FFmpeg. So far I did not encounter any crashes or even warnings, so Reino may well have taken care of possible incompatibilities. Can I lean back, or would it be safer to revert back to the older version 5.2 ?
Cheers
manolito
FranceBB
15th May 2024, 22:39
Good point, manolito.
For me the big blow was around -map_channels.
I use it all the time and it no longer works now.
In FFMpeg 7.x this code fails:
#Extract DolbyE track 1
ffmpeg -i "DolbyE.mov" -map 0:1 -acodec copy -f u8 -y "stream1.u8"
#Extract each channel of DolbyE 5.1
ffmpeg -i "stream1.u8" -acodec pcm_s24le -ar 48000 -ac 1 -map_channel 0.0.0:0.0.0 -y "FL.wav"
ffmpeg -i "stream1.u8" -acodec pcm_s24le -ar 48000 -ac 1 -map_channel 0.0.1:0.0.0 -y "FR.wav"
ffmpeg -i "stream1.u8" -acodec pcm_s24le -ar 48000 -ac 1 -map_channel 0.0.2:0.0.0 -y "CC.wav"
ffmpeg -i "stream1.u8" -acodec pcm_s24le -ar 48000 -ac 1 -map_channel 0.0.3:0.0.0 -y "LFE.wav"
ffmpeg -i "stream1.u8" -acodec pcm_s24le -ar 48000 -ac 1 -map_channel 0.0.4:0.0.0 -y "SL.wav"
ffmpeg -i "stream1.u8" -acodec pcm_s24le -ar 48000 -ac 1 -map_channel 0.0.5:0.0.0 -y "SR.wav"
#Extract each channel of DolbyE 2.0
ffmpeg -i "stream1.u8" -acodec pcm_s24le -ar 48000 -ac 1 -map_channel 0.0.6:0.0.0 -y $jobOutputFolder:Left.wav
ffmpeg -i "stream1.u8" -acodec pcm_s24le -ar 48000 -ac 1 -map_channel 0.0.7:0.0.0 -y $jobOutputFolder:Right.wav
#Audio 5.1
ffmpeg -i "FL.wav" -i "FR.wav" -i "CC.wav" -i "LFE.wav" -i "SL.wav" -i "SR.wav" -filter_complex "[0:a][1:a][2:a][3:a][4:a][5:a]join=inputs=6:channel_layout=5.1:map=0.0-FL|1.0-FR|2.0-FC|3.0-LFE|4.0-BL|5.0-BR[a]" -map "[a]" -c:a pcm_s24le -ar 48000 -f wav -y "Track1_51.wav"
#Audio 2.0
ffmpeg -i "Left.wav" -i "Right.wav" -filter_complex "[0:a][1:a]join=inputs=2:channel_layout=stereo[a]" -map "[a]" -c:a pcm_s24le -ar 48000 -f wav -y "Track2_20.wav"
I still have to see how to change it...
I guess I'm gonna stick to 6.1.1 for a little bit longer...
GMJCZP
17th May 2024, 23:08
Sorry for the delay in the response.
Are you talking about some very different libfdkaac file? Please clarify...
Manolito: Reino in post #104 has explained it for me. The idea of using both files as Reino suggests
As I explained in post #1, put the dll-file in the same map as 'ffmpeg.exe', or in any map listed in the %PATH%-variable. Next, please consult https://trac.ffmpeg.org/wiki/Encode/AAC.
Reino: I don't know how to place libfdkaac in the same ffmpeg map, if someone can explain it to me with an example I would greatly appreciate it, like in the link above.
Edit: Manolito, with dmMediaconverter you can use libfdkaac with ffmpeg but I don't know how to integrate them...
Reino
18th May 2024, 19:16
Have you actually downloaded the latest archive, 'libfdk-aac-2.0.3-win32-xpmod-sse.7z' (https://rwijnsma.home.xs4all.nl/files/ffmpeg/libfdk-aac/libfdk-aac-2.0.3-win32-xpmod-sse.7z)? That's where you'll find 'libfdk-aac-2.dll'.
manolito
18th May 2024, 23:24
Looks like GMJCZP is mixing up fdkaac.exe which is a standalone audio encoder with lidfdk-aac-xxx.dll which is an FFmpeg plugin. Those two programs serve a completely different purpose and must not be mixed up.
Cheers
manolito
GMJCZP
19th May 2024, 22:27
I explain: I have the two files that Reino has uploaded, but I don't know how to use them as he says in his first post. I use fdkaac.exe in BeHappy but I want to learn how to use libfdkaac with ffmpeg like Reino says but I don't know about mapping
lvqcl
19th May 2024, 22:59
but I want to learn how to use libfdkaac with ffmpeg like Reino says but I don't know about mapping
As I explained in post #1, put the dll-file in the same map as 'ffmpeg.exe', or in any map listed in the %PATH%-variable.
I suppose that in this quote the word 'map' means folder (directory):
put the dll-file in the same folder as 'ffmpeg.exe', or in any folder listed in the %PATH%-variable
manolito
19th May 2024, 23:17
Yes, that's exactly it. In this context the word "Folder" should be used. Nothing gets "mapped" in this context.
manolito
20th May 2024, 19:32
@ GMJCZP
Edit: Manolito, with dmMediaconverter you can use libfdkaac with ffmpeg but I don't know how to integrate them...
You can find all the relevant information starting at this post. Make sure to also read the following couple of posts up to #195 :
https://forum.doom9.org/showthread.php?p=1979037#post1979037
Good luck...
manolito
GMJCZP
20th May 2024, 23:26
Thank you all, I will read all the information. So if I put libfdkaac in the same folder as ffmpeg it would be the same as if the library had been compiled inside ffmpeg, right?
Edit: About dmMediaConverter here (https://forum.doom9.org/showthread.php?p=1979042#post1979042) Can I with that activate libfdkaac?
manolito
21st May 2024, 02:07
Thank you all, I will read all the information. So if I put libfdkaac in the same folder as ffmpeg it would be the same as if the library had been compiled inside ffmpeg, right?
Yes, but only if your FFmpeg version supports it. At the moment there are only the versions by Reino and by Sherpya which can do that. Sherpya's version can be found here:
https://oss.netfarm.it/mplayer/
Edit: About dmMediaConverter here (https://forum.doom9.org/showthread.php?p=1979042#post1979042) Can I with that activate libfdkaac?
Yes, if you follow the procedure outlined in this post then libfdkaac will appear in the audio configuration tab and can be configured from there.
Cheers
manolito
richardpl
21st May 2024, 08:25
This thread is for research for museums.
manolito
21st May 2024, 17:04
We love museums... :p
GMJCZP
24th May 2024, 19:57
Thank you Manolito! I'll try all the information that you has written.
Reino
27th May 2024, 01:23
A user of my FFmpeg binaries (but not a Doom9 member, I think) notified me of a small regression; the absence of the drawtext filter, where ffmpeg-6.1-588-4006c71 (12 months ago) was the latest still working release.
I've done some searching and found that it all comes down to "avfilter/vf_drawtext: improve glyph shaping and positioning" (https://github.com/FFmpeg/FFmpeg/commit/1eeb59a2099479eeead8cdc0d4586443fb301a8a). Starting with this commit libharfbuzz is added as a dependency for the drawtext filter, which means that to enable the drawtext filter you have to configure and compile FFmpeg with --enable-libharfbuzz. I've done just that a moment ago. I've uploaded and replaced the latest release with it! So, same filename.
FranceBB
27th May 2024, 09:21
Thanks for that, Reino.
I don't generally use drawtext, but a friend of mine does to display the timecode. Hopefully it will make him happy. :)
danbow
28th May 2024, 05:19
Reino Hi. Can You help me. In latest versions ffmpeg-7.1 (2024-05-05), (2024-05-26), i use this:
ffmpeg -ss 5:33.667 -to 7:49.219 -i "360p.mp4" -cpucount 1 -f avi -c:v huffyuv -vf "mpdecimate,setpts=N/FRAME_RATE/TB" -an -sn "360p.avi"
and video output with 600 fps. In previous ffmpeg-6.2-609-238f9de-win32 (2024-01-01) same command out 23.976.
This video Initially 23.976fps, but with duplicate frames. Sorry. Thank You! Very much. :)
Emulgator
29th May 2024, 11:46
ffmpeg 7.0 (and 7.1) has removed some in 6.x depreciated, nonetheless there still valid and used command syntax.
Their logic seems to be : What we consider depreciated from one big version step (+1) on, may still be used within this new version (+1),
but will be removed in the following version (+2).
You may want to read that up in ffmpeg docs:
This release is not backwards compatible, removing APIs deprecated before 6.0. The biggest change for most library callers will be the removal of the old bitmask-based channel layout API, replaced by the AVChannelLayout API allowing such features as custom channel ordering, or Ambisonics. Certain deprecated ffmpeg CLI options were also removed...
Reino
31st May 2024, 16:02
Hello danbow.
I don't see a question in your post. But anyway, as I'm not an FFmpeg expert, I can't help you with usage questions like these. Though I can say that -to should always come after -i. See https://trac.ffmpeg.org/wiki/Seeking (https://trac.ffmpeg.org/wiki/Seeking).
You're better off asking on the FFmpeg user mailinglist, or on StackOverflow.
danbow
31st May 2024, 19:13
My question: it not mistake ffmpeg? so and it is necessary in new version?
GMJCZP
3rd June 2024, 18:36
I did all the tests and everything turned out perfect, both with libfdk-aac-2 and dmMediaConverter, many thanks to Reino and manolito!
danbow
4th June 2024, 00:58
And, i try run official ffmpeg-7.0.1-full_build 2024-05-26 on Windows 7 x64 - not starting. Stop supported?
FranceBB
4th June 2024, 18:49
And, i try run official ffmpeg-7.0.1-full_build 2024-05-26 on Windows 7 x64 - not starting. Stop supported?
Welcome to the club, Win7 buddy.
The Windows Vista folks were waiting for you along with us, XP users. ;)
lvqcl
4th June 2024, 18:59
And, i try run official ffmpeg-7.0.1-full_build 2024-05-26 on Windows 7 x64 - not starting. Stop supported?
Probably https://github.com/GyanD/codexffmpeg/issues/136#issuecomment-2147215357
Emulgator
4th June 2024, 20:13
Respect for finding those needles in the haystack.
manolito
5th June 2024, 21:44
Please, respect the topic for this thread:
Windows XP compatible non-SSE2 FFmpeg binaries
Questions like there:
i try run official ffmpeg-7.0.1-full_build 2024-05-26 on Windows 7 x64
should be posted in a separate new thread... :(
Such a new thread would also be the place where I'd like to discuss other non-official FFmpeg versions like this one:
https://www.reddit.com/user/VeritablePornocopium/comments/okw130/ffmpeg_with_libfdk_aac_for_windows_x64/
Post was deleted
Also it could be a good place to discuss more generic tools to make "modern" applications compatible with Win7. Like this one:
https://github.com/vxiiduu/VxKex
Cheers
manolito
danbow
7th June 2024, 13:00
manolito forgive me please. Reino, manolito thank You very very much for this tool for xp users :)
manolito
21st June 2024, 14:23
Not sure if this is the appropriate thread, but since there is no separate FFmpeg forum in Doom9 I figured that I might just as well post it here... :D
It is about HDR to SDR conversions which uses the z.lib library. Up to version 6.xx this library had a bug which made sources with these properties fail:
If MediaInfo reports that the chroma subsampling of the source is 4:2:0 (Type2) then this FFmpeg command line will fail
This has been fixed by the z.lib devs for the current FFmpeg versions 7.xx. Here is my Readme for dmMediaConcerter (of cource also applies if FFmpeg is used via command line)
Using FFmpeg to convert HDR sources to SDR:
======================================================================
This video filter call will do it (thanks to GeoffreyA for his contribution):
SD target (704x516) or (720x528):
---------------------------------
PQ:
===
zscale=704:-2,zscale=m=gbr:t=linear:dither=none:npl=225,format=gbrpf32le,tonemap=mobius:desat=3.0,zscale=m=bt470bg:t=bt470bg:p=bt470bg:r=limited:c=left:dither=error_diffusion,format=yuv420p,sidedata=delete
HLG:
====
zscale=704:-2,zscale=m=gbr:t=linear:dither=none:npl=203,format=gbrpf32le,tonemap=mobius:desat=0,zscale=m=bt470bg:t=bt470bg:p=bt470bg:r=limited:c=left:dither=error_diffusion,format=yuv420p,sidedata=delete
Half HD target (1280x720):
--------------------------
PQ:
===
zscale=1280:-2,zscale=m=gbr:t=linear:dither=none:npl=225,format=gbrpf32le,tonemap=mobius:desat=3.0,zscale=m=709:t=709:p=709:r=limited:c=left:dither=error_diffusion,format=yuv420p,sidedata=delete
HLG:
====
zscale=1280:-2,zscale=m=gbr:t=linear:dither=none:npl=203,format=gbrpf32le,tonemap=mobius:desat=0,zscale=m=709:t=709:p=709:r=limited:c=left:dither=error_diffusion,format=yuv420p,sidedata=delete
Full HD target (1920x1080):
---------------------------
PQ:
===
zscale=1920:-2,zscale=m=gbr:t=linear:dither=none:npl=225,format=gbrpf32le,tonemap=mobius:desat=3.0,zscale=m=709:t=709:p=709:r=limited:c=left:dither=error_diffusion,format=yuv420p,sidedata=delete
HLG:
====
zscale=1920:-2,zscale=m=gbr:t=linear:dither=none:npl=203,format=gbrpf32le,tonemap=mobius:desat=0,zscale=m=709:t=709:p=709:r=limited:c=left:dither=error_diffusion,format=yuv420p,sidedata=delete
________________________________________________________________________________
These FFmpeg parameter lines are meant to be inserted in the "Picture
Settings -> More" field of dmMediaConverter. If you want to use them
in an existing FFmpeg commandline you need to add them as a video
filter and enclose the parameters in double quotes.
Like:
-vf "parameter list"
________________________________________________________________________________
For considerably higher quality conversions (which are also much more tweakable
and also much slower) there is another script by Gyan I found at the Reddit
website. I had to tweak some parameters to get the results I wanted, but it
was worth the effort...
----------------------------------------------------------------------------------
Half HD target (1280x720):
--------------------------
zscale=1280:-2,zscale=t=linear:npl=100,format=gbrpf32le,tonemap=tonemap=gamma:param=1.2:desat=0:peak=15,zscale=p=709:t=709:m=709:r=full:d=error_diffusion,noise=alls=3:allf=t+u,eq=saturation=1.2:brightness=0.155:contrast=1.15:gamma=0.85,huesaturation=colors=y:saturation=-0.5:intensity=0.40,curves=all=0.05/0 0.35/0.5 1/1,curves=all=0/0 0.75/0.76 0.9/0.94 1/1,deband=1thr=0.015:2thr=0.015:3thr=0.015:4thr=0.015:range=16:blur=true:coupling=true,noise=alls=2:allf=p+t,colorspace=iall=bt709:all=bt709:range=tv:format=yuv420p:dither=fsb
Full HD target (1920x1080):
---------------------------
zscale=1920:-2,zscale=t=linear:npl=100,format=gbrpf32le,tonemap=tonemap=gamma:param=1.2:desat=0:peak=15,zscale=p=709:t=709:m=709:r=full:d=error_diffusion,noise=alls=3:allf=t+u,eq=saturation=1.2:brightness=0.155:contrast=1.15:gamma=0.85,huesaturation=colors=y:saturation=-0.5:intensity=0.40,curves=all=0.05/0 0.35/0.5 1/1,curves=all=0/0 0.75/0.76 0.9/0.94 1/1,deband=1thr=0.015:2thr=0.015:3thr=0.015:4thr=0.015:range=16:blur=true:coupling=true,noise=alls=2:allf=p+t,colorspace=iall=bt709:all=bt709:range=tv:format=yuv420p:dither=fsb
Cheers
manolito
Reino
1st September 2024, 22:32
Another round of FFmpeg binaries. See post #1 for details.
FranceBB
2nd September 2024, 17:46
Thank you for keeping XP alive! :D
Scruff
9th September 2024, 20:57
A user of my FFmpeg binaries (but not a Doom9 member, I think) notified me of a small regression; the absence of the drawtext filter, where ffmpeg-6.1-588-4006c71 (12 months ago) was the latest still working release.
I've done some searching and found that it all comes down to "avfilter/vf_drawtext: improve glyph shaping and positioning" (https://github.com/FFmpeg/FFmpeg/commit/1eeb59a2099479eeead8cdc0d4586443fb301a8a). Starting with this commit libharfbuzz is added as a dependency for the drawtext filter, which means that to enable the drawtext filter you have to configure and compile FFmpeg with --enable-libharfbuzz. I've done just that a moment ago. I've uploaded and replaced the latest release with it! So, same filename.
Hi all. @Reino, would you be able to rebuild 6.1.2009 please? It also has DrawText disabled but is the last build with XFade working properly. The v7 builds use double the memory and fail with "cannot allocate memory" errors if you have a long filter chain. Build 6.1.2009 seems to work properly but DrawText is missing.
Also, is there an updated helper script? The one at github is not working because some of the dependencies are no longer available. I managed to fix the first two errors I came across, but I am now stuck with "rubberband" failing with error "sndfile not found" - I can't seem to find the right package to fix the problem.
These are the fixes I've found so far for cross_compile_ffmpeg.sh:
426 -download_and_unpack_file http://zlib.net/zlib-1.3.tar.xz
+download_and_unpack_file http://zlib.net/zlib-1.3.1.tar.gz
427 -cd zlib-1.3
+cd zlib-1.3.1
552 -do_git_checkout https://github.com/xiph/opus.git
+download_and_unpack_file http://ftp.osuosl.org/pub/xiph/releases/opus/opus-1.2.1.tar.gz
553 -cd opus_git
+cd opus-1.2.1
686 -do_git_checkout https://github.com/breakfastquay/rubberband.git "" "" 18c06ab8c431854056407c467f4755f761e36a8e
+download_and_unpack_file http://breakfastquay.com/files/releases/rubberband-3.3.0.tar.bz2
687 -cd rubberband_git
+cd rubberband-3.3.0
Reino
10th September 2024, 14:48
would you be able to rebuild 6.1.2009 please? It also has DrawText disabled but is the last build with XFade working properly.I can try.
Also, is there an updated helper script? The one at github is not working because [...]Which one at Github? That doesn't look like mine, or at least not the latest one.
Scruff
10th September 2024, 21:40
Thanks mate.
The script I'm using is the one linked in Post#1 (https://github.com/Reino17/ffmpeg-windows-build-helpers). The changes I posted are changes I had to make myself. The first 2 (zlib-1.3.1 and opus-1.2.1) seem to have worked but I'm stuck at rubberband - that one requires sndfile and I don't know how to add that to the script properly.
Reino
10th September 2024, 22:09
The script I'm using is the one linked in Post#1I understand, but I think you're using an old revision of 'cross_compile_ffmpeg.sh', because all the things you say don't work I have fixed long ago. Two days ago I've pushed a couple of changes for the latest round of binaries.
Scruff
10th September 2024, 22:35
You wouldn't read about it - I just downloaded the master.zip again and the last modified date for cross_compile_ffmpeg.sh is 7 Sep 2024.
The master I've been using I downloaded 5 days earlier on 2 Sep and the last modified date on cross_compile_ffmpeg.sh is 5 Sep 2023.
So you are right - the script I've been using is almost a year out of date! What a difference 5 days makes!
I'll have to start from scratch again. :(
Do you still have the master scripts for older versions? I assume all the dependencies and patches are specific to each version. Is that correct?
I'd like to be able to go back as far as 5.2 to experiment with some mods. Getting the source for old ffmpeg versions is easy, but not so much for all the correct dependencies.
Reino
12th September 2024, 13:57
The master I've been using I downloaded 5 days earlier on 2 Sep and the last modified date on cross_compile_ffmpeg.sh is 5 Sep 2023.That's weird. That should've been 8 Jun 2024, my previous last commit (https://github.com/Reino17/ffmpeg-windows-build-helpers/commits/master). On the other hand, I use Git, so I don't know if such a tarball is updated after each and every commit I push.
Do you still have the master scripts for older versions?This (https://github.com/Reino17/ffmpeg-windows-build-helpers/blob/master/ffmpeg_local_builds/cross_compile_ffmpeg.sh) is the "master script".
I assume all the dependencies and patches are specific to each version. Is that correct?No. With each new round (every 4 months) I do update my local FFmpeg repo to a specific commit (the latest at that moment though), and its patches are tailored to that revision, but all the dependencies (the git-repos at least) are always the latest revision at that moment. Unless specified (https://github.com/Reino17/ffmpeg-windows-build-helpers/blob/64051110d569c179cbde793d7a211d9bf81c7f4d/ffmpeg_local_builds/cross_compile_ffmpeg.sh#L690) otherwise (https://github.com/Reino17/ffmpeg-windows-build-helpers/commit/3e489fd2bf32bb3b721f4493f61171dd2e7e3cb3).
In fact, I've used the same revisions of all the dependencies for the binaries I've uploaded for you ('ffmpeg-6.2-609-238f9de-[...]_Scruff.7z' (https://rwijnsma.home.xs4all.nl/files/ffmpeg/?C=M;O=D)) as I did for ffmpeg-7.1-2362-6aafe61. I haven't encountered any problems.
The other differences between the ffmpeg-6.2-609-238f9de binaries begin this year and this one are that this one has the drawtext filter (obviously) and libfdk-aac enabled.
I'd like to be able to go back as far as 5.2 to experiment with some mods. Getting the source for old ffmpeg versions is easy, but not so much for all the correct dependencies.Good luck with that! :rolleyes:
What are you trying to achieve?
Scruff
15th September 2024, 09:43
Now that I know how long it takes to make one of these builds, I'm really sorry to tell you that 6.2 is the wrong build. But never mind - it might be perfectly suitable for someone else.
I downloaded the latest script and after a couple of days of tweaking and testing, I've successfully made a build from the 6.1.2 source code (https://github.com/FFmpeg/FFmpeg/tree/release/6.1). As far as I can tell so far, this seems to be the last branch that doesn't have memory issues.
If anyone wants to see what I mean by "memory issues", I've generated some batch files to test all the builds that Reino is currently hosting. All you need to do is set the FFMPEG variable in each file to point to the correct ffmpeg.exe version (the batch files check the version string from ffmpeg and will only run with the correct build).
Each test alternates between two PNG images (1280x720px = 720p) as input to produce an MP4 video that shows all the XFade transitions for that build. For builds with DrawText enabled, the video shows the name of each transition as well.
The results I get are as follows:
All static builds (I haven't tested the shared builds because I don't use them).
System: XP Pro Corporate SP3; Intel E6600; 4GB RAM (3.5GB Available); NO OneCoreAPI
5.2-2131 success peak memory used 697 MB
6.1-588 success peak memory used 698 MB
6.1-2009 success peak memory used 697 MB
6.2-609 fail peak memory used 676 MB but hardly ever gets past the first transition - doesn't show any errors or set error code
6.2-609-Scruff fail (same as above)
7.1-596 fail peak memory used 1431 MB - sometimes fails on first error, sometimes shows heaps of errors and continues
7.1-2362 fail peak memory used 1415 MB - sometimes fails on first error, sometimes shows heaps of errors and continues
I've run all the tests without using DrawText and the results are the same.
I couldn't include the two images in the zip because of the file size restriction, so grab them from the following URL's and save them to the "XFade Tests/720p" folder:
https://bdth.org/01.png
https://bdth.org/02.png
I'm interested to know if the results are the same with the OneCoreAPI installed and on XP x64 which can access more memory natively.
I recommend that you reboot after any test that fails. I have a game that I wrote years ago in VB6 where some of the levels are pretty memory intensive. After running these tests, the game fails to create the memory DC's for those larger levels until I reboot. I don't know for sure, but it's possible that the later builds of ffmpeg are corrupting the RAM, so reboot to be safe.
Scruff
18th September 2024, 03:06
Anyone know how to include fdk-aac in the ffmpeg build instead of having an external dll?
Apparently it can be done (as long as you don't redistibute the exe), but I can't figure out how.
manolito
18th September 2024, 11:41
Use this one:
https://www.reddit.com/user/VeritablePornocopium/comments/okw130/ffmpeg_with_libfdk_aac_for_windows_x64/
It is 64bit only, but it does also work when called from a 32bit host software.
Cheers
manolito
Scruff
18th September 2024, 13:57
That requires linux with docker installed to build. I'm looking for a way to do it with cygwin on XP using Reino's script.
manolito
18th September 2024, 17:06
that requires linux with docker installed to build. I'm looking for a way to do it with cygwin on xp using reino's script.
what???
ffmpeg with libfdk_aac for windows x64
ffmpeg 7.0 "dijkstra" (master-a7e506fcd8 [2024-05-19])
official ffmpeg build download link
this version does not have any of the experimental h.266 codecs. Download ffmpeg 6.0 for those.
Custom builds with libfdk_aac and other "non-free" encoders:
Static builds:
Ffmpeg.exe github
ffplay.exe github
ffprobe.exe github
shared build:
Ffmpeg.exe, ffplay.exe, ffprobe.exe, avcodec-61.dll, avformat-61.dll, etc. Github
This is the standard Win64 build, no Linux or Docker whatsoever. :confused:
I suggest you get your act together before posting such nonsense.
Cheers
manolito
Scruff
18th September 2024, 23:21
what???
This is the standard Win64 build, no Linux or Docker whatsoever. :confused:
I suggest you get your act together before posting such nonsense.
1. The compiled binary on that page does NOT run on XP 32 bit.
2. If you bother to follow the links to find the build instructions at https://github.com/BtbN/FFmpeg-Builds, you will see the following:
How to make a build
Prerequisites
bash
docker
I suggest you take you're own advice.
Reino
19th September 2024, 14:02
If anyone wants to see what I mean by "memory issues", I've generated some batch files to test all the builds that Reino is currently hosting.If you really want me and others to have a look, I suggest you upload the batch-file somewhere else too, because it can take forever before your attachment gets approved.
On the other hand, if you're confident this is a regression in FFmpeg, then I suggest you create a ticket (https://trac.ffmpeg.org/).
Anyone know how to include fdk-aac in the ffmpeg build instead of having an external dll?I think the following should be enough. Not tested though.
diff --git a/ffmpeg_local_builds/cross_compile_ffmpeg.sh b/ffmpeg_local_builds/cross_compile_ffmpeg.sh
index bcf87c7..4dbe83a 100755
--- a/ffmpeg_local_builds/cross_compile_ffmpeg.sh
+++ b/ffmpeg_local_builds/cross_compile_ffmpeg.sh
@@ -592,18 +592,8 @@ build_twolame() {
build_fdk-aac() {
do_git_checkout https://github.com/mstorsjo/fdk-aac.git
cd fdk-aac_git
- do_configure --host=$host_target --prefix=$mingw_w64_x86_64_prefix --disable-static # Build shared library ('libfdk-aac-2.dll').
- do_make install-strip
-
- mkdir -p $redist_dir
- archive="$redist_dir/libfdk-aac-$(git describe | tail -c +2 | sed 's/g//')-win32-xpmod-sse"
- if [[ ! -f $archive.7z ]]; then # Pack shared library.
- sed "s/$/\r/" NOTICE > NOTICE.txt
- 7z a -mx=9 -bb3 $archive.7z $mingw_w64_x86_64_prefix/bin/libfdk-aac-2.dll NOTICE.txt
- rm -v NOTICE.txt
- else
- echo -e "\e[1;33mAlready made '${archive##*/}.7z'.\e[0m"
- fi
+ do_configure --host=$host_target --prefix=$mingw_w64_x86_64_prefix
+ do_make install
cd ..
} # [dlfcn]
@@ -880,7 +870,6 @@ build_ffmpeg() {
apply_patch $patch_dir/0001-make-bcrypt-optional.patch -p1 # WinXP doesn't have 'bcrypt'. See https://github.com/FFmpeg/FFmpeg/commit/aedbf1640ced8fc09dc980ead2a387a59d8f7f68 and https://github.com/sherpya/mplayer-be/blob/master/patches/ff/0001-make-bcrypt-optional-on-win32.patch.
apply_patch $patch_dir/0002-windows-xp-compatible-CancelIoEx.patch -p1 # Otherwise you'd get "The procedure entry point CancelIoEx could not be located in the dynamic link library KERNEL32.dll" while running ffmpeg.exe, ffplay.exe, or ffprobe.exe, because 'CancelIoEx()' is only available on Windows Vista and later. See https://github.com/FFmpeg/FFmpeg/commit/53aa76686e7ff4f1f6625502503d7923cec8c10e, https://trac.ffmpeg.org/ticket/5717 and https://github.com/sherpya/mplayer-be/blob/master/patches/ff/0002-windows-xp-compatible-CancelIoEx.patch.
apply_patch $patch_dir/0003-windows-xp-compatible-wcscp.patch -p1 # Otherwise you'd get "The procedure entry point wcscpy_s could not be located in the dynamic link library msvcrt.dll" while running ffmpeg.exe, ffplay.exe, or ffprobe.exe, because 'wcscpy()' is only available on Windows Vista and later. See https://github.com/FFmpeg/FFmpeg/commit/daf61dddc8e27424c320d5c3abe3e0c5182cd5c0.
- apply_patch $patch_dir/0004-load-shared-libfdk-aac-library-dynamically.patch -p1 # See https://github.com/sherpya/mplayer-be/blob/master/patches/ff/0004-dynamic-loading-of-shared-fdk-aac-library.patch.
apply_patch $patch_dir/0005-load-shared-frei0r-libraries-dynamically.patch -p1 # See https://github.com/sherpya/mplayer-be/blob/master/patches/ff/0005-avfilters-better-behavior-of-frei0r-on-win32.patch.
init_options=(--arch=x86 --target-os=mingw32 --prefix=$mingw_w64_x86_64_prefix --cross-prefix=$cross_prefix --extra-cflags="$CFLAGS")
if [[ $1 == "shared" ]]; then
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.