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
- 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.
- Verify the playlist. Check the order and every file path against the files you intend to stream.
- 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.
- 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.
- 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:
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstall#1 Best Overall
- 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.ffconcatreads the concat-demuxer list.-stream_loop -1repeats the input indefinitely. It does not normalize the clips.-rereads 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
- 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.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Rank #3
- 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
- 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
- In YouTube Live Control Room, create or open the live stream and obtain the server URL and stream key from its encoder setup.
- Enter those values in your encoder’s output settings, along with settings appropriate to the intended resolution, codec, frame rate, and bitrate.
- Treat the stream key like a password. If it is exposed, replace or reset it in YouTube’s stream settings.
- Test before going live and monitor stream health and the specific messages in Live Control Room.
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.
Quick Recap
Best Value
- 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.




