gst-play freeze on seek

Hi, im having problem with gstreamer. When i try play video

gst-play-1.0 ./testing/bbb_sunflower_2160p_60fps_normal.mp4

and seek multiple times forward with keys, video always freeze. Do you have any idea how to fix it?

0:00:00.984338412  7180   0x7f940701e0 WARN          v4l2bufferpool gstv4l2bufferpool.c:1474:gst_v4l2_buffer_pool_dqbuf:<nvv4l2decoder0:pool:sink> v4l2 provided buffer that is too big for the memory it was writing into.  v4l2 claims 976 bytes used but memory is only 0B.  This is probably a driver bug.
0:00:01.001626929  7180   0x7f940701e0 WARN          v4l2bufferpool gstv4l2bufferpool.c:1474:gst_v4l2_buffer_pool_dqbuf:<nvv4l2decoder0:pool:sink> v4l2 provided buffer that is too big for the memory it was writing into.  v4l2 claims 976 bytes used but memory is only 0B.  This is probably a driver bug.
0:00:01.017908606  7180   0x7f940701e0 WARN          v4l2bufferpool gstv4l2bufferpool.c:1474:gst_v4l2_buffer_pool_dqbuf:<nvv4l2decoder0:pool:sink> v4l2 provided buffer that is too big for the memory it was writing into.  v4l2 claims 976 bytes used but memory is only 0B.  This is probably a driver bug.
0:00:12.466523313  6790   0x55b4f0b200 ERROR          v4l2allocator gstv4l2allocator.c:1358:gst_v4l2_allocator_qbuf:<nvv4l2decoder0:pool:src:allocator> failed queueing buffer 1: Device or resource busy
0:00:12.466545553  6790   0x55b4f0b200 ERROR         v4l2bufferpool gstv4l2bufferpool.c:1379:gst_v4l2_buffer_pool_qbuf:<nvv4l2decoder0:pool:src> could not queue a buffer 1
0:00:12.466575657  6790   0x55b4f0b200 ERROR          v4l2allocator gstv4l2allocator.c:1358:gst_v4l2_allocator_qbuf:<nvv4l2decoder0:pool:src:allocator> failed queueing buffer 1: Device or resource busy
0:00:12.466596387  6790   0x55b4f0b200 ERROR         v4l2bufferpool gstv4l2bufferpool.c:1379:gst_v4l2_buffer_pool_qbuf:<nvv4l2decoder0:pool:src> could not queue a buffer 1
0:00:12.466625294  6790   0x55b4f0b200 ERROR          v4l2allocator gstv4l2allocator.c:1358:gst_v4l2_allocator_qbuf:<nvv4l2decoder0:pool:src:allocator> failed queueing buffer 1: Device or resource busy
0:00:12.466646440  6790   0x55b4f0b200 ERROR         v4l2bufferpool gstv4l2bufferpool.c:1379:gst_v4l2_buffer_pool_qbuf:<nvv4l2decoder0:pool:src> could not queue a buffer 1
0:00:12.466675607  6790   0x55b4f0b200 ERROR          v4l2allocator gstv4l2allocator.c:1358:gst_v4l2_allocator_qbuf:<nvv4l2decoder0:pool:src:allocator> failed queueing buffer 1: Device or resource busy
0:00:12.466696181  6790   0x55b4f0b200 ERROR         v4l2bufferpool gstv4l2bufferpool.c:1379:gst_v4l2_buffer_pool_qbuf:<nvv4l2decoder0:pool:src> could not queue a buffer 1
0:00:12.466725452  6790   0x55b4f0b200 ERROR          v4l2allocator gstv4l2allocator.c:1358:gst_v4l2_allocator_qbuf:<nvv4l2decoder0:pool:src:allocator> failed queueing buffer 1: Device or resource busy
0:00:12.466746703  6790   0x55b4f0b200 ERROR         v4l2bufferpool gstv4l2bufferpool.c:1379:gst_v4l2_buffer_pool_qbuf:<nvv4l2decoder0:pool:src> could not queue a buffer 1
0:00:12.466777016  6790   0x55b4f0b200 ERROR          v4l2allocator gstv4l2allocator.c:1358:gst_v4l2_allocator_qbuf:<nvv4l2decoder0:pool:src:allocator> failed queueing buffer 1: Device or resource busy
0:00:12.466798214  6790   0x55b4f0b200 ERROR         v4l2bufferpool gstv4l2bufferpool.c:1379:gst_v4l2_buffer_pool_qbuf:<nvv4l2decoder0:pool:src> could not queue a buffer 1
0:00:12.466827277  6790   0x55b4f0b200 ERROR          v4l2allocator gstv4l2allocator.c:1358:gst_v4l2_allocator_qbuf:<nvv4l2decoder0:pool:src:allocator> failed queueing buffer 1: Device or resource busy
0:00:12.466848736  6790   0x55b4f0b200 ERROR         v4l2bufferpool gstv4l2bufferpool.c:1379:gst_v4l2_buffer_pool_qbuf:<nvv4l2decoder0:pool:src> could not queue a buffer 1
0:00:12.466878580  6790   0x55b4f0b200 ERROR          v4l2allocator gstv4l2allocator.c:1358:gst_v4l2_allocator_qbuf:<nvv4l2decoder0:pool:src:allocator> failed queueing buffer 1: Device or resource busy
0:00:12.466899101  6790   0x55b4f0b200 ERROR         v4l2bufferpool gstv4l2bufferpool.c:1379:gst_v4l2_buffer_pool_qbuf:<nvv4l2decoder0:pool:src> could not queue a buffer 1
0:00:12.466928008  6790   0x55b4f0b200 ERROR          v4l2allocator gstv4l2allocator.c:1358:gst_v4l2_allocator_qbuf:<nvv4l2decoder0:pool:src:allocator> failed queueing buffer 1: Device or resource busy
0:00:12.466949259  6790   0x55b4f0b200 ERROR         v4l2bufferpool gstv4l2bufferpool.c:1379:gst_v4l2_buffer_pool_qbuf:<nvv4l2decoder0:pool:src> could not queue a buffer 1
0:00:12.466980666  6790   0x55b4f0b200 ERROR          v4l2allocator gstv4l2allocator.c:1358:gst_v4l2_allocator_qbuf:<nvv4l2decoder0:pool:src:allocator> failed queueing buffer 1: Device or resource busy
0:00:12.467002333  6790   0x55b4f0b200 ERROR         v4l2bufferpool gstv4l2bufferpool.c:1379:gst_v4l2_buffer_pool_qbuf:<nvv4l2decoder0:pool:src> could not queue a buffer 1
0:00:12.467032229  6790   0x55b4f0b200 ERROR          v4l2allocator gstv4l2allocator.c:1358:gst_v4l2_allocator_qbuf:<nvv4l2decoder0:pool:src:allocator> failed queueing buffer 1: Device or resource busy

Hi,
Please share your release version. Besides, do you try other video files? Probably it is specific to the video file.

Hi,

thanks for answer. Im using latest version “nv-jetson-nano-sd-card-image-r32.2.3” with preinstalled gstreamer 1.14.5. I tried different video files but with same result but with 1080p freezing is not often(but still freeze after 6x fast seek) and with 720p video its rare…

Hi,
please try nvgstplayer-1.0

nvidia@nvidia-desktop:~$ nvgstplayer-1.0 --help
Usage:
  nvgstplayer-1.0 [OPTION?] Nvidia GStreamer Model Test

Help Options:
  -?, --help                        Show help options
  --help-all                        Show all help options
  --help-gst                        Show GStreamer Options

Application Options:
  --version                         Prints the version of Gstreamer used
  -u, --urifile                     Path of the file containing the URIs
  -i, --uri                         input URI
  -e, --elemfile                    Element(s) (Properties) file
  -x, --cxpr                        Command sequence expression
  -n, --loop                        Number of times to play the media
  -c, --audio-track                 If stream have multiple audio tracks, play stream with given track no
  -v, --video-track                 If stream have multiple video tracks, play stream with given track no
  -a, --start                       Start of the segment in media in seconds
  -d, --duration                    Play duration of the segment in media in seconds
  --no-sync                         Disable AV Sync
  --disable-dpms                    Unconditionally Disable DPMS/ScreenBlanking during operation and re-enable upon exit
  --stealth                         Operate in stealth mode, alive even when no media is playing
  --bg                              Operate in background mode, keyboard input will be entirely ignored
  --use-playbin                     Use Playbin
  --no-audio                        Disable audio
  --no-video                        Disable video
  --disable-anative                 Disable native audio rendering
  --disable-vnative                 Disable native video rendering
  --use-buffering                   Use Buffering
  -l, --low-percent                 Low threshold for buffering to start, in %
  -j, --high-percent                High threshold for buffering to finish, in %
  --loop-forever                    Play the URI(s) in loop forever
  -t, --max-size-time               Max. amount of time in the queue (0=automatic)
  -y, --max-size-bytes              Max. amount of bytes in the queue (0=automatic)
  -b, --max-size-buffers            Max. amount of buffers in the queue (0=automatic)
  --window-x                        X coordinate for player window (for non overlay rendering)
  --window-y                        Y coordinate for player window (for non overlay rendering)
  --window-width                    Window width (for non overlay rendering)
  --window-height                   Window height (for non overlay rendering)
  --disable-fullscreen              Play video in non fullscreen mode (for nveglglessink)
  -h, --drop-threshold-pct          Permittable frames drop percentage, to be used with --stats (only for development purpose)
  -k, --image-display-time          Image display time in seconds
  --show-tags                       shows tags (metadata), if available
  --stats                           shows stream statistics, if enabled
  --stats-file                      File to dump stream statistics, if enabled
  --svd                             (=) chain for video decoding
  --sad                             (=) chain for audio decoding
  --svc                             (=) chain for video postprocessing
  --sac                             (=) chain for audio postprocessing
  --svs                             (=) chain for video rendering
  --sas                             (=) chain for audio rendering
  --shttp                           (=) chain for http source
  --srtsp                           (=) chain for rtsp source
  --sudp                            (=) chain for udp source
  --sfsrc                           (=) chain for file source

