You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
moq-ffi bindings have no hardware codecs (moq-video default-features=false), and Kind::Auto falls back to software silently #2947
Two related things, on Linux with a working NVIDIA driver:
moq-ffi builds moq-video without the nvenc / nvdec features, so no
language binding can use the hardware codecs at all.
When a hardware backend is compiled but its runtime probe fails, Kind::Auto falls back to software silently, so the first symptom is
throughput rather than a diagnostic.
The comment on that line explains the intent in terms of capture:
default-features = false is also what keeps capture (V4L2, libclang) out of
moq-ffi, and through it the cross-compiled Python, Swift, Kotlin, and Go
builds, which want the codecs and not the device stack.
nvenc and nvdec look like collateral rather than the goal, since they are
codecs and not the device stack. They also seem cheap to keep: per their own
feature docs both are dlopen'd at runtime, so an nvenc-enabled build "links
GPU-less and starts driverless, falling back to the next encoder". They add cudarc / moq-nvenc / libloading as build dependencies, not runtime ones.
Adding features = ["nvenc"] builds cleanly and Kind::Hardware then opens
successfully on an RTX 3070 Ti (driver 595.71.05), so nothing else is missing.
If excluding them from the cross-compiled bindings is deliberate, it would help
to say so in that comment, since today it reads as being only about capture.
2. The fallback is silent
With nvenc compiled in, the backend still refused to open until the driver
libraries were reachable:
DEBUG moq_video::encode::backend: encoder unavailable, trying next encoder="nvenc"
error=NVIDIA driver libraries not found (libcuda / libnvidia-encode); NVENC unavailable
libcuda.so.1 and libnvidia-encode.so.1 were present in /usr/lib64 the
whole time; they were simply not on the loader path for a nix-built interpreter,
and putting them on LD_LIBRARY_PATH fixed it.
Kind::Hardware reports this properly:
no usable video encoder found (tried: nvenc)
but Kind::Auto just returns a working openh264 encoder and says nothing above
DEBUG. Since Auto is the documented default, the practical result is that a
host with a perfectly good GPU encodes in software and the only clue is the
frame rate. A one-line WARN when Auto falls past a compiled-in hardware
backend would make that self-diagnosing, without changing the fallback
behaviour, which is the right behaviour.
Environment: Linux x86_64, Fedora 44, NVIDIA 595.71.05, RTX 3070 Ti, moq-ffi
built from adad52b.
Found alongside #2946, while working out why publishing two 640x360 camera
feeds was slow. In that case the cost turned out to be #2946 rather than the
codec, but the software fallback was invisible until it was looked for directly.
#2462 - build(rust): pin the toolchain and correct the MSRV claims [merged] #2465 - build(moq-video): bump moq-vaapi to 0.0.3 (dlopen libva) [merged] #2608 - feat(bindings): publish raw video with a native encoder [merged] #2669 - fix(libmoq): unbreak the Linux C link list, and make VAAPI opt-in [merged] #2839 - feat(video): render PipeWire DMA-BUF frames [merged]
📝 Issue Planner
Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.
Create Plan
🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your .coderabbit.yaml:
issue_enrichment:
auto_enrich:
enabled: false
💬 Have feedback or questions? Drop into our discord!
Activity
coderabbitai commentedon Aug 19, 2026
🔗 Related PRs
#2462 - build(rust): pin the toolchain and correct the MSRV claims [merged]
#2465 - build(moq-video): bump moq-vaapi to 0.0.3 (dlopen libva) [merged]
#2608 - feat(bindings): publish raw video with a native encoder [merged]
#2669 - fix(libmoq): unbreak the Linux C link list, and make VAAPI opt-in [merged]
#2839 - feat(video): render PipeWire DMA-BUF frames [merged]
📝 Issue Planner
Check the box below or use the
@coderabbitai plancommand to generate an implementation plan and prompts that you can use with your favorite coding assistant.🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord!