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

FFmpeg can trim clips, join files, add selectable subtitle tracks, and burn subtitles into the picture. The right command depends on whether you want to copy existing encoded streams or decode, process, and re-encode them. Stream copying is usually faster and avoids another encoding pass, but it has compatibility and cut-point constraints; filtering gives you more control but requires suitable encoders and takes more processing.

Start by inspecting your input, decide which streams the output should contain, and choose the least complex workflow that meets your needs. FFmpeg’s web documentation follows the newest revision, so check the documentation and available features for your installed build when an option or format is unavailable.

Understand the input, output, and streams

FFmpeg’s command line reads one or more inputs, selects streams, and writes one or more outputs. It can copy streams without re-encoding, transcode them with encoders, and process audio or video through filters. The simple shape ffmpeg -i input.mp4 output.mp4 is a conversion example, not a universal high-quality editing recipe: the output container, selected streams, and encoding behavior depend on the inputs and defaults.

Before editing, inspect the file:

ffmpeg -i input.mp4

The output reports stream indexes, types, codecs, and other file details. For example, an input might contain video stream 0:0, audio stream 0:1, and subtitle stream 0:2. Those indexes are examples only; use the ones FFmpeg reports for your file. If a specific audio, video, or subtitle track matters, map it explicitly rather than relying on automatic stream selection.

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
Blackmagic Design Davinci Resolve Speed Editor, Bluetooth & USB-C Editing Keyboard Bundle with Davinci Resolve Studio Activation Card
  • Small and Portable with Built-In Battery
  • Built-In Search Dial
  • Keyboard Shortcuts Match Edit Functions
  • Bluetooth or USB Connectivity
  • Bundle Includes DaVinci Resolve 17 Studio (Activation Card)

In a command, -i introduces an input, options before an output generally describe how that output is made, and -map selects streams to include. Stream copy uses -c copy; it avoids decoding and re-encoding the selected streams. A filter changes decoded media and therefore requires encoding the affected output stream.

Trim a clip: fast packet copy or filtered re-encoding

Choose between these methods based on what matters most. Copying packets is fast, but a requested timestamp may not correspond to a suitable keyframe or packet boundary. Filtering decoded frames allows a more precise edit in the processing timeline, but requires encoding the video again. Neither command should be treated as a substitute for checking the actual result.

Quick trim with stream copy

For a quick cut when packet-level timing is acceptable, this pattern starts at 00:00:10 and requests 15 seconds of output:

ffmpeg -ss 00:00:10 -i input.mp4 -t 15 -map 0 -c copy quick-cut.mp4

Here -ss specifies a start time, -t specifies an output duration, -map 0 asks for all streams from the input, and -c copy copies them without re-encoding. If the selected streams cannot be represented in the output container, the command may fail; see the mapping and container notes below. Seeking and packet boundaries can also affect the exact first and last displayed frames. Watch the cut in a media player and check its duration before using it.

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

Trim with a video filter

When you need a cut based on decoded video timestamps rather than simply copying packets, use a trim filter and encode the result. This example keeps video from 10 through 25 seconds, resets video timestamps, and copies audio as a separate stream:

Rank #2
XPPen Mini Keydial ACK05 Wireless Shortcut Keyboard Bluetooth Programmable Express Remote Control with Dial & Customized Express Keys for Drawing Tablet PC MacBook Windows Images Video Editing
  • Wireless Connection: ACK05 wireless shortcut keyboard supports bluetooth 5.0 connection directly, which is Good Design Award 2023 Winners, providing you a more flexible and clean workspace. You can also connect it via a Bluetooth dongle or USB cable. Total three ways connection bring you stable and fast transmission, also can meet your different work scenarios
  • Please Note: If you do not download the driver, it can only be used as a regular shortcut keyboard. However, if you wish to customize the keys or program it, you must download the driver and configure it accordingly. If your device is an iPad or runs on iOS, after receiving the product, you need to download the "Shortcut Remote" app on your device in order to properly set up and use this product properly
  • Compact Size with Large 1000 mAh Battery: The Wireless Shortcut Remote features a thin profile and weighs only 75 g, easy for one hand to hold. With built-in 1000 mAh battery ensures the continuous working for about 300 hours. Ready to speed up your creation whenever you grab it
  • Customize up to forty Shortcuts: The Wireless Shortcut Remote has ten keys. You are allowed to customize four sets through the driver -- up to forty shortcuts. To switch between the sets, you only need to press a single key. Its capability to work with different applications makes itself a powerful productivity tool not only for creation, but also for study, work, and gaming
  • Anti-Ghosting Performance: The Mini Keydial features a new technology of Anti-ghosting for all ten keys, you can control with multi-keys at the same time, which will give you more customizable possibilities
ffmpeg -i input.mp4 -map 0:v:0 -map 0:a? -vf "trim=start=10:end=25,setpts=PTS-STARTPTS" -c:v libx264 -crf 18 -preset medium -c:a copy filtered-cut.mp4

This example assumes the input has video stream 0 and that any copied audio can be placed in the output container. The ? in -map 0:a? makes audio selection optional. The example re-encodes video with libx264, if that encoder is available in the installed build; -crf and -preset are encoder settings, not guarantees of a particular file size or quality. Because audio is copied separately, it may not align exactly with the filtered video at the cut. If synchronized start and end points matter, trim and encode audio too, then inspect both audio and video.

Filter behavior, encoder availability, and exact cut results depend on the source and FFmpeg build. Check local help with ffmpeg -h and inspect available encoders or filters if a command reports an unknown encoder or filter.

Join clips: choose the concat method that fits

FFmpeg has three distinct concat approaches. The concat demuxer can join compatible inputs without re-encoding; the concat filter is the route for joining decoded streams when re-encoding or processing is acceptable; the concat protocol joins files at the file level only for suitable formats. They are not interchangeable recipes for arbitrary clips.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Method Re-encoding When it fits Main constraint
Concat demuxer Can be avoided with stream copy Compatible files whose streams can be concatenated as one sequence Inputs must have compatible stream structure and parameters; it is not a general remedy for mismatched sources.
Concat filter Normally needed for filtered output Clips need processing, or you are willing to re-encode to produce a joined output Inputs and streams must be connected appropriately in the filter graph, and suitable output encoders must be available.
Concat protocol Can avoid re-encoding in supported cases File-level concatenation for formats that support it; FFmpeg documentation gives MPEG-1, MPEG-2 program stream, and DV as examples. Do not assume that joining MP4 files this way works; format and stream conditions govern suitability.

Use the concat demuxer for compatible files

Create a plain-text file list, for example join.txt:

file 'part1.mp4'
file 'part2.mp4'

Then run:

ffmpeg -f concat -safe 0 -i join.txt -map 0 -c copy joined.mp4

This requests stream-copy concatenation. The file list paths are relative to the working directory unless you provide other paths. -safe 0 allows paths the concat demuxer would otherwise reject as unsafe; only use it with a list you trust. If inputs differ in codec parameters, stream layout, or other relevant properties, the join may fail or produce unexpected results. Normalize or re-encode the sources, or use a concat filter when processing is needed.

Rank #3
VSD K1 Pro 87‑Key Macro Mechanical Keyboard with Integrated Streaming Deck
  • Full-Key Programmable On-board Keyboard: This macro keyboard supports macro recording and free assignment to any key. You can configure shortcuts, macros, and multi-step operation flows via the web-based interface or the latest VSD Craf software (reset your device after reinstallation or update). Record and edit macros to boost work efficiency and speed up gameplay
  • Stream Controller Deck Function (via VSD Craf Software): Create unlimited switchable pages, with each page containing 6 LCD keys & 3 knobs. This offers unparalleled flexibility, allowing you to assign individual or series of actions to streamline your workflow. Whether executing game combos, launching apps, or controlling media, the possibilities are endless. You can even personalize each LCD key with images and animations (JPG, PNG, GIF) for easier recognition and memorization
  • Smart Display Screen & Multi-function Knob: The VSD K1 Pro wired gaming streaming keyboard features a built-in intelligent TFT color display, serving as an interactive interface for real-time updates and customization. The high-definition LCD display and multi-function knobs make it simple to switch and customize GIFs, volume, date and time, backlighting, and connection modes for improved usability. Note: Screen images/GIFs and date/time calibration require software installation under Windows/macOS and a wired connection
  • Hot-Swappable Custom Keyboard: The VSD K1 Pro wired macro shortcut keyboard is equipped with a hot-swappable PCB compatible with 3-pin or 5-pin switches. No soldering is required, letting you easily replace switches and keycaps for a fully personalized typing experience (keycap/switch puller included). Pre-lubed stabilizers and switches deliver a smooth, creamy typing feel and satisfying mechanical sound, ensuring fast response for intense gaming
  • Gasket Mount & Advanced 5-Layer Dampening Structure: This macro pad keyboard uses an advanced structure with extended integrated silicone pads and PCB single-key slotting to optimize resilience and stability for a softer, more elastic feel. The 5-layer sound-dampening fills gaps between the PCB, plate, and switches, effectively reducing cavity noise and delivering a pure, clean sound with every keystroke

Use the concat filter when processing or re-encoding

For two clips that each contain one video and one audio stream, a basic filter-graph pattern is:

ffmpeg -i part1.mp4 -i part2.mp4 -filter_complex "[0:v:0][0:a:0][1:v:0][1:a:0]concat=n=2:v=1:a=1[v][a]" -map "[v]" -map "[a]" -c:v libx264 -c:a aac joined.mp4

The graph pairs each clip’s video and audio streams, joins two segments, and labels the resulting streams for mapping. This exact layout assumes both inputs have the stated streams. If a clip lacks audio, has extra tracks, or differs in dimensions, frame rate, or timing, adjust the graph and prepare the inputs as needed. The output encoders shown must be available in your build. Re-encoding takes processing time and may change media quality; inspect the result for synchronization, transitions, and playback.

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

Reserve the concat protocol for suitable formats

The concat protocol joins data at the file level. FFmpeg documentation names MPEG-1, MPEG-2 program stream, and DV as examples where this method can apply. That does not make it a universal way to join MP4 files or clips with different stream properties. If you cannot establish that the format and streams support file-level concatenation, use the demuxer or filter approach instead.

Add subtitles as a selectable track or burn them in

“Add subtitles” can mean two different things. Muxing subtitles into a container creates a track viewers may be able to select or turn off. Burning subtitles into video renders the text into the picture, so it is not a separate toggleable track and the video must be processed and encoded.

Mux a subtitle track

For an SRT file and an MP4 target, try mapping the video, audio, and subtitle inputs explicitly and encoding the subtitle stream as mov_text when that encoder is available:

Rank #4
Logitech MX Creative Console 9 Customizable Keys - Graphite
  • 3-months of Adobe Creative Cloud on us: Pair two of the world’s top creative tools. Buy one MX Creative Console and claim your free 3-month Adobe Creative Cloud membership
  • Speed Up Your Creative Workflow: The Logitech MX Creative Console lets you quickly access tools and actions on your favorite apps, allowing you to fully focus on your work
  • App Integrations: Adobe Photoshop, Premiere Pro, Illustrator, Lightroom and Lr Classic, Final Cut Pro, Figma, Davinci Resolve, Spotify, Zoom, and more; quick start with recommended profiles (1)
  • Tactile Analog Control: Make precise adjustments with the low-friction control dial, navigate with the roller, and access actions with the programmable keypad (stand included for flexible placement)
  • Customize for Any App: Assign tools and actions to up to 15 keypad pages by profile, dial, and roller, and upload your own icons to the customizable LCD display keys
