gst-shark icon indicating copy to clipboard operation
gst-shark copied to clipboard

gst-shark 0.7.1 does not create metadata file.

Open tmbuckley opened this issue 5 years ago • 8 comments

This is similar to the problem I had before the gstreamer I am using is complicated, but was creating metadata file until i changed from nveglglessink to nvoverlaysink, and removing some queues.....

I guess you found where a unlinked pad was causing problems

I am in the performance tuning part of the project, and gst-shark not working along with only proctime working is making my job impossible.

Thanks Terry

tmbuckley avatar Oct 02 '20 18:10 tmbuckley

Hi @tmbuckley. I have a few hours to look into this today. Please let me know the following:

  • Is this happening with gst-launch or with an custom app?
  • Is this related to #90 ?

Any more context you can share is helpful.

michaelgruner avatar Oct 02 '20 21:10 michaelgruner

  1. this is happening with gst-launch
  2. yes I am still having the same problem as #90, only proctime tracers working nothing else.

I was limping along using proctime and my script will attach it, and then I started using nvoverlaysink instead of nveglglessink and gst-shark quit creating the metadata file.

Below is my shell script. the stalkercreatevideo and stalkertakepicture are glorified faucet function remotely turns on and off. to allow system to create video or picture on demand.

Jetson tx2 R32.3.1......

! nvvidconv name=a ! 'video/x-raw(memory:NVMM),format=NV12'

! nvvidconv name=stalkerLoc left=1692 right=2172 top=900 bottom=1280 ! video/x-raw, format=NV12

GST_DEBUG="GST_TRACER:7" GST_TRACERS="cpuusage;proctime;framerate"

! h264parse

! queue max-size-buffers=1 leaky=2 name=q6

! nvegltransform

! nveglglessink name=displaySink async=false sync=false force-aspect-ratio=false window-width=480 window-height=380 window-x=0 window-y=60 --display-fullscreen

GST_DEBUG="GST_TRACER:7" GST_TRACERS="cpuusage;proctime;framerate"
gst-launch-1.0 -vvvv
nvarguscamerasrc
! 'video/x-raw(memory:NVMM),width=3864,height=2180'
! queue max-size-buffers=1 leaky=2 name=q1
! tee name=t
t. ! queue name=q3
! nvvidconv name=stalkerLoc flip-method=2 left=1692 right=2172 top=900 bottom=1280
! 'video/x-raw(memory:NVMM),width=480,height=380'
! nvoverlaysink name=displaySink async=false sync=false overlay-x=0 overlay-y=361 overlay-w=480 overlay-h=380
t. ! queue name=q4
! stalkertakepicture ! nvjpegenc ! multifilesink name=stalkerPicture async=false location=/mnt/sdcard/pic1.jpg
t. ! queue name=q5
! nvvidconv name=b ! 'video/x-raw(memory:NVMM),width=(int)1920,height=(int)1080'
! nvv4l2h264enc maxperf-enable=1 bitrate=8000000
! 'video/x-h264, stream-format=(string)byte-stream'
! h264parse
! stalkercreatevideo name=stalkercreatevideo
! splitmuxsink name=stalkerVideoSink async-handling=true location=/tmp/tmpFile

tmbuckley avatar Oct 03 '20 20:10 tmbuckley

How is this going now? Unfortunately, I have the same issue.

nicesj avatar Oct 16 '20 00:10 nicesj

I had to break it up, like the tee's cause the problem, so I ran three tests instead of one large test, just can't test the complete stream at one time.

tmbuckley avatar Oct 16 '20 12:10 tmbuckley

Hello guys. I was finally able to reproduce this problem. I'm sill looking into why this happens, but in the mean time please set this variable GST_SHARK_FILE_BUFFERING=0 as a workaround. This will tell gst-shark to immediately flush data written to files.

@tmbuckley this is your pipe (without your proprietary elements) which originally failed:

GST_SHARK_FILE_BUFFERING=0 GST_DEBUG=2,GST_TRACER:7 GST_TRACERS="framerate;proctime;interlatency" \
gst-launch-1.0 -v nvarguscamerasrc ! 'video/x-raw(memory:NVMM),width=3864,height=2180' \
! queue max-size-buffers=1 leaky=2 name=q1 ! tee name=t \
t. ! queue name=q3 ! nvvidconv name=stalkerLoc flip-method=2 left=1692 right=2172 top=900 bottom=1280 \
! 'video/x-raw(memory:NVMM),width=480,height=380' \
! nvoverlaysink name=displaySink async=false sync=false overlay-x=0 overlay-y=361 overlay-w=480 overlay-h=380 \
t. ! queue name=q4 ! nvjpegenc ! multifilesink name=stalkerPicture async=false location=/tmp/pic1.jpg \
t. ! queue name=q5 ! nvvidconv name=b ! 'video/x-raw(memory:NVMM),width=(int)1920,height=(int)1080' \
! nvv4l2h264enc maxperf-enable=1 bitrate=8000000 ! 'video/x-h264, stream-format=(string)byte-stream' \
! h264parse ! splitmuxsink name=stalkerVideoSink async-handling=true location=/tmp/tmpFile

michaelgruner avatar Oct 16 '20 15:10 michaelgruner

Also, @nicesj do you mind testing this branch. It basically flushes the metadata at startup.

michaelgruner avatar Oct 16 '20 16:10 michaelgruner

Is there any way to use the hotfix/flush-metadata-file-at-startup branch with Yocto meta-ridgerun?

I'm also facing this problem and would like to help get it merged.

jhatchett-logitech avatar May 17 '21 16:05 jhatchett-logitech

This thread is a bit dated but I wasn't able to get anything working with deepstream on tegra until I implemented https://github.com/RidgeRun/gst-shark/pull/110. Really useful tool, thanks for sharing!

dwalkes avatar Jun 10 '22 05:06 dwalkes