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.

 

Go Back   Doom9's Forum > Programming and Hacking > Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 10th September 2024, 22:09   #141  |  Link
Reino
Registered User
 
Reino's Avatar
 
Join Date: Nov 2005
Posts: 707
Quote:
Originally Posted by Scruff View Post
The script I'm using is the one linked in Post#1
I 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.
__________________
My hobby website
Reino is offline   Reply With Quote
Old 10th September 2024, 22:35   #142  |  Link
Scruff
Registered User
 
Scruff's Avatar
 
Join Date: Sep 2024
Posts: 7
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.
__________________
"Heaven don't want me and Hell's afraid I'll take over!"
Scruff is offline   Reply With Quote
Old 12th September 2024, 13:57   #143  |  Link
Reino
Registered User
 
Reino's Avatar
 
Join Date: Nov 2005
Posts: 707
Quote:
Originally Posted by Scruff View Post
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. 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.
Quote:
Originally Posted by Scruff View Post
Do you still have the master scripts for older versions?
This is the "master script".
Quote:
Originally Posted by Scruff View Post
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 otherwise.

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') 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.
Quote:
Originally Posted by Scruff View Post
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!
What are you trying to achieve?
__________________
My hobby website

Last edited by Reino; 12th September 2024 at 14:01.
Reino is offline   Reply With Quote
Old 15th September 2024, 09:43   #144  |  Link
Scruff
Registered User
 
Scruff's Avatar
 
Join Date: Sep 2024
Posts: 7
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
Code:
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.
Attachments Pending Approval
File Type: zip XFade Tests.zip
__________________
"Heaven don't want me and Hell's afraid I'll take over!"

Last edited by Scruff; 16th September 2024 at 03:58.
Scruff is offline   Reply With Quote
Old 18th September 2024, 03:06   #145  |  Link
Scruff
Registered User
 
Scruff's Avatar
 
Join Date: Sep 2024
Posts: 7
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.
__________________
"Heaven don't want me and Hell's afraid I'll take over!"
Scruff is offline   Reply With Quote
Old 18th September 2024, 11:41   #146  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,109
Use this one:

It is 64bit only, but it does also work when called from a 32bit host software.


Cheers
manolito

Last edited by manolito; 18th September 2024 at 11:49.
manolito is offline   Reply With Quote
Old 18th September 2024, 13:57   #147  |  Link
Scruff
Registered User
 
Scruff's Avatar
 
Join Date: Sep 2024
Posts: 7
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.
__________________
"Heaven don't want me and Hell's afraid I'll take over!"
Scruff is offline   Reply With Quote
Old 18th September 2024, 17:06   #148  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,109
Quote:
Originally Posted by scruff View Post
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???

Quote:
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.
I suggest you get your act together before posting such nonsense.


Cheers
manolito

Last edited by manolito; 18th September 2024 at 17:26.
manolito is offline   Reply With Quote
Old 18th September 2024, 23:21   #149  |  Link
Scruff
Registered User
 
Scruff's Avatar
 
Join Date: Sep 2024
Posts: 7
Quote:
Originally Posted by manolito View Post
what???
This is the standard Win64 build, no Linux or Docker whatsoever.
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:
Code:
How to make a build

Prerequisites

    bash
    docker
I suggest you take you're own advice.
__________________
"Heaven don't want me and Hell's afraid I'll take over!"
Scruff is offline   Reply With Quote
Old 19th September 2024, 14:02   #150  |  Link
Reino
Registered User
 
Reino's Avatar
 
Join Date: Nov 2005
Posts: 707
Quote:
Originally Posted by Scruff View Post
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.
Quote:
Originally Posted by Scruff View Post
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.
Code:
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
__________________
My hobby website
Reino is offline   Reply With Quote
Old 15th December 2024, 16:39   #151  |  Link
Reino
Registered User
 
Reino's Avatar
 
