# Gapless playback with playbin3

**URL:** https://discourse.gstreamer.org/t/gapless-playback-with-playbin3/385
**Category:** Application Development
**Created:** [October 25, 2023, 3:40pm UTC](https://discourse.gstreamer.org/t/gapless-playback-with-playbin3/385 "2023-10-25T15:40:37Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![parithi](https://discourse.gstreamer.org/letter_avatar_proxy/v4/letter/p/54ee81/32.png) [@parithi](https://discourse.gstreamer.org/u/parithi)
#### Post date: [October 25, 2023, 3:40pm UTC](https://discourse.gstreamer.org/t/gapless-playback-with-playbin3/385/1 "2023-10-25T15:40:38Z")

</div>

Hi,

I am trying to do gapless playback using playbin3 with decklinksink elements. Starting the playback with a mp4 file and second in the list is a mkv file. Changing the uri in “about-to-finish” callback function. After switching to second uri (mkv file’s uri), only audio is coming. There is no video in the output.

Did testing with some more combination and the result is attached.

![TestResults](https://discourse.gstreamer.org/uploads/default/original/1X/11cae1835c836ecc4bda1b997ebe23fa2e29252c.png)

**There is no issue when I do a instant uri change.**

It would be very helpful if somebody help me on this issue.

---

<div class="post-metadata">

### Author: ![parithi](https://discourse.gstreamer.org/letter_avatar_proxy/v4/letter/p/54ee81/32.png) [@parithi](https://discourse.gstreamer.org/u/parithi)
#### Post date: [October 26, 2023, 8:30am UTC](https://discourse.gstreamer.org/t/gapless-playback-with-playbin3/385/2 "2023-10-26T08:30:21Z")

</div>

All test files are generated using following pipelines

TS  
gst-launch-1.0 videotestsrc ! video/x-raw, width=1920, height=1080, format=I420, framerate=25/1 ! timeoverlay ! textoverlay text=“TS” ! x264enc bitrate=6000 bframes=0 key-int-max=50 pass=0 threads=8 ! h264parse ! mpegtsmux name=mux ! filesink location=…/streams/tp.ts audiotestsrc ! audio/x-raw, rate=48000, format=S16LE ! queue ! audioconvert ! avenc\_aac ! aacparse ! mux. -e

MP4  
gst-launch-1.0 videotestsrc ! video/x-raw, width=1920, height=1080, format=I420, framerate=25/1 ! timeoverlay ! textoverlay text=“MP4” ! x264enc bitrate=6000 bframes=0 key-int-max=50 pass=0 threads=8 ! h264parse ! mp4mux name=mux ! filesink location=tp.mp4 audiotestsrc ! audio/x-raw, rate=48000, format=S16LE ! queue ! audioconvert ! avenc\_aac ! aacparse ! mux. -e

MKV  
gst-launch-1.0 videotestsrc ! video/x-raw, width=1920, height=1080, format=I420, framerate=25/1 ! timeoverlay ! textoverlay text=“MKV” ! x264enc bitrate=6000 bframes=0 key-int-max=50 pass=0 threads=8 ! h264parse ! matroskamux name=mux ! filesink location=tp.mkv audiotestsrc ! audio/x-raw, rate=48000, format=S16LE ! queue ! audioconvert ! avenc\_aac ! aacparse ! mux. -e
