Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how to enable ffmpeg for gui-libs/gtk?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
guyuming
Apprentice
Apprentice


Joined: 19 Nov 2020
Posts: 235

PostPosted: Fri Jun 02, 2023 7:37 am    Post subject: how to enable ffmpeg for gui-libs/gtk? Reply with quote

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
View user's profile Send private message
Phoenix591
Guru
Guru


Joined: 17 Sep 2007
Posts: 487

PostPosted: Fri Jun 02, 2023 8:05 am    Post subject: Reply with quote

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
View user's profile Send private message
Irets
Apprentice
Apprentice


Joined: 17 Dec 2019
Posts: 222

PostPosted: Fri Jun 02, 2023 8:07 am    Post subject: Reply with quote

USE-flags which are in parenthesis are masked.
Back to top
View user's profile Send private message
Josef.95
Advocate
Advocate


Joined: 03 Sep 2007
Posts: 4553
Location: Germany

PostPosted: Fri Jun 02, 2023 8:17 am    Post subject: Reply with quote

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
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2719

PostPosted: Fri Jun 02, 2023 8:20 am    Post subject: Reply with quote

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
View user's profile Send private message
guyuming
Apprentice
Apprentice


Joined: 19 Nov 2020
Posts: 235

PostPosted: Fri Jun 02, 2023 11:01 am    Post subject: Reply with quote

@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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum