Skip to content
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

Ffmpeg enable libxcb support. #22738

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

TomJo2000
Copy link
Member

This was requested by user qlufotera in Discord.
https://discord.com/channels/641256914684084234/1324260321371885608/1324260321371885608

libxcb is used by the x11grab input device type, used to directly capture from the specified X display.
I've also done some cleanup around the architecture specific build flags, and sorted the dependency list.

@TomJo2000 TomJo2000 requested a review from Grimler91 as a code owner January 2, 2025 07:15
@TomJo2000
Copy link
Member Author

(This is a pre-written, saved reply.)
If you want to test this PR please download the appropriate DEB package(s)
from the build artifacts of the associated PR's latest CI run.
Screenshot_20240619_232413

After downloading the build artifact, make sure to unzip and un-tar it.

Detailed instructions, if needed.

# finding out what architecture you need
# architecture is just below the TERMUX_VERSION
termux-info

# e.g.
# [...]
# TERMUX_MAIN_PACKAGE_FORMAT=debian
# TERMUX_VERSION=0.118.0
# TERMUX__USER_ID=0
# Packages CPU architecture:
# aarch64
# [...]

# =======================

# make sure `unzip` and `tar` are installed using
pkg install unzip tar

# unzip the artifact (if you have a different architecture this might be arm, i686 or x86_64 instead)
unzip debs-aarch64-*.zip

# untar the artifact
tar xf debs-aarch64-*.tar

# You should now have a debs/ directory in your current working directory
# Install the packages from the local source using
pkg install -- ./debs/*.deb

# to clean up, you can remove the debs/ directory, .tar file and .zip file
rm -rfi debs debs-aarch64-*.zip debs-aarch64-*.tar

@TomJo2000
Copy link
Member Author

Converting to draft, this is gonna need further investigation.
I didn't realize it initially but x11grab is part of the libavdevice "Input devices".
https://www.ffmpeg.org/ffmpeg-all.html#Device-Options

Which if I'm understanding it correctly are backed by actual OS device files.
(With the exception of lavfi which is a virtual input device.)

Compare the output of ffmpeg -devices from,
PC (Arch Linux):

# [...] compiler options omitted for brevity
Devices:
 D. = Demuxing supported
 .E = Muxing supported
 ---
 DE alsa            ALSA audio output
 DE fbdev           Linux framebuffer
 D  iec61883        libiec61883 (new DV1394) A/V input device
 D  jack            JACK Audio Connection Kit
 D  kmsgrab         KMS screen capture
 D  lavfi           Libavfilter virtual input device
  E opengl          OpenGL output
 DE oss             OSS (Open Sound System) playback
 DE pulse           Pulse audio output
  E sdl,sdl2        SDL2 output device
 DE video4linux2,v4l2 Video4Linux2 output device
 D  x11grab         X11 screen capture, using XCB
  E xv              XV (XVideo) output device

vs Termux:

# [...] compiler options omitted for brevity
Devices:
D. = Demuxing supported
.E = Muxing supported
---
D  lavfi           Libavfilter virtual input device

If it is at all possible to enable x11grab, and potentially more of these,
it's probably going to require additional patches to libavdevice.

@TomJo2000 TomJo2000 marked this pull request as draft January 2, 2025 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant