RidgeRun / gst-interpipe

GStreamer plug-in for interpipeline communication
Other
145 stars 64 forks source link

Recording usb camera using interpipe fails #54

Closed prabathdj closed 4 years ago

prabathdj commented 4 years ago

Hi, I tired to record a usb camera source in jetson nano using the below method using interpipes

gst-client pipeline_create pipe1 v4l2src device=/dev/video0 ! interpipesink name=vid sync=false async=false

gst-client pipeline_create pipe3 interpipesrc listen-to=vid is-live=false ! 'video/x-raw, framerate=30/1, format=YUY2' ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! omxh264enc ! mpegtsmux ! filesink location="/tmp/rrcam.ts" sync=false async=false

gstd-client pipeline_play pipe1

{ "code" : 0, "description" : "Success", "response" : { "name" : "state", "value" : "PLAYING", "param" : { "description" : "The state of the pipeline", "type" : "GstdStateEnum", "access" : "((GstdParamFlags) READ | 2)" } } }

gstd-client pipeline_play pipe3

{ "code" : 0, "description" : "Success", "response" : { "name" : "state", "value" : "PLAYING", "param" : { "description" : "The state of the pipeline", "type" : "GstdStateEnum", "access" : "((GstdParamFlags) READ | 2)" } } }

The file is not created. What can be the issue?

jcaballeros commented 4 years ago

Hi @prabathdj,

Try adding the caps between the v4l2src and the interpipesink. For instance, the following pipelines work for me:

gst-client pipeline_create pipe1 v4l2src device=/dev/video0 ! 'video/x-raw, framerate=30/1, format=YUY2' ! interpipesink name=vid sync=false async=false

gst-client pipeline_create pipe3 interpipesrc listen-to=vid is-live=false ! 'video/x-raw, framerate=30/1, format=YUY2' ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! omxh264enc ! mpegtsmux ! filesink location="/tmp/rrcam.ts" sync=false async=false

prabathdj commented 4 years ago

Thank you I will try this method

prabathdj commented 4 years ago

gst-client pipeline_create pipe3 interpipesrc **name=src format=time** listen-to=vid is-live=false ! 'video/x-raw, framerate=30/1, format=YUY2' ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! omxh264enc ! mpegtsmux ! filesink location="/tmp/rrcam.ts" sync=false async=false

by adding this "name=src format=time" solved the problem for me