Video not playing smoothly during reverse playback when using rtpjitterbuffer

Hi everyone,

I’m currently developing a system using GStreamer that enables reverse playback of video.
The system consists of two separate pipelines:

■ Video Input Pipeline
This pipeline reads a 4K MKV file, encodes it in H.265, and sends it via UDP.

gst-launch-1.0
filesrc location=MKV.mkv ! matroskademux name=demux
demux.video_0 ! queue ! h265parse config-interval=-1 !
rtph265payCustom name=rtppaypause host=123.45.67.89 port=9999 mtu=9000 config-interval=1 !
queue ! udpsink host=123.45.67.89 port=9999 async=false
This command is executed from the application.

rtph265payCustom is a custom element I developed, which sends received frames via UDP while in the PAUSED state.

■ Video Output Pipeline
This pipeline receives the UDP stream, decodes the H.265 video, and displays it.

gst-launch-1.0
udpsrc port=9999 buffer-size=10000000 !
application/x-rtp,media=video,encoding-name=H265 !
rtpjitterbuffer latency=1000 !
rtph265depay ! video/x-h265,framerate=30000/1001,width=3840,height=2160,profile=main !
nvh265dec ! glcolorconvert ! glimagesink sync=false
This command is run from the command line.

■ Reverse Playback Logic
Reverse playback is implemented as follows:

The output pipeline is set to the PAUSED state.
Every 33ms, a seek is issued to rewind the playback position by 33ms.

■ Issue and Question
With this setup, normal playback works fine, but during reverse playback, the video does not play smoothly.
However, if I remove the rtpjitterbuffer element from the output pipeline, reverse playback becomes smooth.

■ My Questions
What might be causing the rtpjitterbuffer to interfere with reverse playback?

Are there any recommended investigation or troubleshooting approaches for this issue?
It uses Gstreamer 1.20.7.

I’d really appreciate any insight or suggestions you might have.
Thank you in advance!

1 Like