ffmpeg -i input.mp4 -i captions.srt -map 0:v:0 -map 0:a? -map 1:0 -c:v copy -c:a copy -c:s mov_text subtitled.mp4

This command copies video and audio and converts the subtitle stream to the selected subtitle codec. It assumes the intended subtitle input is stream 0 of captions.srt, and that the streams are suitable for the MP4 output. Subtitle demuxing, encoding, and muxing support vary by format and build: a format appearing in a support list does not mean every installed build can perform every operation on it. If the command reports an unsupported subtitle codec or container combination, check the installed format and codec listings and choose a supported output combination.

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

Burn subtitles into the video

To render an SRT file onto video frames, use the subtitles filter and re-encode the video:

ffmpeg -i input.mp4 -vf "subtitles=captions.srt" -map 0:v:0 -map 0:a? -c:v libx264 -crf 18 -preset medium -c:a copy burned-in.mp4

This assumes the subtitles filter and encoder are present in your build. The filter option may need adjustment for paths containing special characters, and quoting rules differ between shells. Check the local filter help if the filter is unavailable or rejects the filename. Because the text becomes part of the encoded picture, you cannot later disable it as a subtitle track.

Keep the intended audio, video, and subtitle streams

Automatic stream selection is convenient for simple conversions, but it may not select the particular track you want. Use -map to name streams explicitly. For an input with video stream 0, audio stream 1, and subtitle stream 2, a selective mapping pattern is:

ffmpeg -i input.mkv -map 0:0 -map 0:1 -map 0:2 -c copy output.mkv

These indexes are illustrative; inspect your own input first. The 0 before the colon means the first input, while the number after it identifies a stream. Use optional mapping, such as -map 0:a?, when the command should proceed if a stream type is absent. If a target container does not support one of the mapped streams, either select a different compatible output container, omit that stream, or convert it to a supported codec.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
ULANZI D100H Wireless Video Editing Keyboard with Dial Knob
  • Stepless Dial with Immersive Haptic Feedback: The high-precision aluminum alloy dial spins smoothly without detents, driven by a wide-range linear motor that delivers satisfying tactile vibrations with every increment. Whether you're scrubbing through a timeline frame by frame in DaVinci Resolve, dialing in color saturation in Lightroom, or adjusting brush size in Photoshop, the haptic pulse confirms every adjustment without looking at the screen - your fingers feel the precision. Clockwise, counter-clockwise, press to confirm - one knob, infinite control
  • 7 Customizable Keys & Dual Working Modes: Offline Mode stores your preset shortcuts directly on the device - plug in via Bluetooth and start editing immediately, no software required. Online Mode connects to Ulanzi Studio, where the D100H automatically detects your active application and switches key assignments on the fly: jump from DaVinci Resolve with timeline controls to Photoshop with brush and layer shortcuts without touching a single setting
  • Built-In Lighting Ecosystem Control via Ulanzi Connect: The D100H isn't just an editing controller - it's a bridge to your entire Ulanzi lighting setup and smart home lights. Through the Ulanzi Connect PC software, twist the dial to adjust brightness and color temperature on K6500, VL-200Bi, VL-120C, AL60, and the full Ulanzi lighting lineup. It also supports Philips Hue smart bulbs, Nanoleaf panels, and Govee lights - adjust your room ambiance for late-night editing sessions without reaching for your phone
  • 1000mAh Battery - 60 Days Standby, Zero Cable Clutter: A full charge gives you approximately 2.5 hours of continuous dial operation and up to 60 days of standby power. Bluetooth BLE 5.0 keeps your desk cable-free with a stable connection up to 33 ft (10m), and you can pair up to 3 devices (PC, Mac, iPad) to switch between editing stations instantly. Type-C charging gets you from 0 to 100% in about 2.5 hours. No drivers, no dongles, no cables snaking across your desk - just pure, uninterrupted creative flow
  • Beginner-Friendly, Pro-Capable: Built for creators who are diving into video editing and color grading for the first time, the D100H strips away complexity without stripping away power. Pre-configured presets for CapCut, DaVinci Resolve, and Adobe Lightroom get you editing within minutes of unboxing. As you grow, Ulanzi Studio's drag-and-drop customization lets you build multi-step macros, assign complex shortcut chains to a single twist, and download community presets and icon packs. It's the editing controller that grows with you - not the one you outgrow in a month

