Troubleshooting FFmpeg Lossless Cut Issue

Abstract: Resolve FFmpeg lossless cut video freezes by using stream copy with explicit keyframe seeking and the avoid_negative_ts flag to fix timestamp errors.

Created: 2026-08-03 by
FFmpeg lossless cut issues where the output video freezes typically stem from incorrect timestamp handling or container format incompatibilities rather than codec errors. The most common solution involves using the correct stream copy method with explicit keyframe seeking, ensuring that the output container matches the input structure. By avoiding re-encoding and fixing negative timestamps, you can resolve playback stutters in players like VLC or Windows Media Player without needing to recompile FFmpeg or use outdated builds.

Understanding the Freeze Symptom

When a user reports that an FFmpeg lossless cut output file "freezes," they are usually describing a video that plays for a few seconds and then hangs indefinitely, or audio/video desynchronization that appears as a freeze. This is rarely a corruption of the video data itself since lossless cutting uses stream copying (-c copy). Instead, it is almost always a metadata or timestamp issue. Players rely on accurate presentation timestamps (PTS) and decoding timestamps (DTS) to render frames. If these values are out of order, negative, or missing, the player cannot determine when to display the next frame. This results in the application waiting for data that will never arrive in the expected sequence, creating the illusion of a frozen screen. It is crucial to distinguish this from encoding failures, which often produce garbled visuals or complete failure to open files, as discussed in our guide on FFMPEG Video Encoding Example Not Working.

The Correct Lossless Cut Command

The standard approach to cutting video without re-encoding is using the -c copy flag. However, simply specifying start and end times is not enough if the source file has complex timestamp structures. The most robust command for lossless cutting looks like this:
ffmpeg -ss 00:01:00 -i input.mp4 -to 00:02:00 -c copy -avoid_negative_ts make_zero output.mp4
Let's break down why each part matters. The -ss flag before -i performs fast seeking by jumping to the nearest keyframe before the specified time. This is much faster than seeking after -i, but it may include slightly more data than requested. The -to flag specifies the end time. The -c copy instruction tells FFmpeg to stream-copy all tracks (video, audio, subtitles) without touching them, preserving original quality. The critical addition here is -avoid_negative_ts make_zero. Older versions of FFmpeg or certain containers might produce negative timestamps during cuts. While some modern players handle this gracefully, many older or stricter players will fail to decode frames with negative PTS, leading to the freeze. Setting these to zero ensures a clean timeline starting at 00:00:00.000.

Container Format Compatibility

Even with perfect commands, the output container must support the streams inside it. MP4 is the most universal container, but it requires specific codecs. If your input is MKV containing VP9 or AV1 video, copying those streams directly into an MP4 container will fail because MP4 does not natively support those codecs without remuxing or transcoding. If you encounter errors about unsupported codecs when trying to create an MP4, check your input format. If you are working with specialized formats like WebM or MKV, consider keeping the output in MKV instead of forcing MP4. For users dealing with hardware acceleration conflicts that might cause similar playback issues, refer to our article on FFmpeg Quicksync Video Conversion with NVIDIA Hardware. Another common pitfall is using -f mp4 incorrectly. If you force a format that doesn't match the codec capabilities, FFmpeg might write invalid headers. Always let FFmpeg guess the format based on the extension unless you have a specific reason to override it. Using -movflags +faststart can also help with web playback by moving the index to the beginning of the file, though this is optional for local playback.

Diagnostics and Verification

Before assuming the cut failed, verify the output file properties. Use ffprobe to inspect the timestamps of the resulting file:
ffprobe -show_packets output.mp4 | grep pts_time
Look for any negative values. If you see negative PTS values, the -avoid_negative_ts flag was necessary. If the timestamps jump erratically (e.g., 1.0, 5.0, 2.0), the keyframe alignment was poor. In such cases, you might need to use -ss after -i for precise seeking, but this forces a re-encode, defeating the purpose of lossless cutting. If the file still freezes, test it in a different player. VLC is generally very forgiving with timestamp issues, while Windows Media Player or default gallery apps are less so. If it works in VLC but not elsewhere, the issue is definitely timestamp-related. You can try remuxing the file with ffmpeg -i input.mkv -c copy output.mp4 to rebuild the container headers, which often fixes minor metadata inconsistencies. For users experiencing startup crashes or application errors unrelated to video content, such as the 0xc0000005 error, see our troubleshooting guide on Fixing FFmpeg: Application unable to start (0xc0000005) Issue.

Frequently Asked Questions

Why does my lossless cut work in VLC but freeze in Windows Media Player?

This discrepancy is caused by how strictly each player adheres to ISO base media file format standards. VLC is lenient with timestamp anomalies, while Windows Media Player expects perfectly ordered positive timestamps. Using the -avoid_negative_ts make_zero flag resolves this by normalizing the timeline for stricter players.

Can I use lossless cut on HEVC/H.265 videos?

Yes, provided the output container supports HEVC. MP4 and MKV both support H.265. Ensure your FFmpeg build includes HEVC decoder/encoder support. If you face codec-specific errors, check if your version supports the required profiles, as older builds might lack full HEVC compatibility.

What should I do if the cut point is not exact?

Lossless cutting relies on keyframes. If you cut between keyframes, FFmpeg will include the entire preceding keyframe segment, making the cut slightly longer than requested. This is unavoidable without re-encoding. For pixel-perfect accuracy, you must re-encode, which sacrifices the "lossless" nature of the operation.

Does -avoid_negative_ts fix encoding errors?

No, this flag only adjusts timestamp metadata; it does not fix codec corruption or bitrate mismatches. If your video is garbled or has no audio, the issue lies in the stream copying process or codec compatibility, not timestamps. Refer to general encoding troubleshooting guides for those symptoms.

Is it safe to use third-party GUI tools for lossless cutting?

Most reputable GUI tools like LosslessCut or Shutter Encoder use FFmpeg under the hood. They are generally safe and provide visual previews of keyframes. However, always verify the underlying command they generate if you encounter issues, as GUI defaults may vary in their handling of timestamps and containers.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More