{"record":{"id":"d76eaa2c3f58590a","repo":"m1k1o/neko","slug":"required-gstreamer-plugin-s-not-found","errorCode":null,"errorMessage":"required gstreamer plugin %s not found","messagePattern":"required gstreamer plugin (.+?) not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/pkg/gst/gst.go","lineNumber":195,"sourceCode":"\n\tok := C.gstreamer_pipeline_set_caps_resolution(p.ctx, cBinName, cWidth, cHeight)\n\treturn ok == C.TRUE\n}\n\nfunc (p *pipeline) EmitVideoKeyframe() bool {\n\tok := C.gstreamer_pipeline_emit_video_keyframe(p.ctx)\n\treturn ok == C.TRUE\n}\n\n// gst-inspect-1.0\nfunc CheckPlugins(plugins []string) error {\n\tvar plugin *C.GstPlugin\n\tfor _, pluginstr := range plugins {\n\t\tplugincstr := C.CString(pluginstr)\n\t\tplugin = C.gst_registry_find_plugin(registry, plugincstr)\n\t\tC.free(unsafe.Pointer(plugincstr))\n\t\tif plugin == nil {\n\t\t\treturn fmt.Errorf(\"required gstreamer plugin %s not found\", pluginstr)\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc CheckElement(element string) error {\n\telementcstr := C.CString(element)\n\tfactory := C.gst_element_factory_find(elementcstr)\n\tC.free(unsafe.Pointer(elementcstr))\n\tif factory == nil {\n\t\treturn fmt.Errorf(\"required gstreamer element %s not found\", element)\n\t}\n\tC.gst_object_unref(C.gpointer(factory))\n\treturn nil\n}\n\n//export goHandlePipelineBuffer","sourceCodeStart":177,"sourceCodeEnd":213,"githubUrl":"https://github.com/m1k1o/neko/blob/b0f01cedea68893e85a3fd852c0521238c285695/server/pkg/gst/gst.go#L177-L213","documentation":"CheckPlugins iterates a list of required GStreamer plugin names and looks each up in the GStreamer registry via gst_registry_find_plugin. If any plugin is absent from the installed GStreamer runtime, it returns this error naming the missing plugin. It is a pre-flight environment check, so the pipeline is never created.","triggerScenarios":"Calling NewVideoPipeline or NewAudioPipeline (both invoke CheckPlugins) on a machine where one of the required GStreamer plugins (e.g., from gst-plugins-base/good/bad) is not installed or GStreamer is not on the plugin search path (GST_PLUGIN_PATH/GST_PLUGIN_SYSTEM_PATH).","commonSituations":"Fresh servers or Docker images with only gstreamer1.0 core installed, missing -plugins-base/-good/-bad packages; container images built without GStreamer; broken GST_PLUGIN_SYSTEM_PATH pointing to a directory without the plugins; distribution packages that split plugins into many small packages.","solutions":["Install the GStreamer plugin set containing the named plugin (Debian/Ubuntu: gstreamer1.0-plugins-base/good/bad/ugly; Fedora: gstreamer1-plugins-*).","Verify with `gst-inspect-1.0 <plugin>` that the plugin is visible to the runtime.","If installed but not found, check GST_PLUGIN_PATH / GST_PLUGIN_SYSTEM_PATH environment variables and fix the plugin search path.","In Docker, rebuild the image installing the full gstreamer plugin packages, not just libgstreamer."],"exampleFix":"// Dockerfile before\nRUN apt-get install -y libgstreamer1.0-0\n// after\nRUN apt-get install -y libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad","handlingStrategy":"validation","validationCode":"for _, p := range []string{\"videotestsrc\", \"x264enc\", \"rtph264pay\"} {\n    if err := gst.CheckPlugins([]string{p}); err != nil {\n        return fmt.Errorf(\"environment check failed: %w\", err)\n    }\n}","typeGuard":null,"tryCatchPattern":"if err := gst.CheckPlugins(required); err != nil {\n    return fmt.Errorf(\"missing gstreamer runtime: %w\", err) // surface plugin name to installer/logs\n}","preventionTips":["Install the full gstreamer1.0-plugins-base/good/bad (and ugly/libav if needed) sets in deployment images.","Run gst-inspect-1.0 on all required plugins as a startup/CI health check.","Keep GST_PLUGIN_PATH/GST_PLUGIN_SYSTEM_PATH correct in containers and CI.","Document the exact GStreamer packages required by the library in your deployment docs."],"tags":["gstreamer","missing-dependency","environment"],"backgroundTag":"missing-gstreamer-plugin","analyzedSha":"b0f01cedea68893e85a3fd852c0521238c285695","analyzedAt":"2026-09-01T10:35:56.638Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}