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: 705
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: 705
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,103
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,103
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: 705
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
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 00:54.


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