You launch a capture-and-encode pipeline with gst-launch-1.0, the log fills with GLib-GObject-WARNING lines about types that cannot register, and the process reports Caught SIGSEGV before the first frame. Swapping the encoder element makes the crash disappear; swapping the USB camera changes nothing. That combination points at one file on the board, not at your hardware. This guide is for engineers bringing up USB or board-level cameras on embedded boards who need the recording pipeline running now. You will read the warnings correctly, run two tests that clear the camera and the encoder, delete the stale GStreamer plugin registry cache, and know what to check when a freshly rebuilt cache still warns.
Why does GStreamer say 'cannot register existing type' and then crash?
Those GLib messages mean GLib tried to register a GObject type — 'GstV4l2VideoDec' in this log — that something had already registered, and once the registration fails, the element is built from an invalid type and the process dies with SIGSEGV.
Every GStreamer element class is a GObject type registered once per process through the type system. The v4l2 support plugin that ships with the gst-plugins-good set registers its classes by name when it loads, and its decoder class registration is what GLib echoes back as a warning. Two copies of the same plugin in one process therefore produce exactly this sequence:
GLib-GObject-WARNING **: cannot register existing type 'GstV4l2VideoDec'
GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed
GLib-GObject-CRITICAL **: g_object_new_valist: assertion 'G_TYPE_IS_OBJECT (object_type)' failed
Caught SIGSEGV
The later criticals are consequences, not separate faults: the failed type never became a valid object, so creating it, then referencing it, fails step by step until the segfault. The failing log also shows 'GstV4l2BufferPool' hitting the same duplicate-registration warning. The 'Opening in BLOCKING MODE' line just above is routine device-open output, not part of the fault.
A SIGSEGV in gst-launch has other causes too. If yours follows network setup on a GigE camera instead, work through the GigE camera SIGSEGV fix first; the systems topic gathers the neighbouring capture-pipeline failures.
Is it the encoder, the camera, or the system?
When one encoder element runs the same pipeline cleanly and a second one dies with these warnings, and two different USB cameras reproduce identical warnings, the camera and the encoder are both cleared and the system's plugin state is the remaining suspect.
Run the three swaps in order; each takes a minute:
- Swap the encoder. The failing graph used nvv4l2h265enc; the same graph with omxh265enc recorded to completion. That clears the encoder and everything downstream of it.
- Swap the camera. A second USB camera with a different image sensor threw the same warnings at the same point. That clears the camera and its driver.
- Shorten the graph. Replace h265parse ! qtmux ! filesink with fakesink. The warnings still appear, which places the failure at plugin load time, not in the muxer or sink.
When every device variant prints the same message, the variable left is system state, and the plugin registry is where that state lives. The same divide-and-confirm logic applies to any startup failure; the capture pipeline isolation guide walks the full method.
Which file is the GStreamer plugin registry cache?
On a 64-bit ARM board the cache is a single file, ~/.cache/gstreamer-1.0/registry.aarch64.bin, where the suffix is the CPU architecture; GStreamer scans installed plugins once, writes the result there, and loads that file on every later launch. On a unit with a couple of dozen plugin packages the file runs to a few MB.
The record holds what each plugin library provides, so later launches can skip the scan. It is written per user: a pipeline started from your shell uses your file, and a service running under another account keeps its own. The directory name stays ~/.cache/gstreamer-1.0/ on other boards; only the architecture in the file name changes.
If your launch scripts point GStreamer at a registry somewhere else, delete the file your configuration names rather than the default one.
How do you clear the cache and prove the fix?
Delete the registry file, then run the failing pipeline again: the next launch re-scans every installed plugin, rebuilds the cache, starts noticeably slower once — expect a re-scan of roughly 5-30 s on a typical ARM board against well under 1 s from the cache — and should reach PLAYING with no GLib warnings; the second launch should be fast again.
cd ~
rm .cache/gstreamer-1.0/registry.aarch64.bin
gst-launch-1.0 v4l2src device=/dev/video0 io-mode=2 num-buffers=100 ! \
'image/jpeg,width=1280,height=720, framerate=60/1,format=I420' ! jpegdec ! video/x-raw ! \
nvvidconv ! 'video/x-raw(memory:NVMM)' ! nvv4l2h265enc ! h265parse ! qtmux ! \
filesink location=filename_h265.mp4 -e
Plain rm removes your own cache; sudo is only for a file another account wrote, as in the vendor fix command for this failure. Confirm all four:
- no GLib-GObject-WARNING or GLib-CRITICAL lines at startup;
- the pipeline moves from PAUSED to PLAYING and prints its clock line;
- the run ends cleanly after 100 buffers, about 1.7 s at 60 fps;
- filename_h265.mp4 exists where filesink pointed and holds roughly 100 frames.
Why does the registry go stale in the first place?
The cache is a snapshot taken at one moment; installing, upgrading, removing or duplicating plugin libraries after that scan leaves the stored list out of step with what actually loads, and a duplicated plugin is the form that trips type registration.
The usual triggers:
- plugin packages installed or updated while a cache existed;
- a camera or codec stack that ships a second copy of a plugin the distribution already provides, so one process registers the same type names twice;
- a partially removed upgrade that leaves two library versions behind.
The scan is meant to notice changed plugin files and refresh itself, so the failures that reach this symptom are the cases where it did not. Prevention costs one command: after installing or updating plugins or a device stack, delete the registry once and relaunch, before debugging anything else. A missing plugin is the cousin failure — for a negotiation error instead of a crash, the GStreamer missing-plugins fix is the closer read.
When is it not the cache?
If a freshly rebuilt cache still produces the warnings on every launch, you almost certainly have two copies of the same plugin library in the search path — typically a distribution GStreamer alongside a second install — and deleting the cache cannot fix that.
Work down the list:
- One plugin set only. Confirm the launch environment picks up a single plugin directory tree. A hand-built GStreamer installed next to the distribution packages is the usual way a second copy appears.
- Matched plugin versions. The stack in this failure ran GStreamer 1.14.5; mixing plugins from different 1.x generations in one process is a known fragility, so keep the whole plugin set from one source.
- Reinstall or re-image. The vendor's next step after the cache clean was a clean re-flash with the board's own flashing tool. On a unit that has to ship, reinstalling the multimedia stack beats chasing individual libraries.
If one plugin set and a fresh cache still warn, take the case to the board vendor's support channel with the full log. Everything up to that point is on your side and covered above.
What should the working pipeline caps look like?
Pin the pixel format on the hardware-memory caps before the encoder — format=NV12 — because the failing attempt left the format unset on video/x-raw(memory:NVMM) and the working version sets it explicitly.
Once the crash is gone, align the graph with the variant that recorded cleanly on the same hardware:
... jpegdec ! video/x-raw ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! nvv4l2h265enc ! h265parse ! qtmux ! filesink location=filename_h265.mp4 -e
- format=NV12 on the NVMM caps. An unset format leaves the converter's output to negotiation; pinning NV12 matches what the encoder consumed in the working run.
- Quote the caps string. Parentheses and the memory feature are exactly where gst-launch quoting breaks; the caps quoting fix gives the rule.
- Bound the test. num-buffers=100 with -e ends the recording on its own, which makes pass and fail unambiguous.
For an element-by-element reading of strings like this, the on-board capture pipeline guide breaks each part down.
Which cameras keep this class of problem off your rig?
Cameras that the stock plugins already open without extra vendor packages keep this startup failure rare, because the fewer plugin libraries a unit carries, the smaller the chance that two of them claim the same type names.
For embedding, the board-level form factor puts the camera on the carrier board you already have. The LS-BCM-0003 covers motion work with a 3.1 MP global shutter at 120 fps on a 1/1.8" IMX252 sensor behind a C-mount; the MV-CB060-10UM-B is the 6 MP rolling-shutter option on an IMX178 sensor, a 1/1.8" format, supplied as a bare board.
- Sensor format
- 1/1.8"
- Lens mount
- C-mount
- Interface
- USB3
- Resolution
- 5 MP
- Sensor format
- 1/1.8"
- Interface
- USB3
- Resolution
- 6-10 MP
- Shutter
- Rolling
Both stream over USB3 into a stock GStreamer stack — exactly the setup the cache fix above protects. Before a board camera goes into a design, run the board camera evaluation checklist. The board-level cameras category and the camera finder hold the full range, the camera configurator steps through sensor, interface and mount in order, and the contact page is open if you want a proposed pipeline checked before you order.
Questions
Is it safe to delete the GStreamer registry cache?
Yes. The file is a scan cache of the installed plugin libraries and the features they provide, not a store of settings, presets or pipeline definitions, so nothing is lost. GStreamer rebuilds it automatically on the next launch and caching resumes exactly as before.
Why do the warnings name GstV4l2VideoDec when my pipeline never decodes video?
The type names come from the v4l2 support plugin, not from your pipeline graph. v4l2src loads that plugin, and loading it registers the plugin's element and base classes, including its decoder class, whether or not your pipeline uses them. So a capture-and-encode pipeline can still trip over a duplicated decoder type registration.
Does the fix differ if my board is not ARM64?
The mechanism is identical; only the file name changes. The registry lives in ~/.cache/gstreamer-1.0/ and its name ends in the board's architecture, aarch64 on a 64-bit ARM unit. List that directory, delete the registry file whose name matches your architecture, and relaunch; the rebuild behaviour is the same.
Can the cache be shared between users on one unit?
No, it is written per user account. A pipeline launched from your shell uses your cache, while a service running as root or a dedicated account maintains its own copy. Clear the cache of the account that actually launches gst-launch-1.0, and reach for sudo only when that account is not the one you are logged in as.
Should I clear the cache on every boot to prevent this?
No. The rebuilt cache is valid until the plugin set changes; deleting it on every boot only adds a plugin re-scan to each start. Clear it after installing or updating plugins or a device stack, or when these specific warnings return, not as routine maintenance.

