Skip to content

v4l-utils: 1.24.1 -> 1.30.1 (and thereby drop edid-decode)#419046

Merged
flokli merged 6 commits intoNixOS:stagingfrom
Yarny0:v4l-utils
Jun 24, 2025
Merged

v4l-utils: 1.24.1 -> 1.30.1 (and thereby drop edid-decode)#419046
flokli merged 6 commits intoNixOS:stagingfrom
Yarny0:v4l-utils

Conversation

@Yarny0
Copy link
Contributor

@Yarny0 Yarny0 commented Jun 22, 2025

This updates v4l-utils and libv4l=v4l-utils.override { withGUI=false; } to the newest version. This brings some changes:

While we're at it, this pull request also

This pull request might replace #408927 . Dear @MisileLab : I'm really sorry. I haven't seen your pull request before I've already prepare mine. Would you mind this one taking over and replacing yours?

Notifying v4l-utils maintainer @codyopel: Would you mind having me as co-maintainer?

Notifying edid-decode maintainer @Madouura: Would you like to join v4l-utils maintainership?

Notifying maintainers of some random packages that depend on v4l-utils (sorry for bugging you, but this update changes a lot and v4l-utils appears to be an important dependency, and I want to avoid breaking other packages):

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • Nixpkgs 25.11 Release Notes (or backporting 24.11 and 25.05 Nixpkgs Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
  • NixOS 25.11 Release Notes (or backporting 24.11 and 25.05 NixOS Release notes)
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other contributing documentation in corresponding paths.

More:

  • The output of v4l2-ctl --list-formats-ext -d /dev/video0 seems alright.
  • dvbv5-zap --adapter=0 --channel=channels.dvbv5 --pat --output=/tmp/output.ts $CHANNEL_NAME records some TV into the output file as expected (tested with dvb-t2 and dvb-s2).
  • qv4l2 starts up and looks nice, so qt6 seems to work alright (I haven't tested any hardware access with this program).
  • dvbv5-scan --get_frontend --nit ${dtv-scan-tables}/share/dvbv5/dvb-t/${SOME_TRANSPONDER_FILE} finds a lot of dvb-t channels, as it should.
  • dtv-scan-tables builds (it uses ${v4l-utils}/bin/dvb-format-convert during the build).
  • mpv av://v4l2:/dev/video0 shows a webcam's video stream.
  • I'm regularly using something like ffmpeg -f v4l2 -framerate 30 -video_size 1280x720 -input_format mjpeg -i /dev/video0 -vf 'scale=4*iw:-1,crop=1280:720,format=yuv420p' -f v4l2 /dev/video9 to zoom my webcam's picture and feed it into a v4l2-loopback device. This still works.
  • mpv dvb://$CHANNEL works (tested with dvb-s).

Add a 👍 reaction to pull requests you find important.

Yarny0 added 6 commits June 22, 2025 18:56
It now builds with meson, cf.
https://git.linuxtv.org/v4l-utils.git/commit/?id=c252c887c4e390fd7fd8b9f059680e5de3b5f540
It also no longer creates `.la` files for libtool.

We also switch to Qt6 (with `qt5compat`), cf.
https://git.linuxtv.org/v4l-utils.git/commit/?id=ac99ab1b812d7a68ad078e42f49035a7671a6433

On the other hand, it implicitely adds some content
to the packages that are derived from this recipe:

* share/doc now contains 6 MiB of html documentation
* lib/gconv apparently contains files to decode
  Japanese DVB tables (see `README.md` in the sources)
* new program `v4l2-tracer`
* new program `edid-decode`, obsoleting the `edid-decode` package, cf.
  https://git.linuxtv.org/v4l-utils.git/commit/?id=363495b6df0dc30a0d63d49720ebbfa33f65c91f
@MisileLab MisileLab mentioned this pull request Jun 22, 2025
13 tasks
@MisileLab
Copy link
Contributor

Yeah, I closed my pull request.
Thanks for contributing.

@github-actions github-actions bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Jun 22, 2025
@PedroHLC
Copy link
Member

PedroHLC commented Jun 22, 2025

It doesn't look like from the mentioned commit that this is an official replacement to edid-decode, sounds like vendor-ing instead. The original package didn't have dependencies, which might be better for packages that need it without v4l2-utils and its dependencies. The question is, what packages are using it (without also depending on v4l2-utils), and what their maintainers prefer?

@Yarny0
Copy link
Contributor Author

Yarny0 commented Jun 22, 2025

It doesn't look like from the mentioned commit that this is an official replacement to edid-decode, sounds like vendor-ing instead. The original package didn't have dependencies, which might be better for packages that need it without v4l2-utils and its dependencies.

The edid-decode source repository has been abandoned, and v4l-utils in its current release has already received numerous patches for edid-decode. So I guess we have no choice but to use the version from v4l-utils. We might add another build option withEdidDecodeOnly or likewise that avoids building other programs besides edid-decode, or removes unneeded files from the output. I'm not sure if that's worth the effort, but I can prepare and add a patch to the branch if it is.

@K900
Copy link
Contributor

K900 commented Jun 22, 2025

SGTM.

@flokli flokli merged commit b661f52 into NixOS:staging Jun 24, 2025
26 of 27 checks passed
@Yarny0 Yarny0 deleted the v4l-utils branch July 4, 2025 10:11
@alyssais
Copy link
Member

alyssais commented Jul 6, 2025

Broke musl; fix is #422973.

@kimburgess
Copy link
Member

Removing edid-decode and aliasing has caused a bit of breakage here. Previously that package was available for all, but is now platforms.linux only.

That precludes usage on Darwin (where I've just hit this) and looks like it may impact hw-probe and edid-generator, which both have wider platform scopes.

Although it's now in that same repo, IMO there could be some value in keeping a discrete package available.

@Yarny0
Copy link
Contributor Author

Yarny0 commented Nov 30, 2025

Although it's now in that same repo, IMO there could be some value in keeping a discrete package available.

Unfortunatelly, I can't test compilation on darwin platforms (is there an easy way to emulate that on x86_64-linux NixOS systems?).

I would avoid creating a dedicated package for edid-decode, but instead try to expand the build recipe for v4l-utils so that it also builds on darwin platforms, with everything removed that does not build on darwin (something like if stdenv.buildPlatform.isDarwin ...).

From what I tried, v4l-utils seems to build fine with dependencies udevCheckHook, libbpf, udev, alsa-lib and libGLU removed (however, tested on x86_64-linux only). Is that enough to build it on darwin platforms? Can you try that, or otherwise reduce the current list of dependencies (and meson feature options) until it builds on darwin? I'd be happy to review a pull request, abeit I cannot test builds on darwin.

@kimburgess
Copy link
Member

I've just had a quick play with adding some optionality to those dependencies. Unfortunately the build is now blocking by needing to link to librt, which does not exist on Darwin.

I'm not super familiar with Meson so this is a good excuse to change that. I'll keep working at something here then hopefully send a PR your way.

'';

nativeBuildInputs = [
clang
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we require clang rather than use whatever the stdenv provides?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we need it for BPF-related functionality: https://github.com/gjasny/v4l-utils/blob/v4l-utils-1.30.1/meson.build#L86
But since that's disabled in cross environments, clang shouldn't be added to nativeBuildInputs in those.

@kimburgess
Copy link
Member

I've not had much luck getting this build trimmed down for cross-platform tools. There's a lot happening in that repo and no clean way to extract just edid-decode et al with the time I have right now.

In case anyone else sees this and would like to continue that work, dropping librt was quite trivial. This moved into glibc with version 2.34 so the additional library is no longer needed. This can be removed from the v4l-utils build with this patch: https://gist.github.com/kimburgess/682dc27b78e93a6d247cdd875e0db5ec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants