Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To display an external SRT file over a video with GStreamer, parse it with subparse and connect it to textoverlay’s text pad; connect the decoded video to the overlay’s video pad. The command below follows GStreamer’s documented example. It displays captions during playback—it does not create a permanently captioned output file. YouTube playlist retrieval and advancement are separate steps: the reviewed GStreamer documentation does not establish that a YouTube playlist URL can be used directly.

Burn SRT captions into a GStreamer playback stream

For a local video and matching external .srt file, run this command in a terminal with GStreamer’s command-line tool and the required elements installed:

gst-launch-1.0 textoverlay name=overlay ! videoconvert ! videoscale ! autovideosink 
  filesrc location=movie.avi ! decodebin3 ! videoconvert ! overlay.video_sink 
  filesrc location=movie.srt ! subparse ! overlay.text_sink

Replace movie.avi and movie.srt with the paths to your video and subtitle file. The video branch decodes the video and sends it to overlay.video_sink. The subtitle branch reads the SRT file, parses its cues, and sends timestamped text to overlay.text_sink. textoverlay renders the text over the video and matches subtitle and video timestamps to determine when each cue appears. GStreamer describes the element as rendering text on top of a video stream: textoverlay documentation. The full command pattern is in the gst-launch-1.0 documentation.

What you should see

The video should open in an available video sink, with each SRT cue displayed according to its timestamps. Wrapping is enabled by default for textoverlay. Actual file support depends on the codecs, decoders, and sink elements installed on your system; a failure to open a particular format is not necessarily a subtitle-pipeline problem.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
VideoPad Video Editor - Create Professional Videos with Transitions and Effects [Download]
  • Apply effects and transitions, adjust video speed and more
  • One of the fastest video stream processors on the market
  • Drag and drop video clips for easy video editing
  • Capture video from a DV camcorder, VHS, webcam, or import most video file formats
  • Create videos for DVD, HD, YouTube and more

Check the SRT and paths

  • Confirm both files exist at the specified paths. If a path contains spaces, quote the property value, for example filesrc location="my movie.avi".
  • Check that the SRT is valid and its cue times correspond to the video’s timeline. The overlay uses timestamps, so cues with incorrect timing can be parsed but appear at the wrong moments.
  • Use a video format your installed GStreamer plugins can decode. The example uses decodebin3; the available decoder and sink depend on the local installation.

Why this does not create a permanently captioned file

The example ends in autovideosink, which displays the result. It does not encode or save a new video. In this playback pipeline, “burn in” means the captions are visibly rendered over the picture while it plays, not that the source file has been changed.

To make a durable captioned file, the pipeline needs additional video-encoding, container-muxing, and file-output stages after the overlay. The cited subtitle example does not specify those stages or a suitable codec and container for your needs, so do not treat the playback command as a file-export recipe. GStreamer’s playback tutorials provide broader playback context, but the correct output pipeline depends on the formats and plugins available in your environment.

Use playbin3 when player-managed subtitles are enough

If you do not need to wire the overlay pads yourself, GStreamer documents playbin3 with a media uri and an external subtitle suburi. It is a simpler player-managed option for external subtitles, but it does not show the direct textoverlay graph above or establish a YouTube playlist workflow. See the playbin documentation.

Handle YouTube playlist entries separately

The GStreamer references reviewed document generic URI playback and network playback, but do not document YouTube watch-URL extraction, YouTube playlist resolution, or automatic advancement through a YouTube playlist. Do not assume that putting a playlist URL into a GStreamer uri property will work.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a playlist-based workflow, treat getting playable media URIs and iterating through entries as an upstream task. Resolve each entry into a URI that GStreamer can read, then pass the entries to the playback or processing pipeline. The resolver, authentication and availability conditions, and present-day compatibility with YouTube are not established by the cited GStreamer material; verify them for your own setup. Once you have a readable media URI, the subtitle-overlay method applies to the video input, provided its timestamps match the SRT.

Troubleshoot common failures

  • “No such element” or a missing plugin: The local installation may not include the element named in the graph. Check the installed GStreamer plugins and confirm availability for textoverlay, subparse, decodebin3, and the selected sink. Availability varies by installation.
  • The video plays but captions do not appear: Confirm that the subtitle branch uses filesrc ! subparse ! overlay.text_sink, that the SRT path is correct, and that the cue times overlap the video timeline.
  • Captions appear at the wrong time: Compare the SRT cue times with the video’s timeline. textoverlay matches the timestamps it receives; it cannot correct an SRT file whose timing does not match the video.
  • The video does not open: Check the filename and whether your GStreamer installation can decode that file’s format. The documented graph’s decoder and playback sink still depend on local plugin availability.
  • Characters display incorrectly: For a pipeline using subtitleoverlay, GStreamer documents a subtitle-encoding property. If unset, encoding falls back to GST_SUBTITLE_ENCODING, then ISO-8859-15; this setting belongs to subtitleoverlay, not the explicit textoverlay graph above. See the subtitleoverlay documentation.
  • Network playback pauses: GStreamer’s playbin documentation describes buffering-message handling for applications: keep or set the pipeline to PAUSED below 100% buffering, then return it to PLAYING at 100% when playback is desired. This is application-level guidance, not an automatic YouTube-playlist fix.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or let it run in the cloud

If your goal is to keep a finished video playing as a YouTube live stream, rather than build the GStreamer pipeline yourself, StreamNeo is a separate cloud option. Upload a recording or build a playlist, add your YouTube stream key, and go live. It loops uploaded videos in the cloud, so nothing has to stay on at home. StreamNeo streams uploaded videos to YouTube only; it does not go live from a camera.

Rank #4
Sale
Nero Video Premium 3 | Video Editing Software for 4K, HD, and HEVC | Video Editor | Lifetime License | 1 PC | Windows 11/10/8/7
  • ✔️ Edit in 4K and HD with Professional Quality: Import, edit, and export videos in stunning 4K, HD, and HEVC formats. Enjoy advanced video editing tools that bring your footage to life with exceptional clarity.
  • ✔️ Create & Burn High-Quality DVDs and Blu-ray Discs: Burn videos, slideshows, and movies to DVDs and Blu-ray discs with the world's best burning engine, offering cinematic quality 24p Blu-ray output.
  • ✔️ Stream & Playback Anywhere: Effortlessly stream your media to smart TVs, Xbox, and other devices using the free Nero Streaming Player App. Enjoy seamless playback of your videos, photos, and music.
  • ✔️ First-Class Effects & Templates: Over 800 effects, transitions, text styles, and video templates, including 10 new ‘My Day’ and ‘Action’ film themes. Customize your projects with advanced picture-in-picture and tilt-shift effects.
  • ✔️ Lifetime License with Full Support: One-time purchase with a lifetime license for 1 PC. Enjoy free updates and comprehensive support, with access to the Nero KnowHow Learning Center and mobile sync apps.
  • Any quality up to 4K 60fps, streamed as uploaded, at one flat price per slot.
  • Automatic recovery if YouTube drops the stream.
  • The first day is free with no card.
  • Monthly: $9.99 per month.

StreamNeo plays uploaded videos; it is not a GStreamer subtitle-rendering step. If your captions need to be part of the video image, prepare a captioned recording before uploading. See StreamNeo or start the free day.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.