Subtitle selection has an additional compatibility caveat: a subtitle that is present in the input may not be suitable for the chosen output container. When subtitles matter, map them deliberately and confirm the output contains the track you intended.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Check your FFmpeg build and diagnose common failures

The online FFmpeg manual corresponds to the newest revision and is regenerated as development changes. An older package or custom build may not include the same options, filters, formats, or encoders. Check the local executable and its feature listings rather than assuming every documented feature is installed:

ffmpeg -version
ffmpeg -h
ffmpeg -formats
ffmpeg -codecs

For a particular filter, use the help available from your installed FFmpeg, such as ffmpeg -h filter=subtitles. Consult local documentation when it differs from the current online manual.

Symptom Likely cause What to try
A cut starts or ends at an unexpected frame. Stream-copy trimming works with encoded packets and keyframes, not arbitrary decoded frame boundaries. Inspect the output; use a decoded trim filter and re-encode when greater control over the video cut is needed.
The concat demuxer fails or the joined output behaves oddly. Input streams or parameters are not compatible for stream-copy concatenation. Compare input stream details, make the streams compatible, or use the concat filter and re-encode.
A track is missing from the output. Automatic selection did not choose it, an explicit map points to the wrong index, or the container cannot carry the selected stream. Inspect the input stream indexes, correct the -map options, and check output-container compatibility.
FFmpeg reports an unknown filter, encoder, or option. The installed build may not include that feature, or its version may differ from the current online manual. Check ffmpeg -version, local help, codec and format listings, and filter help; choose an available feature or build with the required support.
The subtitle command rejects a format or codec. Subtitle demuxing, encoding, decoding, or muxing support is not available for that combination. Check the installed build’s support and the target container’s capabilities; use a supported subtitle codec/container combination or burn the subtitles into video.
A filter command fails on a filename or text containing punctuation. Filter options, filter-graph syntax, and shell quoting can each interpret special characters. Adjust quoting for your shell and filter syntax; for drawtext workflows, using a textfile can avoid some escaping problems.

Performance, reliability, and output checks

  • Prefer copying when it meets the edit. -c copy avoids re-encoding, but it cannot provide the same processing control as decoded filters and still depends on compatible streams and containers.
  • Budget for re-encoding when filtering. Filters that change video require decoding and encoding the video output. Available encoders and their options depend on the build.
  • Check the file, not just the command exit. Play the result around each cut and join, check audio synchronization, and verify that the expected subtitle and audio tracks are present.
  • Keep a source copy. Re-running an edit from the original makes it easier to correct cut points, mapping, or encoding choices without compounding changes to an already encoded output.

Or skip the browser setup

ScreenshotNeo is a website screenshot API, not a video editor or an FFmpeg replacement. If your workflow also needs screenshots of web pages, one GET request can return an image or PDF. For example, this cURL request captures a page as WebP:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for request options. ScreenshotNeo removes supported cookie-consent banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, failed loads, and cache hits are not billed. Its MCP server provides screenshot tools for AI agents, and the free plan includes 1,000 screenshots a month without a card; paid plans start at $5 for 3,000 shots. Learn about ScreenshotNeo, or sign up free for 1,000 screenshots a month with no card.

Frequently Asked Questions

Does a command that finishes successfully guarantee a frame-accurate cut?

No. Check the output around the cut. Packet-copy trimming and decoded-frame filtering operate differently, and the result depends on the source and command.

Can every subtitle file be added to every video container?

No. Subtitle support depends on the input format, output container, codec, and features in your FFmpeg build.

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.