Unable to set the pipeline to the playing state error when using deepstream service maker.How?

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)
rtx 2060
• DeepStream Version
deepstream 7.0
• JetPack Version (valid for Jetson only)
• TensorRT Version
with deepstream 7.0 docker image
• NVIDIA GPU Driver Version (valid for GPU only)
535
• Issue Type( questions, new requirements, bugs)
questions
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)

Unable to set the pipeline to the playing state error when using deepstream service maker.

I refer to What is Deepstream Service Maker — DeepStream documentation 6.4 documentation to try to write a basic program, which is simplified to only need to input a yaml file to run.

My code is as follows:

 

int main(int argc, char *argv[])
{
    try {
        Pipeline pipeline("my-pipeline", "config.yaml");
    
        // pipeline["src"].set("uri", argv[1]);
        pipeline.start().wait();
    } catch (const std::exception &e) {
        std::cerr << e.what() << std::endl;
        return -1;
    }
    return 0;
}

and the config.yaml like this:

deepstream:
  nodes:
  - type: nvurisrcbin
    name: src
    properties:
      uri: file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.mp4
  - type: nvstreammux
    name: mux
    properties:
      batch-size: 1
      width: 1280
      height: 720
  - type: nvinferbin
    name: infer
    properties:
      config-file-path: /opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_infer_primary.yml
  - type: nvosdbin
    name: osd
  - type: nveglglessink
    name: sink
  edges:
    src: mux
    mux: infer
    infer: osd
    osd: sink  

The only difference from the standard documentation example is the addition of properties:
uri: xxx,

However, I encountered: error, why?


 ./my-deepstream-app 
Initializing GStreamer Backend...!

Node -- deepstream : 

Node -- nodes : 

Node -- edges : 
Element ---- nvurisrcbin RefName src
uri:file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.mp4
Element ---- nvstreammux RefName mux
batch-size:1
width:1280
height:720
Element ---- nvinferbin RefName infer
config-file-path:/opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_infer_primary.yml
Element ---- nvosdbin RefName osd
Element ---- nveglglessink RefName sink
Element: nvurisrcbin, Name: src
  set uri: file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.mp4
Add Element ... src
Element: nvstreammux, Name: mux
  set batch-size: 1
  set width: 1280
  set height: 720
Add Element ... mux
Element: nvinferbin, Name: infer
  set config-file-path: /opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_infer_primary.yml
Add Element ... infer
Element: nvosdbin, Name: osd
Add Element ... osd
Element: nveglglessink, Name: sink
Add Element ... sink
LINKING: Source: src Target: mux
LINKING: Source: mux Target: infer
LINKING: Source: infer Target: osd
LINKING: Source: osd Target: sink
0:00:07.166738384  3625 0x735af51e2360 INFO                 nvinfer gstnvinfer.cpp:682:gst_nvinfer_logger:<nvinfer_bin_nvinfer> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:2095> [UID = 1]: deserialized trt engine from :/opt/nvidia/deepstream/deepstream-7.0/samples/models/Primary_Detector/resnet18_trafficcamnet.etlt_b30_gpu0_int8.engine
uri:INFO: ../nvdsinfer/nvdsinfer_model_builder.cpp:612 [Implicit Engine Info]: layers num: 3
0   INPUT  kFLOAT input_1         3x544x960       
1   OUTPUT kFLOAT output_bbox/BiasAdd 16x34x60        
2   OUTPUT kFLOAT output_cov/Sigmoid 4x34x60         

0:00:07.309863992  3625 0x735af51e2360 INFO                 nvinfer gstnvinfer.cpp:682:gst_nvinfer_logger:<nvinfer_bin_nvinfer> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2198> [UID = 1]: Use deserialized engine model: /opt/nvidia/deepstream/deepstream-7.0/samples/models/Primary_Detector/resnet18_trafficcamnet.etlt_b30_gpu0_int8.engine
0:00:07.317653854  3625 0x735af51e2360 INFO                 nvinfer gstnvinfer_impl.cpp:343:notifyLoadModelStatus:<nvinfer_bin_nvinfer> [UID 1]: Load new model:/opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_infer_primary.yml sucessfully
Unable to set the pipeline to the playing state.

• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

Could you attach the log with the command GST_DEBUG=3 ./my-deepstream-app?

@yuweiw
this is whole log:

 GST_DEBUG=3 ./my-deepstream-app
Initializing GStreamer Backend...!
libva info: VA-API version 1.14.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: va_openDriver() returns -1
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: va_openDriver() returns -1
0:00:00.031811068   758 0x59587f133800 ERROR            msdkcontext gstmsdkcontext.c:177:gst_msdk_context_use_vaapi: Couldn't initialize VA DRM display
0:00:00.039826313   758 0x59587f133800 WARN               vadisplay gstvadisplay.c:347:gst_va_display_initialize:<vadisplaydrm0> vaInitialize: unknown libva error
0:00:00.040118566   758 0x59587f133800 WARN               vadisplay gstvadisplay.c:287:_va_warning:<vadisplaydrm1> VA error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
0:00:00.040155540   758 0x59587f133800 WARN               vadisplay gstvadisplay.c:347:gst_va_display_initialize:<vadisplaydrm1> vaInitialize: unknown libva error

Node -- deepstream : 

Node -- nodes : 

Node -- edges : 
Element ---- nvurisrcbin RefName src
uri:file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.mp4
Element ---- nvstreammux RefName mux
batch-size:1
width:1280
height:720
Element ---- nvinferbin RefName infer
config-file-path:/opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_infer_primary.yml
Element ---- nvosdbin RefName osd
Element ---- nveglglessink RefName sink
Element: nvurisrcbin, Name: src
  set uri: file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.mp4
