-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ffmpeg5 + ffmpeg6 packages #5620
Conversation
@hgy59 and @mreid-tt and all, looking for help! Having issues specifically with x86_64 and i686 builds... I've created an ffmpeg bug issue at https://trac.ffmpeg.org/ticket/10219 with hope to find a solution. Getting multiple
Hints at solving this issue would be much appreciated 🤷 |
Sometime it helps to force cross compilation for i686 (see cross/erlang/Makefile) - just guessing... |
Maybe nasm is too old for the new ffmpeg, which passes the configure check but there's no |
Disabling x86 asm can be a stopgap but it causes software decoders and encoders to be extremely slow. Better to figure out how to re-enable it later. The low-power chips on Synology devices can benefit a lot from this. |
@Nyaran thnx for the pointer. Indeed disabling x86 asm solved the immediate issue. I've updated the ffmpeg track issue to reflect this in hope to get some help. |
I wonder why asm was disabled in arm and ppc? This is unlikely to be an upstream issue since ffmpeg 5.0 was released more than a year ago. Maybe |
This pre-date me taking over the maintenance of ffmpeg. I never touched that portion of the build process. Now that this isn't working all right for x86 neither, perhaps it's a good time to review it... similarly, asm is only available for x86 for x265 as well.
I tried that and it didn't worked out neither. |
NEON asm works for arm processors. Those asm code were written for some DSP and decoders. https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/arm/Makefile
|
@nyanmisaka I've been playing more & more with ASM on various front and really, it works just well for |
spk/ffmpeg4/Makefile
Outdated
SPK_NAME = ffmpeg4 | ||
SPK_VERS = 4.4.3 | ||
SPK_REV = 47 | ||
SPK_REV = 48 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a good idea. I propose to keep SPK_NAME = ffmpeg
Otherwise this is a new package and you can start with SPK_REV = 1
But then all packages depending on ffmpeg (SPK_DEPENDS = "ffmpeg") will not use further updates (and we will need to keep the latest ffmpeg package in the repository).
SPK_NAME should stay ffmpeg, only DISPLAY_NAME may be changed to ffmpeg4 (or ffmpeg 4).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue is more complex than that...
The github build scripts also refers to ffmpeg for it to be pre-process and keept prior to building dependent packages in order to re-use existing libraries. That also needs fixing so a similar behavior is kept for ffmpeg5 and ffmpeg6 which adds complexity as comskip, chromaprint and tvheadend are in various stages of porting over to ffmpeg >= 5.x.
With that in mind, and based on python3 experience, I decided to rename it all to ffmpeg4 along with adjusting dependent packages. Once all dependent packages are migrated over the new naming scheme I'll then be able to start porting them over to a newer ffmpeg. Adding to the blur is jellyfin which requires ffmpeg 5.x for it to run smoothly (and to which there isn't any spk dependencies up until now 🤷 ).
Renaming it all to be ffmpeg<version>
is to me the best route as they will have to be maintained in parallel for a while. As for SPK_REV
, I can probably switch it to 1
but on the other hand if gives the idea that ffmpeg4
version 48 really is the update from ffmpeg
version 47. So I'd rather keeping it as-is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@th0ma7 you can name all folders ffmpeg4 only the SPK_NAME sould stay ffmpeg.
This is similar to the python2 package, where SPK_NAME is still python.
@hgy59 and @nyanmisaka finally found the build issue... to which we already had a fix for since 4.x era. It hapens that I can now finally move on to next steps 🚀 |
@th0ma7 Nice to hear that. I've seen that patch but didn't understand what it does. We are also updating patches for 6.0 but it's not finalized yet. |
@nyanmisaka if I may recommend, would be nice to keep patches for older ffmpeg releases. I'm still using v4 and now v5 versions of the patches. Pertaining to v6, any insight as of when the patches may be ready? As I'll probably wait for that before releasing it. |
@th0ma7 4.4.x is for the old Jellyfin 10.7, it's best to keep the current patches as they are. Downstream only needs to pull the corresponding version of the patch series from the 5.1.x will continue to be maintained for a long time since it is LTS and is required by Jellyfin 10.8. 6.x slightly breaks compatibility with Jellyfin 10.8, we will release a new Jellyfin version to adapt it. Before that make the Jellyfin package depend on ffmpeg5. |
Just a FYI some FFmpeg options and runtimes used by Jellyfin are not available in spksrc.
|
@nyanmisaka thnx for sharing this, that will save me quite a bit of time. From the get go only a fraction of this will be available to all platforms. Intel: nVidia: |
https://gcc.gnu.org/projects/cxx-status.html#cxx14 cpp14 is required by the VPL runtime, which is not fully supported in gcc-4.9 but you can still give it a try.
Compiling cuda kernel requires cpp14 too, this part is handled by clang instead of the nvcc that comes with cuda toolkit. So I'm not sure if clang is available in Syno toolchains. You can lower the priority of supporting this as not many people use NVIDIA GPUs on Syno. Other than that you just need to make install the |
Having a preset conf/resource file makes it that no other parameters can be set in the resulting file. This removes the need of the static file for accessing video-driver by generating it directly within the normal jq call.
This should now good for merging. I'll take one last stab at it upon my return and do further testing. If @hgy59 you can have one last look at it would be nice. My main fear is at filling up our server online... |
@th0ma7 We updated our patches with some tiny fixes. It'd be great if you can pull the them again before merging. |
Sure, will do upon my return. |
Co-authored-by: hgy59 <hpgy59@gmail.com>
@nyanmisaka all patches are now updated. Finalizing the testing and should be ready for publishing before end of week. |
@th0ma7 there must be something wrong with the changes in the prepare step of the github build action introduced with this PR. In #5677 I only changed files in native/mono, cross/mono and spk/mono but now it downloads and builds ffmpeg. |
* openh264: Import from gstreamer PR SynoCommunity#5298 * twolame: Import from gstreamer PR SynoCommunity#5298 * ffmpeg: Enable openh264 & twolame - import from gstreamer PR SynoCommunity#5298 * ffmpeg4: Rename ffmpeg package to ffmpeg4 (preparation to ffmpeg5) * ffmpeg: Remove twolame from TODO list * ffmpeg4: Enable service-setup.sh script only on x64 * ffmpeg4: Miscelanious fixes to get things to build * github-action: Prepare for ffmpeg5 builds * ffmpeg5: First tentative build * Bump package version and changelog * ffmpeg5: Re-enable svthevc patch * ffmpeg5: Disable asm optimizations for x86_64 & i686 * ffmpeg6: First tentative basic package * ffmpeg6: Update PLIST * nasm: Update from version 2.15.5 to 2.16.1 * libaom: Re-order and allow ASM builds (from cmake-env.mk fix) * x265: Fix aarch64 ASM build * ffmpeg4: Re-order ASM code & enable neon optimization for aarch64 * ffmpeg5-6: Re-order ASM code & enable neon optimization for aarch64 * libvpx: Update from version 1.12 to 1.13 and switch to nasm * libvpx: Disable neon on armv7/7l/8 when using gcc <= 4.9 * x264: Update to latest commit and enable ASM for aarch64 * libvpx: Set nasm to be specific to x86 arch only (x86asm) * x264: Fix typo * x264: Add more details about ARM ASM compiling * libaom: Remove unused comments and trailing blank line * opus: Fix for comcerto2k-7.1 * ffmpeg: Reorder ASM code and enable on aarch64 * x265: Fix build for comcerto2k-7.1 * ffmpeg6: Fix minor typos * ffmpeg5-6: Build fix using good old replace ARCH by FFMPEG_ARCH * ffmpeg4: Re-use ffmpeg5-6 asm makefile code * tvheadend: Fix FFMPEG_DIR variable * libva: Update from version 2.16 to version 2.17 * libdrm: Update from version 2.4.114 to 2.4.115 * intel-gmmlib: Update from version 22.3.1 to 22.3.4 * ffmpeg6: Enable SVT-HEVC plugin * ffmpeg6: Forgot to also include svt-hevc patch for enablement * dav1d: Update from version 1.0.0 to 1.1.0 * frei0r: Update from version 1.8.0 to 2.2.0 * ffmpeg4: Rename back to ffmpeg & enforce ffmpeg4 directory install * ffmpeg5-6: Aling DISPLAY_NAME for all ffmpeg versions * ffmpeg4: Ensure to use ffmpeg4 as cross dependency * libass: Update from version 0.16.0 to 0.17.1 * SVT-AV1: Update from version 1.3.0 to 1.4.1 * ffmpeg4: Update changelog * ffmpeg*: Add -lm for svt-av1 and remove redundant frei0r entry * level-zero: Add version 1.9.4 as ICG dependency * frei0r: Add cairo as dependency & disable CMAKE_USE_TOOLCHAIN_FILE * ffmpeg6: Import jellyfin ffmpeg6 patches * ffmpeg4-5-6: Enable symbolic links in /usr/local/bin * ffmpeg4-5-6: Fix /usr/local/bin symlink * service.mk: Add ability to generate json for VIDEODRIVER access Having a preset conf/resource file makes it that no other parameters can be set in the resulting file. This removes the need of the static file for accessing video-driver by generating it directly within the normal jq call. * ffmpeg4-5-6: Misc fixes including symlinks and proper rpath for v4 * github-action: Fix mgmnt of ffmpeg,ffmpeg5,ffmpeg6 dependent spk * github-action: ffmpeg package is actually spk/ffmpeg4 * ffmpeg5: Update jellyfin patches * ffmpeg6: Update jellyfin patches * ffmpeg6: Remove invalid older jellyfin patch * ffmpeg4: Update howto pertaining to jellyfin patches * chromaprint+comskip+tvh: Fix ffmpeg dependency version * tvheadend: Update changelog for updated openssl version Co-authored-by: hgy59 <hpgy59@gmail.com> * comskip+chromaprint+tvh: Update SPK_DEPENDS automatically * svt-av1: Update digests & directory now based on git hash --------- Co-authored-by: hgy59 <hpgy59@gmail.com>
Description
FFMPEG5 Jellyfin optimized package + FFMPEG6 default
Fixes #5085, #5421
Checklist
all-supported
completed successfullyType of change