View previous topic :: View next topic |
Author |
Message |
gangstervano Tux's lil' helper
Joined: 15 Aug 2016 Posts: 86
|
Posted: Sun Jul 28, 2024 5:21 pm Post subject: Set the maximum number of use flags for packages |
|
|
Hi
I want to set the maximum possible number of consistent flags for the ffmpeg package.
How can this be done?
Is there any way to find out which use flags were used for the ffmpeg package in ubuntu? |
|
Back to top |
|
|
Banana Moderator
Joined: 21 May 2004 Posts: 1716 Location: Germany
|
|
Back to top |
|
|
gangstervano Tux's lil' helper
Joined: 15 Aug 2016 Posts: 86
|
Posted: Sun Jul 28, 2024 5:53 pm Post subject: |
|
|
Thanks
I would like to have the maximum set of functions. I'm tired of looking for the right flag every time and rebuilding the package.
Now I got the "Unknown encoder 'libfdk_aac'" error, as I understand it, the fdk flag is responsible for this library.
I would like to build it with the maximum number of flags so that such a problem does not happen again. |
|
Back to top |
|
|
flexibeast Guru
Joined: 04 Apr 2022 Posts: 435 Location: Naarm/Melbourne, Australia
|
Posted: Mon Jul 29, 2024 1:00 am Post subject: |
|
|
The `equery` command, provided by app-portage/gentoolkit, can show you all available flags for a given package, together with their current status:
Code: | $ equery u ffmpeg
[ Legend : U - final flag setting for installation]
[ : I - package is installed with flag ]
[ Colors : set, unset ]
* Found these USE flags for media-video/ffmpeg-4.4.4-r10:
U I
+ + X : Add support for X11
- - abi_x86_32 : 32-bit (x86) libraries
+ + alsa : Add support for media-libs/alsa-lib (Advanced Linux Sound Architecture)
- - amr : Enables Adaptive Multi-Rate Audio support
- - amrenc : Enables Adaptive Multi-Rate Audio encoding support with media-libs/vo-amrwbenc.
- - bluray : Enable playback of Blu-ray filesystems
- - bs2b : Enables media-libs/libbs2b based Bauer stereo-to-binaural filter.
+ + bzip2 : Enable bzip2 compression support
- - cdio : Enables audio CD grabbing with dev-libs/libcdio.
- - chromaprint : Enables audio fingerprinting support with media-libs/chromaprint.
- - chromium : Builds libffmpeg.so to enable media playback in Chromium-based browsers like Opera and Vivaldi.
- - codec2 : Enables codec2 low bit rate speech codec support via media-libs/codec2.
- - cpu_flags_x86_3dnow : Use the 3DNow! instruction set
- - cpu_flags_x86_3dnowext : Use the Enhanced 3DNow! instruction set
+ + cpu_flags_x86_aes : Enable support for Intel's AES instruction set (AES-NI)
+ + cpu_flags_x86_avx : Adds support for Advanced Vector Extensions instructions
+ + cpu_flags_x86_avx2 : Adds support for Advanced Vector Extensions 2 instructions
+ + cpu_flags_x86_fma3 : Use the Fused Multiply Add 3 instruction set ([fma] in cpuinfo)
- - cpu_flags_x86_fma4 : Use the Fused Multiply Add 4 instruction set
+ + cpu_flags_x86_mmx : Use the MMX instruction set
+ + cpu_flags_x86_mmxext : Use the Extended MMX instruction set (a subset of SSE) ([mmxext] or [sse] in cpuinfo)
+ + cpu_flags_x86_sse : Use the SSE instruction set
+ + cpu_flags_x86_sse2 : Use the SSE2 instruction set
+ + cpu_flags_x86_sse3 : Use the SSE3 instruction set ([pni] in cpuinfo, NOT ssse3)
+ + cpu_flags_x86_sse4_1 : Enable SSE4.1 instruction support
+ + cpu_flags_x86_sse4_2 : Enable SSE4.2 instruction support
+ + cpu_flags_x86_ssse3 : Use the SSSE3 instruction set (NOT sse3/pni)
- - cpu_flags_x86_xop : Enable the XOP instruction set
- - cpudetection : Enables runtime CPU detection (useful for bindist, compatibility on other CPUs)
+ + dav1d : Enables AV1 decoding via media-libs/dav1d.
- - debug : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see
https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
- - doc : Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
+ + encode : Add support for encoding of audio or video files
- - fdk : Use external fdk-aac library for AAC encoding
+ + fftools_aviocat : cat's a URL to another one, useful for dumping streams.
+ + fftools_cws2fws : converts cws files (Macromedia Flash, compressed) to fws ones (Macromedia Flash, uncompressed).
+ + fftools_ffescape : Escapes an input string, adopting the av_get_token() escaping logic.
+ + fftools_ffeval : A simple expression evalutor.
+ + fftools_ffhash : Computes a file's digest using libavutil algorithms.
+ + fftools_fourcc2pixfmt : Shows the relationships between rawvideo pixel formats and FourCC tags.
+ + fftools_graph2dot : A tool to convert a libavfilter graph to a dot file.
+ + fftools_ismindex : A tool for creating smooth streaming manifests.
+ + fftools_pktdumper : Dumps packets as demuxed by libavformat.
+ + fftools_qt-faststart : Rearranges a Quicktime file to facilitate network streaming.
+ + fftools_sidxindex : Write an MPD file for fragmented MP4 files with a sidx index at the start of the file.
+ + fftools_trasher : Writes burts of random data into a file. Great for testing error robustness/resilience/concealment.
- - flite : Adds a text-to-speech filter based on app-accessibility/flite.
+ + fontconfig : Support for configuring and customizing font access via media-libs/fontconfig
- - frei0r : Enable frei0r wrapping in libavfilter
- - fribidi : Enables fribidi support in the drawtext filter.
- - gcrypt : Enables gcrypt support: Needed for rtmp(t)e support if openssl, librtmp or gmp is not used.
- - glslang : Use dev-util/glslang to compile GLSL
- - gme : Enables support for media-libs/game-music-emu for playing various video game music formats.
- - gmp : Add support for dev-libs/gmp (GNU MP library)
+ + gnutls : Prefer net-libs/gnutls as SSL/TLS provider (ineffective with USE=-ssl)
+ + gpl : Build GPL code. Should be enabled unless you require LGPL binaries.
- - gsm : Add support for the gsm lossy speech compression codec
- - hardcoded-tables : Use pre-calculated tables rather than calculating them on the fly. It results in an increase of approximately 15% in
the size of libavcodec, the main library impacted by this change. It enables savings in table generation time, done
once at codec initialization, since by hardcoding the tables, they do not need to be computed at runtime. However,
the savings are often negligible (~100k cycles is a typical number) especially when amortized over the entire
encoding/decoding operation. Improvements are being made to the runtime initialization, and so over time, this
option will have an impact on fewer and fewer codecs.
+ + iconv : Enable support for the iconv character set conversion library
- - iec61883 : Support for FireWire DV/HDV input device using media-libs/libiec61883.
- - ieee1394 : Enable FireWire/iLink IEEE1394 support (dv, camera, ...)
- - jack : Add support for the JACK Audio Connection Kit
- - jpeg2k : Support for JPEG 2000, a wavelet-based image compression format
- - kvazaar : Enables media-libs/kvazaar based HEVC encoder.
- - ladspa : Enable the ability to support ladspa plugins
- - libaom : Enables media-libs/libaom based AV1 codec support.
- - libaribb24 : Enables ARIB text and caption decoding via media-libs/aribb24.
- - libass : SRT/SSA/ASS (SubRip / SubStation Alpha) subtitle support
- - libcaca : Add support for colored ASCII-art graphics
- - libdrm : Enables x11-libs/libdrm support for better screen grabbing and hardware accelerated codecs.
- - libilbc : Enables iLBC de/encoding via media-libs/libilbc.
- - librtmp : Enables Real Time Messaging Protocol using librtmp (media-video/rtmpdump) in addition to FFmpeg's native
implementation.
- - libsoxr : Enables audio resampling through media-libs/soxr.
- - libtesseract : Enables the OCR filter via app-text/tesseract.
- - libv4l : Uses media-libs/libv4l for video4linux instead of direct calls. Adds support for more devices via the userspace
library.
+ + libxml2 : Uses dev-libs/libxml2 to enable dash demuxing support.
- - lv2 : Enables lv2 audio filter wrapper.
- - lzma : Support for LZMA compression algorithm
- - modplug : Add libmodplug support for playing SoundTracker-style music files
+ + mp3 : Add support for reading mp3 files
+ + network : Enables network streaming support
- - nvenc : Add support for NVIDIA Encoder/Decoder (NVENC/NVDEC) API for hardware accelerated encoding and decoding on NVIDIA
cards (requires x11-drivers/nvidia-drivers)
- - openal : Add support for the Open Audio Library
- - opencl : Enable OpenCL support (computation on GPU)
- - opengl : Add support for OpenGL (3D graphics)
- - openh264 : Enables H.264 encoding suppoprt via media-libs/openh264.
- - openssl : Enables dev-libs/openssl support. Adds support for encrypted network protocols (TLS/HTTPS).
+ + opus : Enable Opus audio codec support
- - oss : Add support for OSS (Open Sound System)
+ + pic : Force shared libraries to be built as PIC (this is slower)
+ + postproc : Build and install libpostproc.
+ + pulseaudio : Add sound server support via media-libs/libpulse (may be PulseAudio or PipeWire)
- - rav1e : Enables AV1 encoding support via media-video/rav1e.
- - rubberband : Adds time-stretching and pitch-shifting audio filter based on media-libs/rubberband.
- - samba : Add support for SAMBA (Windows File and Printer sharing)
- - sdl : Add support for Simple Direct Layer (media library)
- - snappy : Enable app-arch/snappy support. Required for e.g. Vidvox Hap encoder.
- - sndio : Enable support for the media-sound/sndio backend
- - speex : Add support for the speex audio codec (used for speech)
- - srt : Enable support for Secure Reliable Transport (SRT) via net-libs/srt
- - ssh : Enable SSH/sftp support via net-libs/libssh.
- - static-libs : Build static versions of dynamic libraries as well
+ + svg : Add support for SVG (Scalable Vector Graphics)
- - svt-av1 : Enables AV1 encoding support via media-libs/svt-av1.
- - test : Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be
toggled independently)
+ + theora : Add support for the Theora Video Compression Codec
+ + threads : Add threads support for various packages. Usually pthreads
+ + truetype : Enables drawtext filter via media-libs/freetype and media-libs/harfbuzz.
- - twolame : Enables MP2 encoding via media-sound/twolame as an alternative to the internal encoder.
- - v4l : Enable support for video4linux (using linux-headers or userspace libv4l libraries)
+ + vaapi : Enable Video Acceleration API for hardware decoding
+ + vdpau : Enable the Video Decode and Presentation API for Unix acceleration interface
- - verify-sig : Verify upstream signatures on distfiles
- - vidstab : Enables video stabilization filter using vid.stab library (media-libs/vidstab).
+ + vorbis : Add support for the OggVorbis audio codec
+ + vpx : Enables VP8 and VP9 codec support using libvpx: Decoding does not require this to be enabled but libvpx can also be
used for decoding; encoding requires this useflag to be enabled though.
+ + vulkan : Add support for 3D graphics and computing via the Vulkan cross-platform API
+ + webp : Add support for the WebP image format
+ + x264 : Enable h264 encoding using x264
- - x265 : Enables HEVC encoding with media-libs/x265.
+ + xvid : Add support for xvid.org's open-source mpeg-4 codec
- - zeromq : Enables net-libs/zeromq support with the zmq/azmq filters.
- - zimg : Enables media-libs/zimg based scale filter.
+ + zlib : Add support for zlib compression
- - zvbi : Enables media-libs/zvbi based teletext decoder. |
|
|
Back to top |
|
|
Banana Moderator
Joined: 21 May 2004 Posts: 1716 Location: Germany
|
Posted: Mon Jul 29, 2024 6:22 am Post subject: |
|
|
gangstervano wrote: | Thanks
I would like to have the maximum set of functions. I'm tired of looking for the right flag every time and rebuilding the package.
Now I got the "Unknown encoder 'libfdk_aac'" error, as I understand it, the fdk flag is responsible for this library.
I would like to build it with the maximum number of flags so that such a problem does not happen again. |
I don't think a maximum set of flags will avoid problems. Some flags depend on others and some even require use flags on other packages. So there is no "set everything to on" and all is fine... _________________ Forum Guidelines
PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire |
|
Back to top |
|
|
krumpf Apprentice
Joined: 15 Jul 2018 Posts: 186
|
Posted: Mon Jul 29, 2024 8:05 am Post subject: Re: Set the maximum number of use flags for packages |
|
|
gangstervano wrote: | Is there any way to find out which use flags were used for the ffmpeg package in ubuntu? |
As Banana said, useflags are a gentoo/portage feature. But you can see what options were used during ffmpeg compilation just by invoking ffmpeg without any argument.
Here's the output on my gentoo, you can see what was enabled or disabled for my specific ffmpeg build
Code: | $ ffmpeg
ffmpeg version 6.1.1 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 13 (Gentoo 13.3.1_p20240614 p17)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --docdir=/usr/share/doc/ffmpeg-6.1.1-r8/html --mandir=/usr/share/man --enable-shared --cc=gcc --cxx=g++ --ar=gcc-ar --nm=gcc-nm --strip=x86_64-pc-linux-gnu-strip --ranlib=gcc-ranlib --pkg-config=x86_64-pc-linux-gnu-pkg-config --optflags='-O2 -pipe -march=native -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing' --disable-static --disable-libaribcaption --enable-avfilter --disable-stripping --disable-optimizations --disable-libcelt --disable-indev=v4l2 --disable-outdev=v4l2 --disable-indev=oss --disable-indev=jack --disable-indev=sndio --disable-outdev=oss --disable-outdev=sndio --enable-nonfree --enable-bzlib --disable-runtime-cpudetect --disable-debug --disable-gcrypt --enable-gnutls --disable-gmp --enable-gpl --disable-hardcoded-tables --enable-iconv --disable-libxml2 --disable-lzma --enable-network --disable-opencl --disable-openssl --enable-postproc --disable-libsmbclient --enable-ffplay --enable-sdl2 --enable-vaapi --disable-vdpau --enable-vulkan --enable-xlib --enable-libxcb --enable-libxcb-shm --enable-libxcb-xfixes --enable-zlib --disable-libcdio --disable-libiec61883 --disable-libdc1394 --disable-libcaca --enable-openal --enable-opengl --disable-libv4l2 --disable-libpulse --enable-libdrm --disable-libjack --disable-libopencore-amrwb --disable-libopencore-amrnb --disable-libcodec2 --enable-libdav1d --enable-libfdk-aac --disable-libopenjpeg --disable-libjxl --disable-libbluray --disable-libgme --disable-libgsm --disable-libaribb24 --disable-libmodplug --enable-libopus --disable-libvpl --disable-libilbc --disable-librtmp --disable-libssh --disable-libspeex --disable-libsrt --enable-librsvg --disable-ffnvcodec --enable-libvorbis --enable-libvpx --disable-libzvbi --disable-appkit --disable-libbs2b --disable-chromaprint --disable-cuda-llvm --disable-libflite --enable-fontconfig --disable-frei0r --disable-libfribidi --disable-libglslang --disable-ladspa --enable-lcms2 --enable-libass --disable-libplacebo --disable-libtesseract --disable-lv2 --disable-librubberband --disable-libshaderc --enable-libfreetype --enable-libharfbuzz --disable-libvidstab --disable-libvmaf --disable-libzmq --disable-libzimg --enable-libsoxr --enable-pthreads --disable-amf --disable-libvo-amrwbenc --disable-libkvazaar --enable-libaom --enable-libmp3lame --disable-libopenh264 --disable-librav1e --disable-libsnappy --disable-libsvtav1 --disable-libtheora --disable-libtwolame --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-neon --disable-vfp --disable-vfpv3 --disable-armv8 --disable-dotprod --disable-i8mm --disable-mipsdsp --disable-mipsdspr2 --disable-mipsfpu --disable-altivec --disable-vsx --disable-power8 --disable-amd3dnow --disable-amd3dnowext --disable-fma4 --disable-xop --enable-pic --cpu=host --enable-lto=auto --disable-doc --disable-htmlpages --enable-manpages
libavutil 58. 29.100 / 58. 29.100
libavcodec 60. 31.102 / 60. 31.102
libavformat 60. 16.100 / 60. 16.100
libavdevice 60. 3.100 / 60. 3.100
libavfilter 9. 12.100 / 9. 12.100
libswscale 7. 5.100 / 7. 5.100
libswresample 4. 12.100 / 4. 12.100
libpostproc 57. 3.100 / 57. 3.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg' |
So I guess using the ffmpeg command with a ubuntu liveCD/USB, you should be able to figure out what options were used for ffmpeg ubuntu build (but tbh many are not that useful, unless you spend a lot of time in video/audio editing or such) _________________ Dragon Princess Music Games Heroes and villains |
|
Back to top |
|
|
tiffany n00b
Joined: 04 May 2008 Posts: 10
|
Posted: Mon Jul 29, 2024 6:38 pm Post subject: |
|
|
Also there are things that can't be enabled at the same time. For example Systemd and OpenRC are incompatible. Possibly some FFMPEG flags can trigger these incompatibilities.
I know that it's a difficult thing to maintain but you must find a solution by yourself.
I personally spend my Fridays on that. Maintaining my machines. I see what's going on and tweak them. I check my "favorite" packages for changes and recompile them. If something goes wrong I'll have the weekend to solve it. |
|
Back to top |
|
|
logrusx Advocate
Joined: 22 Feb 2018 Posts: 2397
|
Posted: Mon Jul 29, 2024 8:12 pm Post subject: |
|
|
gangstervano wrote: | Thanks :)
I would like to have the maximum set of functions. I'm tired of looking for the right flag every time and rebuilding the package.
Now I got the "Unknown encoder 'libfdk_aac'" error, as I understand it, the fdk flag is responsible for this library.
I would like to build it with the maximum number of flags so that such a problem does not happen again. |
Code: |
[ebuild R ] media-video/ffmpeg-6.1.1-r8:0/58.60.60::gentoo USE="X alsa bzip2 dav1d encode fontconfig gnutls gpl iconv lcms mp3 network opengl openh264 pic postproc pulseaudio sdl svg threads truetype vaapi vdpau vorbis vulkan x264 xvid zlib (-amf) -amr -amrenc (-appkit) -bluray -bs2b -cdio -chromaprint -chromium -codec2 -cpudetection (-cuda) -debug -doc -fdk -flite -frei0r -fribidi -gcrypt -glslang -gme -gmp -gsm -hardcoded-tables -iec61883 -ieee1394 -jack -jpeg2k -jpegxl -kvazaar -ladspa -libaom -libaribb24 -libass -libcaca -libdrm -libilbc -libplacebo -librtmp -libsoxr -libtesseract -libv4l -libxml2 -lv2 -lzma (-mipsdspr1) (-mipsdspr2) (-mipsfpu) -modplug -nvenc -openal -opencl -openssl -opus -oss (-qsv) -rav1e -rubberband -samba -shaderc -snappy -sndio -soc -speex -srt -ssh -static-libs -svt-av1 -test -theora -twolame -v4l -verify-sig -vidstab (-vmaf) -vpx -webp -x265 -zeromq -zimg -zvbi" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext sse sse2 sse3 sse4_1 sse4_2 ssse3 -3dnow -3dnowext -fma4 -xop" FFTOOLS="aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart sidxindex trasher" 0 KiB
|
Never had problems. Most of the flags you don't need. What do you mean by "for the right flag every time", don't you put them in an entry in package.use?
What's the output of
Code: | grep -r ffmpeg /etc/portage |
Best Regards,
Georgi |
|
Back to top |
|
|
figueroa Advocate
Joined: 14 Aug 2005 Posts: 3005 Location: Edge of marsh USA
|
Posted: Tue Jul 30, 2024 5:02 am Post subject: |
|
|
eix ffmpeg will show you the potential and default use flags. _________________ Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi |
|
Back to top |
|
|
|