Join Date: Nov 2005
Posts: 707
Last week, after more than 20 years of service, my old pc has died. After some troubleshooting it's most likely one or more capacitors on the ASUS A7N8X-E Deluxe motherboard that cause all this. I don't think there's anything wrong with the AMD Athlon XP 3200+ cpu or the ATI Radeon HD 3850 AGP gpu.
Every sane person would immediately take the entire system to the scrap heap, but as I'm still quite fond of the thing and because the WinXP compatible non-SSE2 FFmpeg binaries would otherwise stop, I'm contemplating whether or not I should bring it to a repair-shop (I'm not an expert with a soldering bolt).

For the moment I've bought a simple and cheap laptop (AMD Ryzen 3 3200u on Win11), which will have to do until Minisforum, Beelink or Geekom releases a minipc with the soon to be released monster AMD Ryzen AI Max 300 "Strix Halo" APUs.
__________________
My hobby website
Reino is offline   Reply With Quote
Old 15th December 2024, 22:24   #152  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 3,173
I'm so sorry to hear that, Reino!
In theory replacing a capacitor should be possible and I've seen the folks at "The Serial Port" (enthusiasts about very old hardware from the 80s and 90s) do it several times to bring back to life very old hardware, much older than yours.
Unfortunately, I've never done it myself, but I guess it's doable, you just have to find someone who's able and willing to do that.
Well, either that, or finding a replacement motherboard.
FranceBB is offline   Reply With Quote
Old 16th December 2024, 00:50   #153  |  Link
Brazil2
Registered User
 
Join Date: Jul 2008
Posts: 561
Quote:
Originally Posted by Reino View Post
Last week, after more than 20 years of service, my old pc has died.
If you still can access your HDD then you could make a VHD image of it and then use it in a virtual machine.
Check this utility: https://learn.microsoft.com/en-us/sy...loads/disk2vhd
Brazil2 is offline   Reply With Quote
Old 16th December 2024, 17:44   #154  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 1,834
For some of the motherboards are quite good repair recommendations around.
Thanks to a thorough man who compared motherboard versions, found silent upgrades, and published his findings
I was able to get my first Laptop, a 2001 Gericom (1,2GHz Pentium III) back to life
It was the C466 problem, a 330µF/6,3V Tantalum cap, a bit undersized for its task, and giving in after 7 years of service.
Solder pads and some free mm² allowed me to tile 470µF||470µF/6,3V, back in 2015.
Last week it still started up and worked happily for a backup safety test PCMCIA -> 4xUSB2.0 -> 5x2TB RAID6 +...+...+...
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."

Last edited by Emulgator; 16th December 2024 at 17:47.
Emulgator is offline   Reply With Quote
Old 23rd January 2025, 17:35   #155  |  Link
GMJCZP
Registered User
 
GMJCZP's Avatar
 
Join Date: Apr 2010
Location: I have a statue in Hakodate, Japan
Posts: 760
Hi Reino, I was testing my DVD encoding script with your latest version and noticed with GSpot that some metadata is not being included in the videos:


Version 26052024


Version 01092024

I already tried with the latest version from another recent build of 32 bits and everything is fine there.

PD: I'm sad for your PC
__________________
By law and justice!

GMJCZP's Arsenal

Last edited by GMJCZP; 24th January 2025 at 02:18.
GMJCZP is offline   Reply With Quote
Old 24th January 2025, 17:10   #156  |  Link
Reino
Registered User
 
Reino's Avatar
 
Join Date: Nov 2005
Posts: 707
Quote:
Originally Posted by GMJCZP View Post
Hi Reino, I was testing my DVD encoding script with your latest version and noticed with GSpot ...
Please enlighten me, what does that have to do with my FFmpeg binaries? I don't use GSpot.
Btw, it doesn't look like you're on WinXP, so why are you using my FFmpeg binaries?
Quote:
Originally Posted by GMJCZP View Post
PD: I'm sad for your PC
At the moment the motherboard is being repaired. I've found someone willing to replace around 10 bad capacitors. With a bit of luck I'll have my old pc back in 2 weeks or so.
__________________
My hobby website
Reino is offline   Reply With Quote
Old 24th January 2025, 22:02   #157  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 3,173
On the "not being on XP" part, by looking at the UI he's probably running Windows 7. I wouldn't be surprised if normal FFMpeg builds didn't run on Win7 either. A bit like Supermium being a Windows XP fork of Chromium which is used by other people running Windows Vista, Windows 7, Windows 8 and Windows 8.1 as the official builds wouldn't run on those OS either.
FranceBB is offline   Reply With Quote
Old 26th January 2025, 20:35   #158  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 1,834
Quote:
At the moment the motherboard is being repaired. I've found someone willing to replace around 10 bad capacitors. With a bit of luck I'll have my old pc back in 2 weeks or so.
Nice board ! The caps are indeed mentioned, and these are easy-to-replace Elkos.
https://theretroweb.com/motherboards/s/asus-a7n8x-e
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."
Emulgator is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:49.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.