Add Element ... src
Element: nvstreammux, Name: mux
  set batch-size: 1
  set width: 1280
  set height: 720
Add Element ... mux
Element: nvinferbin, Name: infer
  set config-file-path: /opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_infer_primary.yml
Add Element ... infer
Element: nvosdbin, Name: osd
Add Element ... osd
Element: nveglglessink, Name: sink
Add Element ... sink
LINKING: Source: src Target: mux
0:00:00.612145477   757 0x5bce45aa7f90 ERROR            nvstreammux gstnvstreammux.cpp:1611:gst_nvstreammux_request_new_pad:<mux> Pad should be named 'sink_%u' when requesting a pad
LINKING: Source: mux Target: infer
LINKING: Source: infer Target: osd
LINKING: Source: osd Target: sink
0:00:17.459934897   757 0x7777591bb4a0 INFO                 nvinfer gstnvinfer.cpp:682:gst_nvinfer_logger:<nvinfer_bin_nvinfer> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:2095> [UID = 1]: deserialized trt engine from :/opt/nvidia/deepstream/deepstream-7.0/samples/models/Primary_Detector/resnet18_trafficcamnet.etlt_b30_gpu0_int8.engine
uri:INFO: ../nvdsinfer/nvdsinfer_model_builder.cpp:612 [Implicit Engine Info]: layers num: 3
0   INPUT  kFLOAT input_1         3x544x960       
1   OUTPUT kFLOAT output_bbox/BiasAdd 16x34x60        
2   OUTPUT kFLOAT output_cov/Sigmoid 4x34x60         

0:00:17.837009490   757 0x7777591bb4a0 INFO                 nvinfer gstnvinfer.cpp:682:gst_nvinfer_logger:<nvinfer_bin_nvinfer> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2198> [UID = 1]: Use deserialized engine model: /opt/nvidia/deepstream/deepstream-7.0/samples/models/Primary_Detector/resnet18_trafficcamnet.etlt_b30_gpu0_int8.engine
0:00:17.872675983   757 0x7777591bb4a0 INFO                 nvinfer gstnvinfer_impl.cpp:343:notifyLoadModelStatus:<nvinfer_bin_nvinfer> [UID 1]: Load new model:/opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_infer_primary.yml sucessfully
0:00:17.873113162   757 0x7777591bb4a0 WARN            uridecodebin gsturidecodebin.c:1434:gen_source_element:<nvurisrc_bin_src_elem> error: No URI specified to play from.
Unable to set the pipeline to the playing state.

Could you try to modify your config file like below?

  - type: fakesink
    name: sink

@yuweiw
The same with this:

 GST_DEBUG=3 ./my-deepstream-app
Initializing GStreamer Backend...!

Node -- deepstream : 

Node -- nodes : 

Node -- edges : 
Element ---- nvurisrcbin RefName src
uri:file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.mp4
Element ---- nvstreammux RefName mux
batch-size:1
width:1280
height:720
Element ---- nvinferbin RefName infer
config-file-path:/opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_infer_primary.yml
Element ---- nvosdbin RefName osd
Element ---- fakesink RefName sink
Element: nvurisrcbin, Name: src
  set uri: file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.mp4
Add Element ... src
Element: nvstreammux, Name: mux
  set batch-size: 1
  set width: 1280
  set height: 720
Add Element ... mux
Element: nvinferbin, Name: infer
  set config-file-path: /opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_infer_primary.yml
Add Element ... infer
Element: nvosdbin, Name: osd
Add Element ... osd
Element: fakesink, Name: sink
Add Element ... sink
LINKING: Source: src Target: mux
0:00:00.093299048  1209 0x62c47dec2e40 ERROR            nvstreammux gstnvstreammux.cpp:1611:gst_nvstreammux_request_new_pad:<mux> Pad should be named 'sink_%u' when requesting a pad
LINKING: Source: mux Target: infer
LINKING: Source: infer Target: osd
LINKING: Source: osd Target: sink
0:00:06.427098055  1209 0x72addd164110 INFO                 nvinfer gstnvinfer.cpp:682:gst_nvinfer_logger:<nvinfer_bin_nvinfer> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:2095> [UID = 1]: deserialized trt engine from :/opt/nvidia/deepstream/deepstream-7.0/samples/models/Primary_Detector/resnet18_trafficcamnet.etlt_b30_gpu0_int8.engine
uri:INFO: ../nvdsinfer/nvdsinfer_model_builder.cpp:612 [Implicit Engine Info]: layers num: 3
0   INPUT  kFLOAT input_1         3x544x960       
1   OUTPUT kFLOAT output_bbox/BiasAdd 16x34x60        
2   OUTPUT kFLOAT output_cov/Sigmoid 4x34x60         

0:00:06.523210097  1209 0x72addd164110 INFO                 nvinfer gstnvinfer.cpp:682:gst_nvinfer_logger:<nvinfer_bin_nvinfer> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2198> [UID = 1]: Use deserialized engine model: /opt/nvidia/deepstream/deepstream-7.0/samples/models/Primary_Detector/resnet18_trafficcamnet.etlt_b30_gpu0_int8.engine
0:00:06.530703780  1209 0x72addd164110 INFO                 nvinfer gstnvinfer_impl.cpp:343:notifyLoadModelStatus:<nvinfer_bin_nvinfer> [UID 1]: Load new model:/opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_infer_primary.yml sucessfully
0:00:06.530988348  1209 0x72addd164110 WARN            uridecodebin gsturidecodebin.c:1434:gen_source_element:<nvurisrc_bin_src_elem> error: No URI specified to play from.
Unable to set the pipeline to the playing state.

It’s werid that I run your code and config file on my side and it works well. Could you just run our demo like test1, test2 and test3 first?

It’s my erro, I was still using old code, that caused this problem. Apologies for my carelessness.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.