Multifilesrc for folder of images in DS6.3

This pipe works fine
gst-launch-1.0 multifilesrc location=/path/to/folder_mkvs/%d.mkv ! matroskademux ! multiqueue ! h265parse ! nvv4l2decoder ! mx.sink_0 nvstreammux width=1920 height=1080 batch-size=1 name=mx ! nvinfer config-file-path=config_infer_primary_model.txt ! nvvideoconvert ! nvdsosd process-mode=1 display-text=1 ! nvegltransform ! nveglglessink

But this fails
gst-launch-1.0 multifilesrc location=/path/to/folder_jpgs/%d.jpg ! jpegdec ! multiqueue ! jpegparse ! nvv4l2decoder ! mx.sink_0 nvstreammux width=1920 height=1080 batch-size=1 name=mx ! nvinfer config-file-path=config_infer_primary_model.txt ! nvvideoconvert ! nvdsosd process-mode=1 display-text=1 ! nvegltransform ! nveglglessink

Output:

Pipeline is PREROLLING ...
Got context from element 'eglglessink0': gst.egl.EGLDisplay=context, display=(GstEGLDisplay)NULL;
ERROR: from element /GstPipeline:pipeline0/GstMultiFileSrc:multifilesrc0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3072): gst_base_src_loop (): /GstPipeline:pipeline0/GstMultiFileSrc:multifilesrc0:
streaming stopped, reason not-linked (-1)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

Missing anything here? Same behavior with python app. C app with multifilesrc works. Tried mjpeg=1 with decoder in jpg pipe - no luck

• Hardware Platform (Jetson / GPU): Xavier AGX
• DeepStream Version: 6.3
• JetPack Version (valid for Jetson only): 5.1
• Issue Type( questions, new requirements, bugs): question

I think the correct pipeline should be like the following

gst-launch-1.0 multifilesrc location=/path/to/folder_jpgs/%d.jpg ! queue ! videorate ! image/jpeg, framerate=10/1 ! jpegparse ! nvv4l2decoder mjpeg=1 ! mx.sink_0 nvstreammux width=1920 height=1080 batch-size=1 name=mx ! nvinfer config-file-path=config_infer_primary_model.txt ! nvvideoconvert ! nvdsosd process-mode=1 display-text=1 ! nvegltransform ! nveglglessink

Facing Internal Data stream error with the above pipeline. But I see this is not the same message reported (so somethings improved). Seems to be timestamp issue with jpegparse/videorate plugin now.

:00:07.372162484 314094 0xaaaafcf47200 INFO              GST_STATES gstbin.c:2503:gst_bin_element_set_state:<multifilesrc0> current READY pending VOID_PENDING, desired next PAUSED
0:00:07.372280374 314094 0xaaaafcf47200 INFO                 basesrc gstbasesrc.c:1373:gst_base_src_do_seek:<multifilesrc0> seeking: bytes segment start=0, offset=0, stop=-1, rate=1.000000, applied_rate=1.000000, flags=0x00, time=0, base=0, position 0, duration -1
0:00:07.372364119 314094 0xaaaafcf47200 INFO                    task gsttask.c:460:gst_task_set_lock: setting stream lock 0xaaaafd0ee170 on task 0xaaaafd0fd950
0:00:07.372417400 314094 0xaaaafcf47200 INFO                GST_PADS gstpad.c:6159:gst_pad_start_task:<multifilesrc0:src> created task 0xaaaafd0fd950
0:00:07.372705982 314094 0xaaaafcf47200 INFO              GST_STATES gstelement.c:2688:gst_element_continue_state:<multifilesrc0> completed state change to PAUSED
0:00:07.372758239 314094 0xaaaafcf47200 INFO              GST_STATES gstelement.c:2588:_priv_gst_element_state_changed:<multifilesrc0> notifying about state-changed READY to PAUSED (VOID_PENDING pending)
0:00:07.372834880 314094 0xaaaafcf47200 INFO              GST_STATES gstbin.c:2952:gst_bin_change_state_func:<pipeline0> child 'multifilesrc0' changed state to 3(PAUSED) successfully
Pipeline is PREROLLING ...
0:00:07.373029892 314094 0xaaaafd9b8120 INFO        GST_ELEMENT_PADS gstelement.c:925:gst_element_get_static_pad: no such pad 'sink' in element "multifilesrc0"
0:00:07.373666768 314094 0xaaaafcf47200 WARN               structure gststructure.c:1861:priv_gst_structure_append_to_gstring: No value transform to serialize field 'display' of type 'GstEGLDisplay'
Got context from element 'eglglessink0': gst.egl.EGLDisplay=context, display=(GstEGLDisplay)NULL;
0:00:07.376887020 314094 0xaaaafd9b8120 INFO               GST_EVENT gstevent.c:900:gst_event_new_segment: creating segment event bytes segment start=0, offset=0, stop=-1, rate=1.000000, applied_rate=1.000000, flags=0x00, time=0, base=0, position 0, duration -1
0:00:07.377086864 314094 0xaaaafd9b8120 INFO                 basesrc gstbasesrc.c:2962:gst_base_src_loop:<multifilesrc0> marking pending DISCONT
0:00:07.377148177 314094 0xaaaafd9da120 WARN               videorate gstvideorate.c:935:gst_video_rate_sink_event:<videorate0> Got segment but doesn't have GST_FORMAT_TIME value
0:00:07.377325077 314094 0xaaaafd9da120 WARN               videorate gstvideorate.c:935:gst_video_rate_sink_event:<videorate0> Got segment but doesn't have GST_FORMAT_TIME value
0:00:07.377466071 314094 0xaaaafd9da120 INFO                    task gsttask.c:312:gst_task_func:<queue0:src> Task going to paused
0:00:07.379613408 314094 0xaaaafd9b8120 INFO                 basesrc gstbasesrc.c:2981:gst_base_src_loop:<multifilesrc0> pausing after gst_pad_push() = error
0:00:07.379711617 314094 0xaaaafd9b8120 WARN                 basesrc gstbasesrc.c:3072:gst_base_src_loop:<multifilesrc0> error: Internal data stream error.
0:00:07.379766306 314094 0xaaaafd9b8120 WARN                 basesrc gstbasesrc.c:3072:gst_base_src_loop:<multifilesrc0> error: streaming stopped, reason error (-5)
0:00:07.379850980 314094 0xaaaafd9b8120 INFO        GST_ERROR_SYSTEM gstelement.c:2153:gst_element_message_full_with_details:<multifilesrc0> posting message: Internal data stream error.
0:00:07.380071848 314094 0xaaaafd9b8120 INFO        GST_ERROR_SYSTEM gstelement.c:2180:gst_element_message_full_with_details:<multifilesrc0> posted error message: Internal data stream error.
0:00:07.380174410 314094 0xaaaafd9b8120 WARN                   queue gstqueue.c:988:gst_queue_handle_sink_event:<queue0> error: Internal data stream error.
0:00:07.380222027 314094 0xaaaafd9b8120 WARN                   queue gstqueue.c:988:gst_queue_handle_sink_event:<queue0> error: streaming stopped, reason error (-5)
ERROR: from element /GstPipeline:pipeline0/GstMultiFileSrc:multifilesrc0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3072): gst_base_src_loop (): /GstPipeline:pipeline0/GstMultiFileSrc:multifilesrc0:
streaming stopped, reason error (-5)
0:00:07.380340109 314094 0xaaaafd9b8120 INFO        GST_ERROR_SYSTEM gstelement.c:2153:gst_element_message_full_with_details:<queue0> posting message: Internal data stream error.
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
0:00:07.380444047 314094 0xaaaafd9b8120 INFO        GST_ERROR_SYSTEM gstelement.c:2180:gst_element_message_full_with_details:<queue0> posted error message: Internal data stream error.
0:00:07.380505968 314094 0xaaaafd9b8120 INFO                    task gsttask.c:312:gst_task_func:<multifilesrc0:src> Task going to paused

Is there a way to use imagesequence protocol with uridecodebin for the versions I am working on? (GStreamer 1.16.3)

/opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/deepstream-image-decode-test - This C example works with %d string file location. In this example, their pipeline seems to be : gst-launch-1.0 multifilesrc location=/path/to/folder_jpgs/%d.jpg ! jpegparse ! nvv4l2decoder mjpeg=1 ! mx.sink_0 nvstreammux width=1920 height=1080 batch-size=1 name=mx ! nvinfer config-file-path=config_infer_primary_model.txt ! nvvideoconvert ! nvmultistreamtiler ! nvvideoconvert ! nvdsosd process-mode=1 display-text=1 ! nv3dsink sync=0 . But with gst-launch, I couldnt make this work even.

@junshengy I tried your pipeline with fakesink, nv3dsink and sync=0 prop set, but no luck. Can you try from your end and confirm that your pipeline works with folder of jpeg images?

Below is a correct pipeline

mkdir images

ffmpeg -ss 00:00 -i /opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.mp4 -f image2 -r 0.2 %03d.jpg

gst-launch-1.0 -e nvstreammux name=mux batch-size=1 width=1280 height=720 ! nvinfer config-file-path=/opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/deepstream-test2/dstest2_pgie_config.yml ! nvinfer config-file-path=/opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/deepstream-test2/dstest2_sgie1_config.yml ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=RGBA" ! nvdsosd ! fakesink multifilesrc location=./%03d.jpg start-index=1 ! jpegparse ! nvv4l2decoder mjpeg=1 ! queue ! videorate ! "video/x-raw(memory:NVMM), framerate=5/1" ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=NV12" ! mux.sink_0

@junshengy Thanks this pipeline works. And I even checked by changing fakesink to nv3dsink, works seamlessly.

Note: I am getting this below warning when I use the mentioned sgie. Hope its not an issue
0:02:53.480239865 22185 0xaaaae1cec460 WARN nvinfer gstnvinfer.cpp:1753:gst_nvinfer_process_objects:<nvinfer1> Untracked objects in metadata. Cannot infer on untracked objects in asynchronous mode.

This too works. Making it in usual way of writing pipe starting with input source. (And -e argument has no effect for me)

gst-launch-1.0 multifilesrc location=./%03d.jpg start-index=1 loop=1 ! jpegparse ! nvv4l2decoder mjpeg=1 ! queue ! videorate ! "video/x-raw(memory:NVMM), framerate=5/1" ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=NV12" ! mux.sink_0 nvstreammux name=mux batch-size=1 width=1280 height=720 ! nvinfer config-file-path=/opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/deepstream-test2/dstest2_pgie_config.yml ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=RGBA" ! nvdsosd ! nv3dsink

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