Is '-c' just shortened alias for '-codec'?

Abstract: Clarifies that -c is a direct alias for -codec in FFmpeg, explaining stream specifiers and the copy option to prevent encoding errors.

Created: 2026-09-05 by
Yes, the -c option is functionally identical to -codec in FFmpeg. It serves as a direct shorthand for specifying the codec used for encoding or decoding audio and video streams. Both flags accept the same arguments, including specific codec names like aac or libx264, stream selectors like v:0, and special values such as copy.

Understanding the Syntax

The primary difference between -c and -codec is purely syntactic length, not functionality. FFmpeg treats them as interchangeable aliases within its command-line parser. When you use -c, you are invoking the exact same internal logic as -codec. This consistency extends to how you specify which stream to affect. You can target all streams, a specific type, or a specific index using the standard stream specifier syntax. For example, if you want to change the video codec for the first video stream in an input file, you might use:
ffmpeg -i input.mp4 -c:v libx265 output.mkv
Here, -c:v specifies that the following codec argument applies only to video streams. The :v part is crucial because it prevents ambiguity when dealing with files containing multiple audio or video tracks. Without this specifier, FFmpeg would attempt to apply the setting to all matching streams unless explicitly overridden later in the command.

Stream Specifiers Explained

FFmpeg allows granular control over which streams receive codec changes. The specifiers follow the pattern [stream_type]:[stream_index]. Common types include a for audio, v for video, and s for subtitles. If you omit the index, the setting applies to all streams of that type. For instance, -c:a affects every audio stream in the container. This precision is vital when working with complex files. A single MP4 might contain multiple video tracks for different resolutions or languages. Using -c:v:0 targets only the first video track, leaving others untouched. This level of control ensures that your conversion process remains predictable and efficient.

The 'copy' Value and Stream Copying

One of the most common uses of -c is the value copy. This tells FFmpeg to copy the selected streams without re-encoding them. This is significantly faster than transcoding because it skips the computationally expensive encoding step. Instead, FFmpeg simply repackages the existing data into the new container format.
ffmpeg -i input.mp4 -c copy output.mov
In this example, both audio and video streams are copied directly. However, be cautious with container compatibility. While copy preserves quality, it may result in playback issues if the new container does not support the original codec's features. For example, copying H.264 video into a format that requires specific metadata headers might cause players to reject the file. Always verify that the target container supports the source codecs before using copy.

When to Use Copy vs Transcode

Use copy when you only need to change the container format, such as moving from MKV to MP4, or when extracting streams for archival purposes where quality loss is unacceptable. Use transcoding (specifying a real codec like libx264) when you need to reduce file size, change resolution, adjust bitrate, or ensure compatibility with older devices. The choice between these approaches depends entirely on your end goal.

Common Pitfalls and Best Practices

A frequent mistake is assuming that -c applies globally without considering stream order. If you specify codecs for different streams in the wrong order, FFmpeg might assign them incorrectly. Always group your codec settings logically. For example, place all -c:v options together and all -c:a options together to maintain clarity. Another issue arises when mixing -c with other codec-specific options. Some codecs require additional parameters, such as -crf for H.264 or -b:a for audio bitrate. These must follow the -c flag immediately. Placing them elsewhere in the command can lead to unexpected behavior or errors. Additionally, remember that some codecs have default behaviors that vary by version. Always test your commands on sample files before processing large batches. This helps identify potential issues early, saving time and storage space. For more advanced troubleshooting, such as fixing upside-down video issues, refer to our guide on Fixing Upside Down Video Playback Issue with ffmpeg.

Alternative Approaches

While -c is the standard method, FFmpeg offers alternative ways to handle codecs. You can use -vcodec and -acodec for explicit video and audio separation, though these are largely deprecated in favor of the unified -c syntax. Another approach involves using preset files for complex encoding profiles, which can simplify repetitive tasks. For transparency preservation, such as converting PNG to AVIF, understanding codec limitations is key. Our article on Fixing Transparency Loss When Converting PNG to AVIF with FFmpeg highlights how specific codec choices impact visual fidelity. Similarly, using bitstream filters (-bsf) can modify streams without full re-encoding, offering another layer of control. See How to use ffplay with -bsf? for details on applying filters during playback.

Frequently Asked Questions

Can I use -c and -codec in the same command?

Yes, you can mix them freely since they are identical aliases. FFmpeg processes them identically regardless of which form you choose. This flexibility allows you to write shorter commands by using -c while maintaining readability with -codec where needed.

Does -c affect subtitle streams?

Yes, you can use -c:s to specify subtitle codecs just like video or audio. This is useful when converting subtitles between formats, such as changing from SRT to ASS. Ensure the target codec supports the features required by your subtitle content.

What happens if I don't specify a codec with -c?

If you omit the codec name after -c, FFmpeg defaults to the encoder associated with the output container format. For example, outputting to MP4 might default to H.264 for video. This automatic selection simplifies basic conversions but reduces control over the final output quality.

Is -c slower than -codec?

No, there is no performance difference between the two. They compile to the same internal function calls within FFmpeg. The choice between them is purely a matter of personal preference or coding style.

Can I use -c to disable a stream?

You cannot directly disable a stream using -c, but you can use -an or -vn to remove audio or video entirely. Alternatively, mapping techniques allow you to exclude specific streams from the output. Use -c only when you intend to encode or copy the stream data.

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