Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gst-shark 0.7.1 does not create metadata file. #92

Open
tmbuckley opened this issue Oct 2, 2020 · 8 comments
Open

gst-shark 0.7.1 does not create metadata file. #92

tmbuckley opened this issue Oct 2, 2020 · 8 comments
Assignees
Labels

Comments

@tmbuckley
Copy link

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

@michaelgruner
Copy link
Collaborator

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

Any more context you can share is helpful.

@michaelgruner michaelgruner self-assigned this Oct 2, 2020
@tmbuckley
Copy link
Author

  1. this is happening with gst-launch
  2. yes I am still having the same problem as gst-shark 0.7.1.1 only proctime works, other tracers do not create data or meta files. #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

@nicesj
Copy link

nicesj commented Oct 16, 2020

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

@tmbuckley
Copy link
Author

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.

@michaelgruner
Copy link
Collaborator

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
Copy link
Collaborator

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

@jhatchett-logitech
Copy link

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.

dwalkes added a commit to Trellis-Logic/gst-shark that referenced this issue Jun 10, 2022
To avoid issues with empty files on exit of the pipeline, see
[1].

Note: This code only works if the pipleine gracefully exits,
including calling `gst_deinit()`.  This probably means you
need to add a signal handler for SIGINT if your pipeline
doesn't exit normally.

1: RidgeRun#92
dwalkes added a commit to Trellis-Logic/gst-shark that referenced this issue Jun 10, 2022
To avoid issues with empty files on exit of the pipeline, see
[1].

Note: This code only works if the pipleine gracefully exits,
including calling `gst_deinit()`.  This probably means you
need to add a signal handler for SIGINT if your pipeline
doesn't exit normally.

1: RidgeRun#92
Signed-off-by: Dan Walkes <[email protected]>
@dwalkes
Copy link
Contributor

dwalkes commented Jun 10, 2022

This thread is a bit dated but I wasn't able to get anything working with deepstream on tegra until I implemented #110. Really useful tool, thanks for sharing!

dwalkes added a commit to Trellis-Logic/gst-shark that referenced this issue Jun 10, 2022
To avoid issues with empty files on exit of the pipeline, see
[1].

Note: This code only works if the pipleine gracefully exits,
including calling `gst_deinit()`.  This probably means you
need to add a signal handler for SIGINT if your pipeline
doesn't exit normally.

1: RidgeRun#92
Signed-off-by: Dan Walkes <[email protected]>
jsalas98 pushed a commit that referenced this issue Oct 17, 2022
To avoid issues with empty files on exit of the pipeline, see
[1].

Note: This code only works if the pipleine gracefully exits,
including calling `gst_deinit()`.  This probably means you
need to add a signal handler for SIGINT if your pipeline
doesn't exit normally.

1: #92
Signed-off-by: Dan Walkes <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants