View previous topic :: View next topic |
Author |
Message |
guyuming Apprentice
Joined: 19 Nov 2020 Posts: 235
|
Posted: Fri Jun 02, 2023 7:37 am Post subject: how to enable ffmpeg for gui-libs/gtk? |
|
|
emerge --info gui-libs/gtk:
Code: | gui-libs/gtk-4.8.3::gentoo was built with the following:
USE="X introspection sysprof wayland (-aqua) -broadway -colord -cups -examples (-ffmpeg) -gstreamer -test (-vulkan)" ABI_X86="(64)" CPU_FLAGS_X86="-f16c"
|
emerge --ask --verbose gui-libs/gtk
Code: | [ebuild R ] gui-libs/gtk-4.8.3:4::gentoo USE="X introspection sysprof wayland (-aqua) -broadway -colord -cups -examples (-ffmpeg) -gstreamer -test (-vulkan)" CPU_FLAGS_X86="-f16c" 0 KiB |
USE="ffmpeg" emerge --ask --verbose gui-libs/gtk
Code: | [ebuild R ] gui-libs/gtk-4.8.3:4::gentoo USE="X introspection sysprof wayland (-aqua) -broadway -colord -cups -examples (-ffmpeg) -gstreamer -test (-vulkan)" CPU_FLAGS_X86="-f16c" 0 KiB |
As shown above, i am trying to emerge gtk with the ffmpeg use flag, but it don't have any effect, i expect something like ffmpeg* to appear in the verbose output, which means changing from disabled to enabled, but what i see is (-ffmpeg), what can be wrong? or i misunderstand something?
Code: | # grep -irn gui-libs/gtk /etc/portage
/etc/portage/package.use/._cfg0001_X:35:gui-libs/gtk X
/etc/portage/package.use/X:34:gui-libs/gtk X
# grep -irn ffmpeg /etc/portage
#
|
|
|
Back to top |
|
|
Phoenix591 Guru
Joined: 17 Sep 2007 Posts: 487
|
Posted: Fri Jun 02, 2023 8:05 am Post subject: |
|
|
the parenthesis around the useflag means in this case its masked (forced off). a few ebuilds have flags in parenthesis that are forced on.
in this case
Code: | /package.use.mask:344:# Uses a function that is not available in media-video/ffmpeg.
/usr/portage/profiles/base/package.use.mask:345:>=www-client/chromium-94 system-ffmpeg
/usr/portage/profiles/base/package.use.mask:355:gui-libs/gtk ffmpeg vulka |
says that the ffmpeg code for gtk uses something not present in normal ffmpeg and so won't work. |
|
Back to top |
|
|
Irets Apprentice
Joined: 17 Dec 2019 Posts: 222
|
Posted: Fri Jun 02, 2023 8:07 am Post subject: |
|
|
USE-flags which are in parenthesis are masked. |
|
Back to top |
|
|
Josef.95 Advocate
Joined: 03 Sep 2007 Posts: 4553 Location: Germany
|
Posted: Fri Jun 02, 2023 8:17 am Post subject: |
|
|
From `man emerge` Code: | Symbol Location Meaning
──────────────────────────────────────────────────────────────
- prefix not enabled (either disabled or removed)
* suffix transition to or from the enabled state
% suffix newly added or removed
() circumfix forced, masked, or removed
{} circumfix state is bound to FEATURES settings |
|
|
Back to top |
|
|
Ionen Developer
Joined: 06 Dec 2018 Posts: 2719
|
Posted: Fri Jun 02, 2023 8:20 am Post subject: |
|
|
Phoenix591 wrote: | says that the ffmpeg code for gtk uses something not present in normal ffmpeg and so won't work. | That bit is for chromium, gtk doesn't do that. Gtk's is: Code: | # Mask experimental options.
gui-libs/gtk ffmpeg vulkan | That was added nearly 2 years ago though, maybe(?) removing the mask for gtk's is overdue at this point (or maybe it's entirely broken, haven't looked into it -- Edit: been told they're still both in a poor state, so mask likely still make sense).
fwiw USE=gstreamer would give media backends without needing to use ffmpeg directly.
But if want to try it anyway, you can unmask it (at your own risks, not that it sounds bad in this case), by having gui-libs/gtk -ffmpeg in /etc/portage/profile/package.use.mask. To be clear, note that this is in the /profile/ subdir and that the minus sign doesn't mean unsetting the flag, but rather removing the mask.
Last edited by Ionen on Fri Jun 02, 2023 12:40 pm; edited 1 time in total |
|
Back to top |
|
|
guyuming Apprentice
Joined: 19 Nov 2020 Posts: 235
|
Posted: Fri Jun 02, 2023 11:01 am Post subject: |
|
|
@Ionen, thanks! I unmasked ffmpeg for gui-libs/gtk with your method and it works.
the background for this thread is that i want to use gdk_pixbuf_new_from_file_at_scale to create thumbnail for .mp4 video files, but get error "GError msg:Couldn’t recognize the image file format for file"
building gui-libs/gtk with ffmpeg USE flag does not solve this issue for me. I also tried adding gstreamer for gui-libs/gtk, but it still does not work.
my current workaround is to use /usr/bin/ffmpeg program directly to create thumbnail. |
|
Back to top |
|
|
|