Runtime Commands:
         q                                quit the application
         h                                print help
         Up Key, ]                        goto next track
         c                                restart current track
         Down Key, [                      goto previous track
         spos                             query for position
         sdur                             query for duration
         s<val>                           seek to <val> position in seconds, eg "s5.120"
         v<val>                           seek to <val> percent of the duration, eg "v54"
         f<val>                           seek by <val> seconds, relative to current position eg "f23.901"
         Left Key, <                      seek backwards by 10 seconds
         Right Key, >                     seek forward by 10 seconds
         p                                pause playback
         r                                start/resume the playback
         z                                stop the playback
         i:<val>                          enter a single URI

Hi,

thanks. Its much better, seek is much more responsive but its still possible to freeze after 20 quick seeks both directions on 4k video or when i try to seek immediately after video start it freeze almost in 100% cases. I tried on fullhd but it aapears only when im “holding down” right key and it will make somethink like 10 rally fast seeks and then freeze. So its much better but it is still causing me trouble because it will get stuck and player dont quit.

GST_DEBUG=3 nvgstplayer-1.0 -i ./bbb_sunflower_2160p_60fps_normal.mp4
0:00:34.537921911  9371     0x283bd840 ERROR          v4l2allocator gstv4l2allocator.c:1358:gst_v4l2_allocator_qbuf:<nvv4l2decoder0:pool:src:allocator> failed queueing buffer 3: Device or resource busy
0:00:34.537942693  9371     0x283bd840 ERROR         v4l2bufferpool gstv4l2bufferpool.c:1379:gst_v4l2_buffer_pool_qbuf:<nvv4l2decoder0:pool:src> could not queue a buffer 3
0:00:34.537972173  9371     0x283bd840 ERROR          v4l2allocator gstv4l2allocator.c:1358:gst_v4l2_allocator_qbuf:<nvv4l2decoder0:pool:src:allocator> failed queueing buffer 3: Device or resource busy
0:00:34.537992902  9371     0x283bd840 ERROR         v4l2bufferpool gstv4l2bufferpool.c:1379:gst_v4l2_buffer_pool_qbuf:<nvv4l2decoder0:pool:src> could not queue a buffer 3
0:00:34.538021913  9371     0x283bd840 ERROR          v4l2allocator gstv4l2allocator.c:1358:gst_v4l2_allocator_qbuf:<nvv4l2decoder0:pool:src:allocator> failed queueing buffer 3: Device or resource busy
0:00:34.538042331  9371     0x283bd840 ERROR         v4l2bufferpool gstv4l2bufferpool.c:1379:gst_v4l2_buffer_pool_qbuf:<nvv4l2decoder0:pool:src> could not queue a buffer 3
0:00:34.538072540  9371     0x283bd840 ERROR          v4l2allocator gstv4l2allocator.c:1358:gst_v4l2_allocator_qbuf:<nvv4l2decoder0:pool:src:allocator> failed queueing buffer 3: Device or resource busy
0:00:34.538093217  9371     0x283bd840 ERROR         v4l2bufferpool gstv4l2bufferpool.c:1379:gst_v4l2_buffer_pool_qbuf:<nvv4l2decoder0:pool:src> could not queue a buffer 3
0:00:34.538122749  9371     0x283bd840 ERROR          v4l2allocator gstv4l2allocator.c:1358:gst_v4l2_allocator_qbuf:<nvv4l2decoder0:pool:src:allocator> failed queueing buffer 3: Device or resource busy
0:00:34.538143427  9371     0x283bd840 ERROR         v4l2bufferpool gstv4l2bufferpool.c:1379:gst_v4l2_buffer_pool_qbuf:<nvv4l2decoder0:pool:src> could not queue a buffer 3
0:00:34.538173167  9371     0x283bd840 ERROR          v4l2allocator gstv4l2allocator.c:1358:gst_v4l2_allocator_qbuf:<nvv4l2decoder0:pool:src:allocator> failed queueing buffer 3: Device or resource busy
0:00:34.538194105  9371     0x283bd840 ERROR         v4l2bufferpool gstv4l2bufferpool.c:1379:gst_v4l2_buffer_pool_qbuf:<nvv4l2decoder0:pool:src> could not queue a buffer 3
0:00:34.538223064  9371     0x283bd840 ERROR          v4l2allocator gstv4l2allocator.c:1358:gst_v4l2_allocator_qbuf:<nvv4l2decoder0:pool:src:allocator> failed queueing buffer 3: Device or resource busy
0:00:34.538243637  9371     0x283bd840 ERROR         v4l2bufferpool gstv4l2bufferpool.c:1379:gst_v4l2_buffer_pool_qbuf:<nvv4l2decoder0:pool:src> could not queue a buffer 3
0:00:34.538273274  9371     0x283bd840 ERROR          v4l2allocator gstv4l2allocator.c:1358:gst_v4l2_allocator_qbuf:<nvv4l2decoder0:pool:src:allocator> failed queueing buffer 3: Device or resource busy
0:00:34.538294264  9371     0x283bd840 ERROR         v4l2bufferpool gstv4l2bufferpool.c:1379:gst_v4l2_buffer_pool_qbuf:<nvv4l2decoder0:pool:src> could not queue a buffer 3
0:00:34.538323848  9371     0x283bd840 ERROR          v4l2allocator gstv4l2allocator.c:1358:gst_v4l2_allocator_qbuf:<nvv4l2decoder0:pool:src:allocator> failed queueing buffer 3: Device or resource busy
0:00:34.538344577  9371     0x283bd840 ERROR         v4l2bufferpool gstv4l2bufferpool.c:1379:gst_v4l2_buffer_pool_qbuf:<nvv4l2decoder0:pool:src> could not queue a buffer 3
0:00:34.538374109  9371     0x283bd840 ERROR          v4l2allocator gstv4l2allocator.c:1358:gst_v4l2_allocator_qbuf:<nvv4l2decoder0:pool:src:allocator> failed queueing buffer 3: Device or resource busy
0:00:34.538394735  9371     0x283bd840 ERROR         v4l2bufferpool gstv4l2bufferpool.c:1379:gst_v4l2_buffer_pool_qbuf:<nvv4l2decoder0:pool:src> could not queue a buffer 3
0:00:34.538424319  9371     0x283bd840 ERROR          v4l2allocator gstv4l2allocator.c:1358:gst_v4l2_allocator_qbuf:<nvv4l2decoder0:pool:src:allocator> failed queueing buffer 3: Device or resource busy
0:00:34.538444996  9371     0x283bd840 ERROR         v4l2bufferpool gstv4l2bufferpool.c:1379:gst_v4l2_buffer_pool_qbuf:<nvv4l2decoder0:pool:src> could not queue a buffer 3
0:00:34.538475674  9371     0x283bd840 ERROR          v4l2allocator gstv4l2allocator.c:1358:gst_v4l2_allocator_qbuf:<nvv4l2decoder0:pool:src:allocator> failed queueing buffer 3: Device or resource busy
0:00:34.538497185  9371     0x283bd840 ERROR         v4l2bufferpool gstv4l2bufferpool.c:1379:gst_v4l2_buffer_pool_qbuf:<nvv4l2decoder0:pool:src> could not queue a buffer 3
0:00:34.538526665  9371     0x283bd840 ERROR          v4l2allocator gstv4l2allocator.c:1358:gst_v4l2_allocator_qbuf:<nvv4l2decoder0:pool:src:allocator> failed queueing buffer 3: Device or resource busy

Hi,
4K decoding on Jetson Nano taks high system loading. Please execute ‘sudo jetson_clocks’ to run in max performance.
And also apply the following patch to nvgstplayer-1.0:

diff --git a/nvgstapps/nvgstplayer-1.0/nvgstplayer.c b/nvgstapps/nvgstplayer-1.0/nvgstplayer.c
index ddd404b..ffb115e 100644
--- a/nvgstapps/nvgstplayer-1.0/nvgstplayer.c
+++ b/nvgstapps/nvgstplayer-1.0/nvgstplayer.c
@@ -1816,6 +1816,10 @@ create_video_pipeline (GstCaps * caps, GstPad * dbin_pad)
         NVGST_CRITICAL_MESSAGE ("failed to create video decoder pipe");
         goto fail;
       }
