October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
DocumentaryTube
concat demuxer

How to Fix FFmpeg Timestamps in a YouTube Live Looping Playlist

A non-monotonous DTS error is a symptom, not a universal-flag problem. Find the failing clip boundary, verify concat compatibility and durations, and separate local timestamp issues from YouTube ingest settings.

By DocumentaryTube Team 6 min read
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

There is no universal FFmpeg flag that fixes timestamp errors in every looping playlist. First find out whether the problem begins at a clip boundary or when the playlist returns to its first clip, then check the concat list, stream compatibility, and clip durations. Only change timestamps after you have identified a specific timestamp issue; options such as -stream_loop -1 and -re control looping and pacing, not timestamp repair.

Why timestamps can break at a playlist boundary

FFmpeg’s concat demuxer reads files in sequence and adjusts their timestamps so the first file starts at zero and each later file starts when the previous one is estimated to end. That depends on the files being compatible: the concat demuxer expects the same streams, codecs, and time bases in each file. It uses each file’s duration to position the next one, so inaccurate duration metadata can cause gaps or artifacts. Unequal audio and video lengths can also create gaps.

A “non-monotonous DTS” message is a symptom, not a diagnosis. Timestamp resets inside source files are not automatically the cause: concat already adjusts timestamps between files. Identify where the first bad timestamp appears, and investigate that boundary before changing packet timestamps.

Diagnose the failing boundary first

  1. Save the complete FFmpeg log. Note whether the first error appears when moving to a particular clip, or only when the sequence returns to its first clip.
  2. Verify the playlist. Check the order and every file path against the files you intend to stream.
  3. Compare the clips. Inspect stream count, codecs, time bases, frame rates, audio formats, and reported durations. Pay particular attention to the clip before the first error and the next clip in the list; if the error occurs on repetition, inspect the final-to-first transition.
  4. Check media integrity and duration. Look for truncated or damaged files and duration metadata that does not reflect the actual media. Do not add an explicit concat duration unless you independently know the correct duration.
  5. Test locally before testing live. A clean local concatenation narrows the investigation to live encoding or YouTube ingest; a local boundary glitch points back to the inputs or concat setup.

Build and pace a looping concat input

For a local sequence, create an ffconcat text file with one file directive per clip, in playback order. For example:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
ffconcat version 1.0
file '/media/clip-01.mp4'
file '/media/clip-02.mp4'
file '/media/clip-03.mp4'

Then use the concat demuxer as the input. The following is a structural example, not a guaranteed repair command; set the output encoder, bitrate, resolution, and audio options to suit the actual source and YouTube’s current guidance.

ffmpeg -re -stream_loop -1 -f concat -safe 0 -i playlist.ffconcat 
  -c:v libx264 -c:a aac -f flv "rtmps://YOUR_YOUTUBE_INGEST_URL/YOUR_STREAM_KEY"
  • -f concat -i playlist.ffconcat reads the concat-demuxer list.
  • -stream_loop -1 repeats the input indefinitely. It does not normalize the clips.
  • -re reads file input at its native rate rather than sending it as fast as possible. It does not fix timestamps.
  • Input-scoped options belong before the input they apply to. Keep your actual YouTube stream key private; do not paste it into public logs or share it in a command example.

The example uses -safe 0 to allow absolute paths in a local list. Use it only with a playlist you control, not an untrusted file list. If the files have mismatched stream layouts or encoding parameters, stream copy (-c copy) does not make them equivalent.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

Choose stream copy or normalization based on the files

Approach Use it when Trade-off
Stream copy The clips have compatible streams, codecs, and time bases, and their durations are accurate. Uses fewer resources, but preserves the source packets and cannot reconcile mismatched inputs.
Normalize or transcode The clips have differing stream layouts or encoding parameters, or a compatible stream-copy sequence cannot be produced. Can make inputs consistent, but continuous encoding costs CPU and a poorly chosen encode can reduce quality. Verify audio/video sync at transitions.

If metadata duration is wrong but the actual duration is known, the concat script supports a duration directive for each file. If you cannot make the files satisfy the demuxer’s compatibility assumptions, create normalized intermediate files or transcode them to consistent properties, then test the joined result locally.

Change timestamps only for a diagnosed reason

FFmpeg’s setts bitstream filter can assign expressions to packet PTS, DTS, duration, or time base. That describes what the filter can manipulate; it is not a universal repair recipe. The appropriate change depends on the demuxer, codecs, time base, and whether the process copies or encodes streams.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

In particular, setting PTS equal to DTS is documented as not recommended when B-frames are involved. Do not add -copyts, -copytb, -fflags +genpts, or -avoid_negative_ts as generic fixes. Before changing timestamp behavior, identify the affected stream and packets, then check audio/video synchronization and playback across the boundary. Use the help and documentation for the FFmpeg release actually installed; do not treat the historical proposed -force_dts_monotonicity patch as a current supported option.

Check YouTube Live ingest separately

A clean local concat does not prove successful YouTube ingest, and a YouTube ingest problem does not repair a bad local timestamp sequence. YouTube’s current encoder guidance lists RTMP/RTMPS ingest, H.264, H.265 (HEVC), or AV1 video, AAC or MP3 audio, constant bitrate (CBR), frame rates up to 60 fps, and a recommended two-second keyframe interval that should not exceed four seconds. It provides bitrate recommendations by resolution, codec, and frame rate, so select the row for your actual output instead of applying one generic bitrate to every stream. YouTube recommends RTMPS.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2Ă— USB C male to USB A female adapters and 2Ă— USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
  1. In YouTube Live Control Room, create or open the live stream and obtain the server URL and stream key from its encoder setup.
  2. Enter those values in your encoder’s output settings, along with settings appropriate to the intended resolution, codec, frame rate, and bitrate.
  3. Treat the stream key like a password. If it is exposed, replace or reset it in YouTube’s stream settings.
  4. Test before going live and monitor stream health and the specific messages in Live Control Room.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common symptoms and what to check

Symptom Likely branch to investigate Next check
Error or glitch begins when a particular clip starts Clip-boundary compatibility, media integrity, or duration Compare the outgoing and incoming clips’ streams, time bases, and durations; test a local concat.
Problem appears only when the playlist returns to its first clip The last-to-first boundary or behavior of the looped input Inspect the final and first files and their durations; check the complete log at the transition.
Joined local output is clean, but YouTube reports a problem Live encoder configuration or ingest Check codec, audio format, CBR, frame rate, keyframe interval, server URL, stream key, and YouTube’s stream-health messages.
Audio/video drifts or a gap appears after a timestamp change The timestamp adjustment may not fit the stream or codec Revert the change, inspect the stream time bases and durations, and validate synchronization through the boundary.

Or let it run in the cloud

If the goal is a YouTube channel that keeps playing uploaded videos, StreamNeo is an alternative to maintaining an FFmpeg process and computer at home. Upload a recording or build a playlist, add your YouTube stream key once, and go live; StreamNeo loops the uploaded videos from the cloud. Nothing has to stay on at home. Each slot streams the upload as made, up to 4K 60fps, at one price per slot; StreamNeo automatically recovers if YouTube drops the stream. The first day is free with no card, one free day per account. Monthly is $9.99 per month. StreamNeo plays uploaded videos to YouTube; it does not stream from a camera. Learn about StreamNeo or start the free day.

Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

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.

Free tools Windows power users keep installed

One-click scans. No signup required.

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

Leave a Reply

Your email address will not be published. Required fields are marked *

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

More from the Screening Room

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.