Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gst-plugins-bad gst-plugins-bad
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 985
    • Issues 985
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 132
    • Merge requests 132
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GStreamer
  • gst-plugins-badgst-plugins-bad
  • Issues
  • #1251

Closed
Open
Created Mar 24, 2020 by oleg krutov@olegkrutov

NVENC not working

Trying to build spice-streaming agent with gst-plugin to get h264 stream. Last known working config was gstreamer-1.16 (ubuntu system, rebuilt via apt-source etc.) After building from last master gstreamer-full-1.0 with following options:

-Ddefault_library=static -Dauto_features=disabled -Dbad=enabled -Dgst-full-libraries=app -Dgstreamer:registry=false -Dgst-plugins-bad:nvcodec=enabled -Dgst-plugins-bad:autoconvert=enabled -Dgst-plugins-base:app=enabled build

(with modified gstreamer init according to static-plugins examples) I can get following debug output:

0:00:00.000113915 15846 0x56265bf54800 INFO                GST_INIT gst.c:586:init_pre: Initializing GStreamer Core Library version 1.17.0.1
0:00:00.000255141 15846 0x56265bf54800 INFO                GST_INIT gst.c:587:init_pre: Using library installed in /usr/local/lib/x86_64-linux-gnu
0:00:00.000502188 15846 0x56265bf54800 INFO                GST_INIT gst.c:605:init_pre: Linux ubuntu 5.3.0-42-generic #34-Ubuntu SMP Fri Feb 28 05:49:40 UTC 2020 x86_64
0:00:00.001512767 15846 0x56265bf54800 INFO                GST_INIT gstmessage.c:129:_priv_gst_message_initialize: init messages
0:00:00.007308655 15846 0x56265bf54800 INFO                GST_INIT gstcontext.c:84:_priv_gst_context_initialize: init contexts
0:00:00.008578856 15846 0x56265bf54800 INFO      GST_PLUGIN_LOADING gstplugin.c:325:_priv_gst_plugin_initialize: registering 0 static plugins
0:00:00.008872903 15846 0x56265bf54800 INFO      GST_PLUGIN_LOADING gstplugin.c:233:gst_plugin_register_static: registered static plugin "staticelements"
0:00:00.008954281 15846 0x56265bf54800 INFO      GST_PLUGIN_LOADING gstplugin.c:235:gst_plugin_register_static: added static plugin "staticelements", result: 1
0:00:00.009048293 15846 0x56265bf54800 WARN            GST_REGISTRY gstregistry.c:1843:gst_update_registry: registry update failed: registry disabled
0:00:00.009144843 15846 0x56265bf54800 INFO                GST_INIT gst.c:806:init_post: GLib runtime version: 2.62.1
0:00:00.009235336 15846 0x56265bf54800 INFO                GST_INIT gst.c:808:init_post: GLib headers version: 2.62.1
0:00:00.009318846 15846 0x56265bf54800 INFO                GST_INIT gst.c:810:init_post: initialized GStreamer successfully
0:00:00.013978787 15846 0x56265bf54800 INFO                   nvenc gstnvenc.c:916:gst_nvenc_load_library: Supported SDK version 9.1
0:00:00.264812140 15846 0x56265bf54800 WARN                 nvcodec plugin.c:96:plugin_init: Failed to create cuda context, ret: 0x3e7
0:00:00.264970487 15846 0x56265bf54800 INFO      GST_PLUGIN_LOADING gstplugin.c:233:gst_plugin_register_static: registered static plugin "nvcodec"
0:00:00.265113703 15846 0x56265bf54800 INFO      GST_PLUGIN_LOADING gstplugin.c:235:gst_plugin_register_static: added static plugin "nvcodec", result: 1
0:00:00.266132537 15846 0x56265bf54800 INFO      GST_PLUGIN_LOADING gstplugin.c:233:gst_plugin_register_static: registered static plugin "app"
0:00:00.266272289 15846 0x56265bf54800 INFO      GST_PLUGIN_LOADING gstplugin.c:235:gst_plugin_register_static: added static plugin "app", result: 1
0:00:00.268933108 15846 0x56265bf54800 INFO      GST_PLUGIN_LOADING gstplugin.c:233:gst_plugin_register_static: registered static plugin "coreelements"
0:00:00.269087225 15846 0x56265bf54800 INFO      GST_PLUGIN_LOADING gstplugin.c:235:gst_plugin_register_static: added static plugin "coreelements", result: 1
0:00:00.269357864 15846 0x56265bf54800 INFO      GST_PLUGIN_LOADING gstplugin.c:233:gst_plugin_register_static: registered static plugin "autoconvert"
0:00:00.269471982 15846 0x56265bf54800 INFO      GST_PLUGIN_LOADING gstplugin.c:235:gst_plugin_register_static: added static plugin "autoconvert", result: 1
spice-streaming-agent[15846]: GOT START_STOP message -- request to START streaming
spice-streaming-agent[15846]: streaming starts now
0:00:26.217847747 15846 0x56265bf54800 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:358:gst_element_factory_create: creating element "pipeline" named "pipeline"
0:00:26.218285688 15846 0x56265bf54800 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:358:gst_element_factory_create: creating element "appsrc" named "capture"
0:00:26.218669058 15846 0x56265bf54800 INFO        GST_ELEMENT_PADS gstelement.c:749:gst_element_add_pad:<GstBaseSrc@0x56265bfe6230> adding pad 'src'
0:00:26.218838098 15846 0x56265bf54800 INFO     GST_ELEMENT_FACTORY gstelementfactory.c:358:gst_element_factory_create: creating element "autovideoconvert" named "convert"
0:00:26.219191004 15846 0x56265bf54800 INFO        GST_ELEMENT_PADS gstelement.c:749:gst_element_add_pad:<GstAutoVideoConvert@0x56265bfec030> adding pad 'sink'
0:00:26.219374894 15846 0x56265bf54800 INFO        GST_ELEMENT_PADS gstelement.c:749:gst_element_add_pad:<GstAutoVideoConvert@0x56265bfec030> adding pad 'src'
spice-streaming-agent[15846]: Gstreamer plugin: No suitable encoder was found for 'video/x-h264, stream-format=(string)byte-stream, framerate=(fraction)25/1'
0:00:26.220516089 15846 0x56265bf54800 INFO         GST_REFCOUNTING gstelement.c:3332:gst_element_dispose:<convert> 0x56265bfec030 dispose
0:00:26.220718506 15846 0x56265bf54800 INFO        GST_ELEMENT_PADS gstelement.c:865:gst_element_remove_pad:<convert> removing pad 'sink'
0:00:26.220899534 15846 0x56265bf54800 INFO        GST_ELEMENT_PADS gstelement.c:865:gst_element_remove_pad:<convert> removing pad 'src'
0:00:26.221026538 15846 0x56265bf54800 INFO         GST_REFCOUNTING gstelement.c:3377:gst_element_dispose:<convert> 0x56265bfec030 parent class dispose
0:00:26.221222983 15846 0x56265bf54800 INFO         GST_REFCOUNTING gstelement.c:3409:gst_element_finalize:<convert> 0x56265bfec030 finalize
0:00:26.221353867 15846 0x56265bf54800 INFO         GST_REFCOUNTING gstelement.c:3414:gst_element_finalize:<convert> 0x56265bfec030 finalize parent
0:00:26.221548791 15846 0x56265bf54800 INFO         GST_REFCOUNTING gstelement.c:3332:gst_element_dispose:<capture> 0x56265bfe6230 dispose
0:00:26.221679713 15846 0x56265bf54800 INFO        GST_ELEMENT_PADS gstelement.c:865:gst_element_remove_pad:<capture> removing pad 'src'
0:00:26.221837986 15846 0x56265bf54800 INFO         GST_REFCOUNTING gstelement.c:3377:gst_element_dispose:<capture> 0x56265bfe6230 parent class dispose
0:00:26.222007034 15846 0x56265bf54800 INFO         GST_REFCOUNTING gstelement.c:3409:gst_element_finalize:<capture> 0x56265bfe6230 finalize
0:00:26.222203698 15846 0x56265bf54800 INFO         GST_REFCOUNTING gstelement.c:3414:gst_element_finalize:<capture> 0x56265bfe6230 finalize parent
0:00:26.222360050 15846 0x56265bf54800 INFO         GST_REFCOUNTING gstelement.c:3332:gst_element_dispose:<pipeline> 0x56265bfe8130 dispose
0:00:26.222670607 15846 0x56265bf54800 INFO         GST_REFCOUNTING gstelement.c:3377:gst_element_dispose:<pipeline> 0x56265bfe8130 parent class dispose
0:00:26.222803440 15846 0x56265bf54800 INFO         GST_REFCOUNTING gstelement.c:3409:gst_element_finalize:<pipeline> 0x56265bfe8130 finalize
0:00:26.222950572 15846 0x56265bf54800 INFO         GST_REFCOUNTING gstelement.c:3414:gst_element_finalize:<pipeline> 0x56265bfe8130 finalize parent
spice-streaming-agent[15846]: Error creating capture engine: Gstreamer's encoder element cannot be created
spice-streaming-agent[15846]: Failed to get device info using DRM: Unable to get DRM resources for card /dev/dri/card1. Using no-DRM fallback.
spice-streaming-agent[15846]: Error while getting device display info: Failed to realpath "card1": No such file or directory
spice-streaming-agent[15846]: Got device info of 0 devices from the plugin

Nvidia drivers are the same version that worked successfully with gstreamer 1.16 (440.56)

Edited Mar 24, 2020 by oleg krutov
Assignee
Assign to
Time tracking