+      if (!g_strcmp0(app->svd, NVGST_DEFAULT_VIDEO_DEC)) {
+        g_print("nvv4l2decoder: Set enable-max-performance=TRUE \n");
+        g_object_set(GST_OBJECT (vdec), "enable-max-performance", TRUE, NULL);
+      }
 
       if (!gst_bin_add (GST_BIN (bin), vdec)) {
         NVGST_CRITICAL_MESSAGE ("failed to add decoder pipe to video_bin");

Source code is in
https://developer.nvidia.com/embedded/r32-2-3_Release_v1.0/Sources/T210/public_sources.tbz2

Hi,

I applied patch and compile with

gcc nvgstplayer.c nvgst_x11_common.c nvgst_asound_common.c -o nvgstplayer-1.0 $(pkg-config --cflags --libs gstreamer-1.0 gstreamer-plugins-base-1.0 gstreamer-pbutils-1.0 gstreamer-video-1.0 x11 xext alsa)

jetson_clocks show:

SOC family:tegra210  Machine:NVIDIA Jetson Nano Developer Kit
Online CPUs: 0-3
CPU Cluster Switching: Disabled
cpu0: Online=1 Governor=schedutil MinFreq=1428000 MaxFreq=1428000 CurrentFreq=1428000 IdleStates: WFI=0 c7=0 
cpu1: Online=1 Governor=schedutil MinFreq=1428000 MaxFreq=1428000 CurrentFreq=1428000 IdleStates: WFI=0 c7=0 
cpu2: Online=1 Governor=schedutil MinFreq=1428000 MaxFreq=1428000 CurrentFreq=1428000 IdleStates: WFI=0 c7=0 
cpu3: Online=1 Governor=schedutil MinFreq=1428000 MaxFreq=1428000 CurrentFreq=1428000 IdleStates: WFI=0 c7=0 
GPU MinFreq=921600000 MaxFreq=921600000 CurrentFreq=921600000
EMC MinFreq=204000000 MaxFreq=1600000000 CurrentFreq=1600000000 FreqOverride=1
Fan: speed=255
NV Power Mode: MAXN

but result is same, its still freezing.

Hi,
Please share steps that we can reproduce it through nvgstplayer-1.0. Thanks.

Hi,

Thanks for your help. Here it is. I did few more tests and its happening when video is more heavy, like 60fps.

ssh in to the jetson nano

sudo systemctl disable gdm3
sudo systemctl set-default multi-user.target
export DISPLAY=:0
xinit &
xset s off
xset -dpms
xset s noblank

wget http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_2160p_60fps_normal.mp4
wget "http://downloads.4ksamples.com/videos/Panasonic%20GH4%204K%20UHD%20Sample%20Footage(4ksamples.com).vid"

its hard to use keypress at similar speed so i tried to use command expression in nvgstplayer.

GST_DEBUG=4 nvgstplayer-1.0 -u /home/nano/Videos/seektest2

seektest2 file:

[/home/nano/Videos/bbb_sunflower_2160p_60fps_normal.mp4]
cxpr=r s300 w1 50{> w0.05 < w0.05}
GST_DEBUG=4 nvgstplayer-1.0 -u /home/nano/Videos/seektest

seektest file:

[/mnt/120ssd/home/nano/testing/Panasonic GH4 4K UHD Sample Footage(4ksamples.com).vid]
cxpr=r w1 20{> w0.5 > w0.5 > w0.5 < w0.5}

second video is freezing with different message:
https://filebin.ca/55jTXMpMyzP6/gst01.log

Hi,
Thanks for the steps. We are able to reproduce the issue by following it. We are debugging further and will update once we have findings.