@fredlackey/devutils 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/package.json +1 -1
- package/src/commands/install.js +374 -36
- package/src/installs/adobe-creative-cloud.js +527 -25
- package/src/installs/adobe-creative-cloud.md +605 -0
- package/src/installs/appcleaner.js +303 -26
- package/src/installs/appcleaner.md +699 -0
- package/src/installs/apt-transport-https.js +390 -0
- package/src/installs/apt-transport-https.md +678 -0
- package/src/installs/atomicparsley.js +624 -26
- package/src/installs/atomicparsley.md +795 -0
- package/src/installs/aws-cli.js +779 -26
- package/src/installs/aws-cli.md +727 -0
- package/src/installs/balena-etcher.js +688 -26
- package/src/installs/balena-etcher.md +761 -0
- package/src/installs/bambu-studio.js +912 -26
- package/src/installs/bambu-studio.md +780 -0
- package/src/installs/bash-completion.js +554 -23
- package/src/installs/bash-completion.md +833 -0
- package/src/installs/bash.js +399 -26
- package/src/installs/bash.md +993 -0
- package/src/installs/beyond-compare.js +585 -26
- package/src/installs/beyond-compare.md +813 -0
- package/src/installs/build-essential.js +511 -26
- package/src/installs/build-essential.md +977 -0
- package/src/installs/ca-certificates.js +618 -0
- package/src/installs/ca-certificates.md +937 -0
- package/src/installs/caffeine.js +490 -26
- package/src/installs/caffeine.md +839 -0
- package/src/installs/camtasia.js +577 -25
- package/src/installs/camtasia.md +762 -0
- package/src/installs/chatgpt.js +458 -26
- package/src/installs/chatgpt.md +814 -0
- package/src/installs/chocolatey.js +447 -0
- package/src/installs/chocolatey.md +661 -0
- package/src/installs/chrome-canary.js +472 -26
- package/src/installs/chrome-canary.md +641 -0
- package/src/installs/chromium.js +645 -26
- package/src/installs/chromium.md +838 -0
- package/src/installs/claude-code.js +558 -26
- package/src/installs/claude-code.md +1173 -0
- package/src/installs/curl.js +361 -26
- package/src/installs/curl.md +714 -0
- package/src/installs/cursor.js +561 -26
- package/src/installs/cursor.md +970 -0
- package/src/installs/dbschema.js +674 -26
- package/src/installs/dbschema.md +925 -0
- package/src/installs/dependencies.md +435 -0
- package/src/installs/development-tools.js +600 -0
- package/src/installs/development-tools.md +977 -0
- package/src/installs/docker.js +1010 -25
- package/src/installs/docker.md +1109 -0
- package/src/installs/drawio.js +1001 -26
- package/src/installs/drawio.md +795 -0
- package/src/installs/elmedia-player.js +328 -25
- package/src/installs/elmedia-player.md +556 -0
- package/src/installs/ffmpeg.js +870 -25
- package/src/installs/ffmpeg.md +852 -0
- package/src/installs/file.js +464 -0
- package/src/installs/file.md +987 -0
- package/src/installs/gemini-cli.js +793 -26
- package/src/installs/gemini-cli.md +1153 -0
- package/src/installs/git.js +382 -26
- package/src/installs/git.md +907 -0
- package/src/installs/gitego.js +931 -26
- package/src/installs/gitego.md +1172 -0
- package/src/installs/go.js +913 -26
- package/src/installs/go.md +958 -0
- package/src/installs/google-chrome.js +801 -25
- package/src/installs/google-chrome.md +862 -0
- package/src/installs/gpg.js +412 -73
- package/src/installs/gpg.md +1056 -0
- package/src/installs/homebrew.js +1015 -26
- package/src/installs/homebrew.md +988 -0
- package/src/installs/imageoptim.js +950 -26
- package/src/installs/imageoptim.md +1119 -0
- package/src/installs/installers.json +2297 -0
- package/src/installs/jq.js +382 -26
- package/src/installs/jq.md +809 -0
- package/src/installs/keyboard-maestro.js +701 -26
- package/src/installs/keyboard-maestro.md +825 -0
- package/src/installs/latex.js +771 -26
- package/src/installs/latex.md +1095 -0
- package/src/installs/lftp.js +338 -26
- package/src/installs/lftp.md +907 -0
- package/src/installs/lsb-release.js +346 -0
- package/src/installs/lsb-release.md +814 -0
- package/src/installs/messenger.js +829 -26
- package/src/installs/messenger.md +900 -0
- package/src/installs/microsoft-office.js +550 -26
- package/src/installs/microsoft-office.md +760 -0
- package/src/installs/microsoft-teams.js +782 -25
- package/src/installs/microsoft-teams.md +886 -0
- package/src/installs/node.js +886 -26
- package/src/installs/node.md +1153 -0
- package/src/installs/nordpass.js +698 -26
- package/src/installs/nordpass.md +921 -0
- package/src/installs/nvm.js +977 -26
- package/src/installs/nvm.md +1057 -0
- package/src/installs/openssh.js +734 -64
- package/src/installs/openssh.md +1056 -0
- package/src/installs/pandoc.js +644 -26
- package/src/installs/pandoc.md +1036 -0
- package/src/installs/pinentry.js +492 -26
- package/src/installs/pinentry.md +1142 -0
- package/src/installs/pngyu.js +851 -26
- package/src/installs/pngyu.md +896 -0
- package/src/installs/postman.js +781 -26
- package/src/installs/postman.md +940 -0
- package/src/installs/procps.js +425 -0
- package/src/installs/procps.md +851 -0
- package/src/installs/safari-tech-preview.js +355 -25
- package/src/installs/safari-tech-preview.md +533 -0
- package/src/installs/sfnt2woff.js +640 -26
- package/src/installs/sfnt2woff.md +795 -0
- package/src/installs/shellcheck.js +463 -26
- package/src/installs/shellcheck.md +1005 -0
- package/src/installs/slack.js +722 -25
- package/src/installs/slack.md +865 -0
- package/src/installs/snagit.js +566 -25
- package/src/installs/snagit.md +844 -0
- package/src/installs/software-properties-common.js +372 -0
- package/src/installs/software-properties-common.md +805 -0
- package/src/installs/spotify.js +858 -25
- package/src/installs/spotify.md +901 -0
- package/src/installs/studio-3t.js +803 -26
- package/src/installs/studio-3t.md +918 -0
- package/src/installs/sublime-text.js +780 -25
- package/src/installs/sublime-text.md +914 -0
- package/src/installs/superwhisper.js +687 -25
- package/src/installs/superwhisper.md +630 -0
- package/src/installs/tailscale.js +727 -26
- package/src/installs/tailscale.md +1100 -0
- package/src/installs/tar.js +389 -0
- package/src/installs/tar.md +946 -0
- package/src/installs/termius.js +780 -26
- package/src/installs/termius.md +844 -0
- package/src/installs/terraform.js +761 -26
- package/src/installs/terraform.md +899 -0
- package/src/installs/tidal.js +752 -25
- package/src/installs/tidal.md +864 -0
- package/src/installs/tmux.js +328 -26
- package/src/installs/tmux.md +1030 -0
- package/src/installs/tree.js +393 -26
- package/src/installs/tree.md +833 -0
- package/src/installs/unzip.js +460 -0
- package/src/installs/unzip.md +879 -0
- package/src/installs/vim.js +403 -26
- package/src/installs/vim.md +1040 -0
- package/src/installs/vlc.js +803 -26
- package/src/installs/vlc.md +927 -0
- package/src/installs/vscode.js +825 -26
- package/src/installs/vscode.md +1002 -0
- package/src/installs/wget.js +415 -0
- package/src/installs/wget.md +791 -0
- package/src/installs/whatsapp.js +710 -25
- package/src/installs/whatsapp.md +854 -0
- package/src/installs/winpty.js +352 -0
- package/src/installs/winpty.md +620 -0
- package/src/installs/woff2.js +535 -26
- package/src/installs/woff2.md +977 -0
- package/src/installs/wsl.js +572 -0
- package/src/installs/wsl.md +699 -0
- package/src/installs/xcode-clt.js +520 -0
- package/src/installs/xcode-clt.md +351 -0
- package/src/installs/xcode.js +542 -26
- package/src/installs/xcode.md +573 -0
- package/src/installs/yarn.js +806 -26
- package/src/installs/yarn.md +1074 -0
- package/src/installs/yq.js +636 -26
- package/src/installs/yq.md +944 -0
- package/src/installs/yt-dlp.js +683 -26
- package/src/installs/yt-dlp.md +946 -0
- package/src/installs/yum-utils.js +297 -0
- package/src/installs/yum-utils.md +648 -0
- package/src/installs/zoom.js +740 -25
- package/src/installs/zoom.md +884 -0
- package/src/scripts/README.md +567 -45
- package/src/scripts/STATUS.md +208 -0
- package/src/scripts/afk.js +395 -7
- package/src/scripts/backup-all.js +731 -9
- package/src/scripts/backup-source.js +711 -8
- package/src/scripts/brewd.js +373 -7
- package/src/scripts/brewi.js +505 -9
- package/src/scripts/brewr.js +512 -9
- package/src/scripts/brews.js +462 -9
- package/src/scripts/brewu.js +488 -7
- package/src/scripts/c.js +185 -7
- package/src/scripts/ccurl.js +325 -8
- package/src/scripts/certbot-crontab-init.js +488 -8
- package/src/scripts/certbot-init.js +641 -9
- package/src/scripts/ch.js +339 -7
- package/src/scripts/claude-danger.js +253 -8
- package/src/scripts/clean-dev.js +419 -8
- package/src/scripts/clear-dns-cache.js +525 -7
- package/src/scripts/clone.js +417 -7
- package/src/scripts/code-all.js +420 -7
- package/src/scripts/count-files.js +195 -8
- package/src/scripts/count-folders.js +195 -8
- package/src/scripts/count.js +248 -8
- package/src/scripts/d.js +203 -7
- package/src/scripts/datauri.js +373 -8
- package/src/scripts/delete-files.js +363 -7
- package/src/scripts/docker-clean.js +410 -8
- package/src/scripts/dp.js +426 -7
- package/src/scripts/e.js +375 -9
- package/src/scripts/empty-trash.js +497 -7
- package/src/scripts/evm.js +428 -9
- package/src/scripts/fetch-github-repos.js +441 -10
- package/src/scripts/get-channel.js +329 -8
- package/src/scripts/get-course.js +384 -11
- package/src/scripts/get-dependencies.js +290 -9
- package/src/scripts/get-folder.js +783 -10
- package/src/scripts/get-tunes.js +411 -10
- package/src/scripts/get-video.js +352 -9
- package/src/scripts/git-backup.js +561 -9
- package/src/scripts/git-clone.js +477 -9
- package/src/scripts/git-pup.js +303 -7
- package/src/scripts/git-push.js +380 -8
- package/src/scripts/h.js +607 -9
- package/src/scripts/hide-desktop-icons.js +483 -7
- package/src/scripts/hide-hidden-files.js +522 -7
- package/src/scripts/install-dependencies-from.js +440 -9
- package/src/scripts/ips.js +647 -10
- package/src/scripts/iso.js +354 -8
- package/src/scripts/killni.js +561 -7
- package/src/scripts/ll.js +451 -8
- package/src/scripts/local-ip.js +310 -8
- package/src/scripts/m.js +508 -8
- package/src/scripts/map.js +293 -8
- package/src/scripts/mkd.js +287 -7
- package/src/scripts/ncu-update-all.js +441 -8
- package/src/scripts/nginx-init.js +702 -12
- package/src/scripts/npmi.js +366 -7
- package/src/scripts/o.js +495 -8
- package/src/scripts/org-by-date.js +321 -7
- package/src/scripts/p.js +208 -7
- package/src/scripts/packages.js +313 -8
- package/src/scripts/path.js +209 -7
- package/src/scripts/ports.js +582 -8
- package/src/scripts/q.js +290 -8
- package/src/scripts/refresh-files.js +378 -10
- package/src/scripts/remove-smaller-files.js +500 -8
- package/src/scripts/rename-files-with-date.js +517 -9
- package/src/scripts/resize-image.js +523 -9
- package/src/scripts/rm-safe.js +653 -8
- package/src/scripts/s.js +525 -9
- package/src/scripts/set-git-public.js +349 -7
- package/src/scripts/show-desktop-icons.js +459 -7
- package/src/scripts/show-hidden-files.js +456 -7
- package/src/scripts/tpa.js +265 -8
- package/src/scripts/tpo.js +264 -7
- package/src/scripts/u.js +489 -7
- package/src/scripts/vpush.js +422 -8
- package/src/scripts/y.js +267 -7
- package/src/utils/common/os.js +94 -2
- package/src/utils/ubuntu/apt.js +13 -7
- package/src/utils/windows/choco.js +82 -26
- package/src/utils/windows/winget.js +89 -27
|
@@ -0,0 +1,852 @@
|
|
|
1
|
+
# Installing FFmpeg
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
FFmpeg is a complete, cross-platform solution for recording, converting, and streaming audio and video. It includes libavcodec (the leading audio/video codec library), libavformat (a library for muxing and demuxing into various container formats), and the `ffmpeg` command-line tool for transcoding multimedia files. FFmpeg is the backbone of countless media applications and is essential for any developer working with audio or video processing.
|
|
6
|
+
|
|
7
|
+
Key capabilities include:
|
|
8
|
+
|
|
9
|
+
- **Transcoding**: Convert between virtually any audio/video format
|
|
10
|
+
- **Streaming**: Stream media over various protocols (RTMP, HLS, DASH)
|
|
11
|
+
- **Filtering**: Apply filters for scaling, cropping, overlaying, and effects
|
|
12
|
+
- **Recording**: Capture audio/video from various sources
|
|
13
|
+
- **Analysis**: Inspect media file properties with `ffprobe`
|
|
14
|
+
|
|
15
|
+
## Prerequisites
|
|
16
|
+
|
|
17
|
+
Before installing FFmpeg on any platform, ensure:
|
|
18
|
+
|
|
19
|
+
1. **Internet connectivity** - Required to download packages
|
|
20
|
+
2. **Administrative privileges** - Required for system-wide installation
|
|
21
|
+
3. **Sufficient disk space** - At least 500 MB for full installation with dependencies
|
|
22
|
+
|
|
23
|
+
## Dependencies
|
|
24
|
+
|
|
25
|
+
### macOS (Homebrew)
|
|
26
|
+
- **Required:**
|
|
27
|
+
- Homebrew package manager - Install via `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"` or `dev install homebrew`
|
|
28
|
+
- Xcode Command Line Tools - Install via `xcode-select --install`
|
|
29
|
+
- **Optional:** None
|
|
30
|
+
- **Auto-installed:** FFmpeg dependencies including libavcodec, libavformat, libavutil, codec libraries (x264, x265, VP8/VP9, AV1, AAC, Opus, etc.), and 40+ supporting libraries
|
|
31
|
+
|
|
32
|
+
### Ubuntu (APT/Snap)
|
|
33
|
+
- **Required:**
|
|
34
|
+
- APT package manager (pre-installed on Ubuntu)
|
|
35
|
+
- sudo privileges (user must be in sudoers group)
|
|
36
|
+
- **Optional:**
|
|
37
|
+
- `libavcodec-extra` - Install via `sudo apt-get install libavcodec-extra` for additional codec support
|
|
38
|
+
- **Auto-installed:** FFmpeg dependencies including libavcodec, libavformat, libavutil, codec libraries, and supporting libraries
|
|
39
|
+
|
|
40
|
+
### Raspberry Pi OS (APT/Snap)
|
|
41
|
+
- **Required:**
|
|
42
|
+
- APT package manager (pre-installed on Raspberry Pi OS)
|
|
43
|
+
- sudo privileges (user must be in sudoers group)
|
|
44
|
+
- **Optional:**
|
|
45
|
+
- Hardware acceleration libraries for V4L2 (usually pre-installed on Raspberry Pi OS)
|
|
46
|
+
- **Auto-installed:** FFmpeg dependencies including libavcodec, libavformat, libavutil, codec libraries compiled for ARM architecture, and supporting libraries
|
|
47
|
+
|
|
48
|
+
### Amazon Linux (DNF/YUM)
|
|
49
|
+
- **Required:**
|
|
50
|
+
- `curl` - Install via `sudo dnf install curl` or `sudo yum install curl` (usually pre-installed)
|
|
51
|
+
- `tar` - Install via `sudo dnf install tar` or `sudo yum install tar` (usually pre-installed)
|
|
52
|
+
- `sudo` privileges
|
|
53
|
+
- `/usr/local/bin` in PATH (add via `echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc` if missing)
|
|
54
|
+
- **Optional:** None
|
|
55
|
+
- **Auto-installed:** None (static build is self-contained with all codecs and libraries embedded)
|
|
56
|
+
|
|
57
|
+
### Windows (Chocolatey/winget)
|
|
58
|
+
- **Required:**
|
|
59
|
+
- Chocolatey package manager - Install via PowerShell as Administrator: `Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))`
|
|
60
|
+
- Administrator privileges (PowerShell or Command Prompt must be run as Administrator)
|
|
61
|
+
- **Optional:**
|
|
62
|
+
- `ffmpeg-full` package - Install via `choco install ffmpeg-full -y` for additional codecs beyond the essentials build
|
|
63
|
+
- **Auto-installed:** FFmpeg essentials build dependencies including codec libraries (x264, x265, VP8/VP9, Opus, AAC)
|
|
64
|
+
|
|
65
|
+
### Git Bash (Manual/Portable)
|
|
66
|
+
- **Required:**
|
|
67
|
+
- Git for Windows (provides Git Bash environment) - Download from https://git-scm.com/download/win
|
|
68
|
+
- `curl` - Pre-installed with Git for Windows
|
|
69
|
+
- `unzip` - Pre-installed with Git for Windows
|
|
70
|
+
- `~/bin` in PATH (automatically added by installer script if missing)
|
|
71
|
+
- **Optional:** None
|
|
72
|
+
- **Auto-installed:** None (static build is self-contained with all codecs and libraries embedded)
|
|
73
|
+
|
|
74
|
+
## Platform-Specific Installation
|
|
75
|
+
|
|
76
|
+
### macOS (Homebrew)
|
|
77
|
+
|
|
78
|
+
#### Prerequisites
|
|
79
|
+
|
|
80
|
+
- macOS 12 (Monterey) or later
|
|
81
|
+
- Homebrew package manager installed
|
|
82
|
+
- Xcode Command Line Tools installed
|
|
83
|
+
|
|
84
|
+
If Homebrew is not installed, install it first:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
If Xcode Command Line Tools are not installed:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
xcode-select --install
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
#### Installation Steps
|
|
97
|
+
|
|
98
|
+
Run the following command to install FFmpeg:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
brew install --quiet ffmpeg
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
The `--quiet` flag suppresses non-essential output for cleaner automation. Homebrew installs FFmpeg along with its 40+ dependencies including codecs for x264, x265, VP8/VP9, AV1, and various audio formats.
|
|
105
|
+
|
|
106
|
+
#### Verification
|
|
107
|
+
|
|
108
|
+
Confirm the installation succeeded:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
ffmpeg -version
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Expected output (version numbers may vary):
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
ffmpeg version 8.0.1 Copyright (c) 2000-2025 the FFmpeg developers
|
|
118
|
+
built with Apple clang version 16.0.0
|
|
119
|
+
...
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Test basic functionality:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
ffprobe -version
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
#### Troubleshooting
|
|
129
|
+
|
|
130
|
+
**Problem**: `ffmpeg: command not found` after installation
|
|
131
|
+
|
|
132
|
+
**Solution**: Homebrew may not be in your PATH. Add it to your shell profile:
|
|
133
|
+
|
|
134
|
+
For Apple Silicon Macs (M1/M2/M3):
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zshrc
|
|
138
|
+
source ~/.zshrc
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
For Intel Macs:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
echo 'eval "$(/usr/local/bin/brew shellenv)"' >> ~/.zshrc
|
|
145
|
+
source ~/.zshrc
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
**Problem**: Installation fails with permission errors
|
|
149
|
+
|
|
150
|
+
**Solution**: Fix Homebrew permissions:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
sudo chown -R $(whoami) $(brew --prefix)/*
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
**Problem**: Outdated version installed
|
|
157
|
+
|
|
158
|
+
**Solution**: Update Homebrew and upgrade FFmpeg:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
brew update && brew upgrade ffmpeg
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
### Ubuntu/Debian (APT)
|
|
167
|
+
|
|
168
|
+
#### Prerequisites
|
|
169
|
+
|
|
170
|
+
- Ubuntu 20.04 LTS or later, or Debian 11 (Bullseye) or later
|
|
171
|
+
- sudo privileges
|
|
172
|
+
- At least 500 MB free disk space
|
|
173
|
+
|
|
174
|
+
#### Installation Steps
|
|
175
|
+
|
|
176
|
+
Run the following commands to update the package index and install FFmpeg:
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
sudo DEBIAN_FRONTEND=noninteractive apt-get update -y
|
|
180
|
+
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y ffmpeg
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
The `DEBIAN_FRONTEND=noninteractive` environment variable and `-y` flag ensure fully unattended installation without prompts.
|
|
184
|
+
|
|
185
|
+
**Note**: The version available in Ubuntu/Debian official repositories may not be the latest. Ubuntu 24.04 LTS includes FFmpeg 6.1.1, while Ubuntu 22.04 LTS includes FFmpeg 4.4.2. For most use cases, the repository version is sufficient.
|
|
186
|
+
|
|
187
|
+
#### Verification
|
|
188
|
+
|
|
189
|
+
Confirm the installation succeeded:
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
ffmpeg -version
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
Expected output (version numbers vary by distribution):
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
ffmpeg version 6.1.1-3ubuntu5 Copyright (c) 2000-2023 the FFmpeg developers
|
|
199
|
+
built with gcc 13 (Ubuntu 13.2.0-23ubuntu4)
|
|
200
|
+
...
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Test that all tools are available:
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
ffprobe -version
|
|
207
|
+
ffplay -version
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
#### Troubleshooting
|
|
211
|
+
|
|
212
|
+
**Problem**: `E: Unable to locate package ffmpeg`
|
|
213
|
+
|
|
214
|
+
**Solution**: Update the package index:
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
sudo DEBIAN_FRONTEND=noninteractive apt-get update -y
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
**Problem**: Need a newer version than available in repositories
|
|
221
|
+
|
|
222
|
+
**Solution**: Use the Ubuntu Handbook PPA for FFmpeg 7 or 8:
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
sudo DEBIAN_FRONTEND=noninteractive add-apt-repository -y ppa:ubuntuhandbook1/ffmpeg7
|
|
226
|
+
sudo DEBIAN_FRONTEND=noninteractive apt-get update -y
|
|
227
|
+
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y ffmpeg
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
**Problem**: Missing codecs or limited format support
|
|
231
|
+
|
|
232
|
+
**Solution**: Install additional codec libraries:
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y libavcodec-extra
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
### Raspberry Pi OS (APT)
|
|
241
|
+
|
|
242
|
+
#### Prerequisites
|
|
243
|
+
|
|
244
|
+
- Raspberry Pi OS (Bookworm or Bullseye), 32-bit or 64-bit
|
|
245
|
+
- Raspberry Pi 3 or later (earlier models have limited performance for video processing)
|
|
246
|
+
- sudo privileges
|
|
247
|
+
- At least 500 MB free disk space
|
|
248
|
+
|
|
249
|
+
#### Installation Steps
|
|
250
|
+
|
|
251
|
+
Run the following commands to update the package index and install FFmpeg:
|
|
252
|
+
|
|
253
|
+
```bash
|
|
254
|
+
sudo DEBIAN_FRONTEND=noninteractive apt-get update -y
|
|
255
|
+
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y ffmpeg
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
**Note on ARM Architecture**: Raspberry Pi OS is based on Debian, and FFmpeg in the repositories is compiled for ARM. Raspberry Pi OS Bookworm includes FFmpeg 5.1.6. Hardware acceleration features may vary depending on your Raspberry Pi model.
|
|
259
|
+
|
|
260
|
+
#### Verification
|
|
261
|
+
|
|
262
|
+
Confirm the installation succeeded:
|
|
263
|
+
|
|
264
|
+
```bash
|
|
265
|
+
ffmpeg -version
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
Expected output (version numbers may vary):
|
|
269
|
+
|
|
270
|
+
```
|
|
271
|
+
ffmpeg version 5.1.6-0+deb12u1+rpt1 Copyright (c) 2000-2024 the FFmpeg developers
|
|
272
|
+
built with gcc 12 (Debian 12.2.0-14)
|
|
273
|
+
...
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
Check available hardware acceleration:
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
ffmpeg -hwaccels
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
On Raspberry Pi 4, you should see `drm` and possibly `v4l2m2m` listed.
|
|
283
|
+
|
|
284
|
+
#### Troubleshooting
|
|
285
|
+
|
|
286
|
+
**Problem**: Very slow video encoding/decoding
|
|
287
|
+
|
|
288
|
+
**Solution**: Raspberry Pi has limited CPU power. Use hardware acceleration where possible:
|
|
289
|
+
|
|
290
|
+
```bash
|
|
291
|
+
# Example: Use V4L2 hardware encoder for H.264
|
|
292
|
+
ffmpeg -i input.mp4 -c:v h264_v4l2m2m output.mp4
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
**Problem**: Out of memory during transcoding
|
|
296
|
+
|
|
297
|
+
**Solution**: Reduce processing requirements or add swap space:
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
sudo fallocate -l 2G /swapfile
|
|
301
|
+
sudo chmod 600 /swapfile
|
|
302
|
+
sudo mkswap /swapfile
|
|
303
|
+
sudo swapon /swapfile
|
|
304
|
+
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
**Problem**: Need newer version than available in repositories
|
|
308
|
+
|
|
309
|
+
**Solution**: Raspberry Pi OS tracks Debian stable releases. For newer FFmpeg versions, compile from source or use static builds (see Git Bash section for static build instructions, which also work on Linux).
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
313
|
+
### Amazon Linux (DNF/YUM)
|
|
314
|
+
|
|
315
|
+
#### Prerequisites
|
|
316
|
+
|
|
317
|
+
- Amazon Linux 2023 (AL2023) or Amazon Linux 2 (AL2)
|
|
318
|
+
- sudo privileges
|
|
319
|
+
- At least 500 MB free disk space
|
|
320
|
+
|
|
321
|
+
**Important**: FFmpeg is not available in the standard Amazon Linux repositories. This guide uses static pre-built binaries from BtbN, which is the recommended approach for Amazon Linux.
|
|
322
|
+
|
|
323
|
+
#### Installation Steps
|
|
324
|
+
|
|
325
|
+
**Step 1: Determine your architecture**
|
|
326
|
+
|
|
327
|
+
```bash
|
|
328
|
+
ARCH=$(uname -m)
|
|
329
|
+
echo "Architecture: $ARCH"
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
**Step 2: Download and install FFmpeg static build**
|
|
333
|
+
|
|
334
|
+
For x86_64 (Intel/AMD) instances:
|
|
335
|
+
|
|
336
|
+
```bash
|
|
337
|
+
cd /tmp
|
|
338
|
+
curl -L -o ffmpeg.tar.xz https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-linux64-gpl.tar.xz
|
|
339
|
+
sudo tar -xf ffmpeg.tar.xz -C /opt/
|
|
340
|
+
sudo ln -sf /opt/ffmpeg-master-latest-linux64-gpl/bin/ffmpeg /usr/local/bin/ffmpeg
|
|
341
|
+
sudo ln -sf /opt/ffmpeg-master-latest-linux64-gpl/bin/ffprobe /usr/local/bin/ffprobe
|
|
342
|
+
rm ffmpeg.tar.xz
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
For ARM64 (Graviton) instances:
|
|
346
|
+
|
|
347
|
+
```bash
|
|
348
|
+
cd /tmp
|
|
349
|
+
curl -L -o ffmpeg.tar.xz https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-linuxarm64-gpl.tar.xz
|
|
350
|
+
sudo tar -xf ffmpeg.tar.xz -C /opt/
|
|
351
|
+
sudo ln -sf /opt/ffmpeg-master-latest-linuxarm64-gpl/bin/ffmpeg /usr/local/bin/ffmpeg
|
|
352
|
+
sudo ln -sf /opt/ffmpeg-master-latest-linuxarm64-gpl/bin/ffprobe /usr/local/bin/ffprobe
|
|
353
|
+
rm ffmpeg.tar.xz
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
**Note**: These static builds include all common codecs and do not require additional dependencies. The builds are updated daily from FFmpeg master branch.
|
|
357
|
+
|
|
358
|
+
#### Verification
|
|
359
|
+
|
|
360
|
+
Confirm the installation succeeded:
|
|
361
|
+
|
|
362
|
+
```bash
|
|
363
|
+
ffmpeg -version
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
Expected output (version numbers may vary):
|
|
367
|
+
|
|
368
|
+
```
|
|
369
|
+
ffmpeg version N-XXXXX-gXXXXXXXXXX Copyright (c) 2000-2025 the FFmpeg developers
|
|
370
|
+
built with gcc 13.2.0 (GCC)
|
|
371
|
+
...
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
Test that ffprobe is also available:
|
|
375
|
+
|
|
376
|
+
```bash
|
|
377
|
+
ffprobe -version
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
#### Troubleshooting
|
|
381
|
+
|
|
382
|
+
**Problem**: `ffmpeg: command not found` after installation
|
|
383
|
+
|
|
384
|
+
**Solution**: Verify the symlinks exist and `/usr/local/bin` is in PATH:
|
|
385
|
+
|
|
386
|
+
```bash
|
|
387
|
+
ls -la /usr/local/bin/ffmpeg
|
|
388
|
+
echo $PATH | grep -q '/usr/local/bin' && echo "PATH OK" || echo "PATH missing /usr/local/bin"
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
If PATH is missing `/usr/local/bin`, add it:
|
|
392
|
+
|
|
393
|
+
```bash
|
|
394
|
+
echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bashrc
|
|
395
|
+
source ~/.bashrc
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
**Problem**: Permission denied when extracting
|
|
399
|
+
|
|
400
|
+
**Solution**: Ensure you have sudo privileges and the target directory exists:
|
|
401
|
+
|
|
402
|
+
```bash
|
|
403
|
+
sudo mkdir -p /opt
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
**Problem**: Want to use a specific FFmpeg version instead of latest
|
|
407
|
+
|
|
408
|
+
**Solution**: Replace `latest` in the URL with a specific release tag. Check available releases at https://github.com/BtbN/FFmpeg-Builds/releases
|
|
409
|
+
|
|
410
|
+
---
|
|
411
|
+
|
|
412
|
+
### Windows (Chocolatey)
|
|
413
|
+
|
|
414
|
+
#### Prerequisites
|
|
415
|
+
|
|
416
|
+
- Windows 10 or later (64-bit)
|
|
417
|
+
- Administrator PowerShell or Command Prompt
|
|
418
|
+
- Chocolatey package manager installed
|
|
419
|
+
|
|
420
|
+
If Chocolatey is not installed, install it first by running this command in an Administrator PowerShell:
|
|
421
|
+
|
|
422
|
+
```powershell
|
|
423
|
+
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
#### Installation Steps
|
|
427
|
+
|
|
428
|
+
Run the following command in an Administrator PowerShell or Command Prompt:
|
|
429
|
+
|
|
430
|
+
```powershell
|
|
431
|
+
choco install ffmpeg -y
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
The `-y` flag automatically confirms all prompts, enabling fully non-interactive installation.
|
|
435
|
+
|
|
436
|
+
Chocolatey installs the "essentials" build which includes commonly-used codecs (x264, x265, VP8/VP9, Opus, AAC). The essentials build is compatible with Windows 7 and later.
|
|
437
|
+
|
|
438
|
+
#### Verification
|
|
439
|
+
|
|
440
|
+
Open a new PowerShell or Command Prompt window (to refresh PATH), then run:
|
|
441
|
+
|
|
442
|
+
```powershell
|
|
443
|
+
ffmpeg -version
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
Expected output (version numbers may vary):
|
|
447
|
+
|
|
448
|
+
```
|
|
449
|
+
ffmpeg version 8.0.1-essentials_build-www.gyan.dev Copyright (c) 2000-2025 the FFmpeg developers
|
|
450
|
+
built with gcc 14.2.0 (Rev1, Built by MSYS2 project)
|
|
451
|
+
...
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
Test that ffprobe is also available:
|
|
455
|
+
|
|
456
|
+
```powershell
|
|
457
|
+
ffprobe -version
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
#### Troubleshooting
|
|
461
|
+
|
|
462
|
+
**Problem**: `ffmpeg: The term 'ffmpeg' is not recognized`
|
|
463
|
+
|
|
464
|
+
**Solution**: Open a new terminal window. Chocolatey updates PATH during installation, but existing terminals do not pick up the change. Alternatively, refresh the environment:
|
|
465
|
+
|
|
466
|
+
```powershell
|
|
467
|
+
refreshenv
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
**Problem**: Need the "full" build with additional codecs
|
|
471
|
+
|
|
472
|
+
**Solution**: Install the full build instead:
|
|
473
|
+
|
|
474
|
+
```powershell
|
|
475
|
+
choco uninstall ffmpeg -y
|
|
476
|
+
choco install ffmpeg-full -y
|
|
477
|
+
```
|
|
478
|
+
|
|
479
|
+
Note: The full build requires Windows 10 or later.
|
|
480
|
+
|
|
481
|
+
**Problem**: Antivirus blocks the download
|
|
482
|
+
|
|
483
|
+
**Solution**: Chocolatey downloads from trusted sources (gyan.dev). Temporarily disable antivirus or add an exception for the Chocolatey directory (`C:\ProgramData\chocolatey`).
|
|
484
|
+
|
|
485
|
+
**Problem**: Upgrade fails
|
|
486
|
+
|
|
487
|
+
**Solution**: Uninstall and reinstall:
|
|
488
|
+
|
|
489
|
+
```powershell
|
|
490
|
+
choco uninstall ffmpeg -y
|
|
491
|
+
choco install ffmpeg -y
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
---
|
|
495
|
+
|
|
496
|
+
### WSL (Ubuntu)
|
|
497
|
+
|
|
498
|
+
#### Prerequisites
|
|
499
|
+
|
|
500
|
+
- Windows 10 version 2004 or higher, or Windows 11
|
|
501
|
+
- WSL 2 enabled with Ubuntu distribution installed
|
|
502
|
+
- sudo privileges within WSL
|
|
503
|
+
|
|
504
|
+
**Note**: FFmpeg installed in Windows is not accessible from WSL. You must install FFmpeg separately within your WSL Ubuntu environment.
|
|
505
|
+
|
|
506
|
+
#### Installation Steps
|
|
507
|
+
|
|
508
|
+
Open your WSL Ubuntu terminal and run:
|
|
509
|
+
|
|
510
|
+
```bash
|
|
511
|
+
sudo DEBIAN_FRONTEND=noninteractive apt-get update -y
|
|
512
|
+
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y ffmpeg
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
The installation process is identical to native Ubuntu since WSL Ubuntu uses the same package repositories.
|
|
516
|
+
|
|
517
|
+
#### Verification
|
|
518
|
+
|
|
519
|
+
Confirm the installation succeeded:
|
|
520
|
+
|
|
521
|
+
```bash
|
|
522
|
+
ffmpeg -version
|
|
523
|
+
```
|
|
524
|
+
|
|
525
|
+
Expected output (version numbers vary by Ubuntu version):
|
|
526
|
+
|
|
527
|
+
```
|
|
528
|
+
ffmpeg version 6.1.1-3ubuntu5 Copyright (c) 2000-2023 the FFmpeg developers
|
|
529
|
+
built with gcc 13 (Ubuntu 13.2.0-23ubuntu4)
|
|
530
|
+
...
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
Test basic functionality:
|
|
534
|
+
|
|
535
|
+
```bash
|
|
536
|
+
ffprobe -version
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
#### Troubleshooting
|
|
540
|
+
|
|
541
|
+
**Problem**: Package installation fails with network errors
|
|
542
|
+
|
|
543
|
+
**Solution**: WSL may have DNS issues. Update the resolv.conf:
|
|
544
|
+
|
|
545
|
+
```bash
|
|
546
|
+
echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null
|
|
547
|
+
sudo DEBIAN_FRONTEND=noninteractive apt-get update -y
|
|
548
|
+
```
|
|
549
|
+
|
|
550
|
+
**Problem**: `ffplay` fails with display errors
|
|
551
|
+
|
|
552
|
+
**Solution**: `ffplay` requires a display. In WSL 2, you need WSLg (Windows 11) or an X server (Windows 10). For Windows 10:
|
|
553
|
+
|
|
554
|
+
1. Install VcXsrv or Xming on Windows
|
|
555
|
+
2. Export the display in WSL:
|
|
556
|
+
|
|
557
|
+
```bash
|
|
558
|
+
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
**Problem**: Need to process files on Windows filesystem
|
|
562
|
+
|
|
563
|
+
**Solution**: Access Windows files through `/mnt/c/`:
|
|
564
|
+
|
|
565
|
+
```bash
|
|
566
|
+
# Example: Convert a file from Windows Downloads folder
|
|
567
|
+
ffmpeg -i /mnt/c/Users/YourUsername/Downloads/input.mp4 /mnt/c/Users/YourUsername/Downloads/output.webm
|
|
568
|
+
```
|
|
569
|
+
|
|
570
|
+
---
|
|
571
|
+
|
|
572
|
+
### Git Bash (Manual/Portable)
|
|
573
|
+
|
|
574
|
+
#### Prerequisites
|
|
575
|
+
|
|
576
|
+
- Windows 10 or later (64-bit)
|
|
577
|
+
- Git Bash installed (comes with Git for Windows)
|
|
578
|
+
- Internet access to download static builds
|
|
579
|
+
|
|
580
|
+
**Note**: Git Bash runs in a MinGW environment on Windows. The easiest approach is to use FFmpeg static builds that are portable and require no installation.
|
|
581
|
+
|
|
582
|
+
#### Installation Steps
|
|
583
|
+
|
|
584
|
+
**Step 1: Create a directory for FFmpeg**
|
|
585
|
+
|
|
586
|
+
Open Git Bash and run:
|
|
587
|
+
|
|
588
|
+
```bash
|
|
589
|
+
mkdir -p ~/bin
|
|
590
|
+
```
|
|
591
|
+
|
|
592
|
+
**Step 2: Download the static build**
|
|
593
|
+
|
|
594
|
+
```bash
|
|
595
|
+
cd /tmp
|
|
596
|
+
curl -L -o ffmpeg.zip https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.zip
|
|
597
|
+
```
|
|
598
|
+
|
|
599
|
+
**Step 3: Extract the binaries**
|
|
600
|
+
|
|
601
|
+
```bash
|
|
602
|
+
unzip -q ffmpeg.zip -d /tmp/ffmpeg-extract
|
|
603
|
+
mv /tmp/ffmpeg-extract/ffmpeg-*/bin/*.exe ~/bin/
|
|
604
|
+
rm -rf /tmp/ffmpeg.zip /tmp/ffmpeg-extract
|
|
605
|
+
```
|
|
606
|
+
|
|
607
|
+
**Step 4: Add to PATH**
|
|
608
|
+
|
|
609
|
+
```bash
|
|
610
|
+
echo 'export PATH="$HOME/bin:$PATH"' >> ~/.bashrc
|
|
611
|
+
source ~/.bashrc
|
|
612
|
+
```
|
|
613
|
+
|
|
614
|
+
#### Verification
|
|
615
|
+
|
|
616
|
+
Confirm the installation succeeded:
|
|
617
|
+
|
|
618
|
+
```bash
|
|
619
|
+
ffmpeg -version
|
|
620
|
+
```
|
|
621
|
+
|
|
622
|
+
Expected output (version numbers may vary):
|
|
623
|
+
|
|
624
|
+
```
|
|
625
|
+
ffmpeg version 8.0.1-essentials_build-www.gyan.dev Copyright (c) 2000-2025 the FFmpeg developers
|
|
626
|
+
built with gcc 14.2.0 (Rev1, Built by MSYS2 project)
|
|
627
|
+
...
|
|
628
|
+
```
|
|
629
|
+
|
|
630
|
+
Test that all tools are available:
|
|
631
|
+
|
|
632
|
+
```bash
|
|
633
|
+
ffprobe -version
|
|
634
|
+
ffplay -version
|
|
635
|
+
```
|
|
636
|
+
|
|
637
|
+
#### Troubleshooting
|
|
638
|
+
|
|
639
|
+
**Problem**: `ffmpeg: command not found`
|
|
640
|
+
|
|
641
|
+
**Solution**: Verify PATH includes `~/bin`:
|
|
642
|
+
|
|
643
|
+
```bash
|
|
644
|
+
echo $PATH | grep -q "$HOME/bin" && echo "PATH OK" || echo "Missing from PATH"
|
|
645
|
+
```
|
|
646
|
+
|
|
647
|
+
If missing, add it manually:
|
|
648
|
+
|
|
649
|
+
```bash
|
|
650
|
+
echo 'export PATH="$HOME/bin:$PATH"' >> ~/.bashrc
|
|
651
|
+
source ~/.bashrc
|
|
652
|
+
```
|
|
653
|
+
|
|
654
|
+
**Problem**: Download fails with certificate errors
|
|
655
|
+
|
|
656
|
+
**Solution**: Update ca-certificates or use the `-k` flag (less secure):
|
|
657
|
+
|
|
658
|
+
```bash
|
|
659
|
+
curl -L -k -o ffmpeg.zip https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.zip
|
|
660
|
+
```
|
|
661
|
+
|
|
662
|
+
**Problem**: Permission denied when moving files
|
|
663
|
+
|
|
664
|
+
**Solution**: Ensure you have write access to `~/bin`:
|
|
665
|
+
|
|
666
|
+
```bash
|
|
667
|
+
chmod 755 ~/bin
|
|
668
|
+
chmod +x ~/bin/ffmpeg.exe ~/bin/ffprobe.exe ~/bin/ffplay.exe
|
|
669
|
+
```
|
|
670
|
+
|
|
671
|
+
**Problem**: Path conversion issues with Windows-style paths
|
|
672
|
+
|
|
673
|
+
**Solution**: Use forward slashes and escape spaces, or use the MSYS_NO_PATHCONV environment variable:
|
|
674
|
+
|
|
675
|
+
```bash
|
|
676
|
+
MSYS_NO_PATHCONV=1 ffmpeg -i "C:/Users/Me/My Videos/input.mp4" output.mp4
|
|
677
|
+
```
|
|
678
|
+
|
|
679
|
+
---
|
|
680
|
+
|
|
681
|
+
## Post-Installation Configuration
|
|
682
|
+
|
|
683
|
+
After installing FFmpeg on any platform, consider these optional but useful configurations.
|
|
684
|
+
|
|
685
|
+
### Verifying Codec Support
|
|
686
|
+
|
|
687
|
+
Check which codecs are available in your FFmpeg build:
|
|
688
|
+
|
|
689
|
+
```bash
|
|
690
|
+
# List all available decoders
|
|
691
|
+
ffmpeg -decoders
|
|
692
|
+
|
|
693
|
+
# List all available encoders
|
|
694
|
+
ffmpeg -encoders
|
|
695
|
+
|
|
696
|
+
# Check for specific codec
|
|
697
|
+
ffmpeg -encoders | grep x264
|
|
698
|
+
```
|
|
699
|
+
|
|
700
|
+
### Checking Available Formats
|
|
701
|
+
|
|
702
|
+
Verify FFmpeg can handle common formats:
|
|
703
|
+
|
|
704
|
+
```bash
|
|
705
|
+
# List all supported formats
|
|
706
|
+
ffmpeg -formats
|
|
707
|
+
|
|
708
|
+
# Check for specific format support
|
|
709
|
+
ffmpeg -formats | grep mp4
|
|
710
|
+
```
|
|
711
|
+
|
|
712
|
+
### Testing Hardware Acceleration
|
|
713
|
+
|
|
714
|
+
Check available hardware acceleration methods:
|
|
715
|
+
|
|
716
|
+
```bash
|
|
717
|
+
ffmpeg -hwaccels
|
|
718
|
+
```
|
|
719
|
+
|
|
720
|
+
Common hardware accelerators:
|
|
721
|
+
- **macOS**: `videotoolbox` (Apple Silicon and Intel)
|
|
722
|
+
- **Windows**: `d3d11va`, `dxva2`, `cuda` (NVIDIA)
|
|
723
|
+
- **Linux**: `vaapi`, `vdpau`, `cuda` (NVIDIA)
|
|
724
|
+
- **Raspberry Pi**: `v4l2m2m`, `drm`
|
|
725
|
+
|
|
726
|
+
### Creating a Test Configuration
|
|
727
|
+
|
|
728
|
+
Verify your installation works with a simple test:
|
|
729
|
+
|
|
730
|
+
```bash
|
|
731
|
+
# Create a 5-second test video
|
|
732
|
+
ffmpeg -f lavfi -i testsrc=duration=5:size=640x480:rate=30 -c:v libx264 -y test_output.mp4
|
|
733
|
+
|
|
734
|
+
# Check the output file
|
|
735
|
+
ffprobe test_output.mp4
|
|
736
|
+
|
|
737
|
+
# Clean up
|
|
738
|
+
rm test_output.mp4
|
|
739
|
+
```
|
|
740
|
+
|
|
741
|
+
---
|
|
742
|
+
|
|
743
|
+
## Common Issues
|
|
744
|
+
|
|
745
|
+
### Issue: "Unknown encoder" or "Encoder not found"
|
|
746
|
+
|
|
747
|
+
**Symptoms**: `Unknown encoder 'libx264'` or similar errors
|
|
748
|
+
|
|
749
|
+
**Solutions**:
|
|
750
|
+
|
|
751
|
+
- Verify the encoder is included in your build:
|
|
752
|
+
|
|
753
|
+
```bash
|
|
754
|
+
ffmpeg -encoders | grep x264
|
|
755
|
+
```
|
|
756
|
+
|
|
757
|
+
- If missing, you may have a minimal FFmpeg build. Reinstall with a full build or install codec libraries.
|
|
758
|
+
|
|
759
|
+
### Issue: "No such filter" Errors
|
|
760
|
+
|
|
761
|
+
**Symptoms**: `No such filter: 'scale'` or similar
|
|
762
|
+
|
|
763
|
+
**Solutions**:
|
|
764
|
+
|
|
765
|
+
- Check available filters:
|
|
766
|
+
|
|
767
|
+
```bash
|
|
768
|
+
ffmpeg -filters
|
|
769
|
+
```
|
|
770
|
+
|
|
771
|
+
- Ensure you have a complete FFmpeg installation, not a stripped-down version.
|
|
772
|
+
|
|
773
|
+
### Issue: Very Slow Processing
|
|
774
|
+
|
|
775
|
+
**Symptoms**: Transcoding takes much longer than expected
|
|
776
|
+
|
|
777
|
+
**Solutions**:
|
|
778
|
+
|
|
779
|
+
- Use hardware acceleration if available:
|
|
780
|
+
|
|
781
|
+
```bash
|
|
782
|
+
# macOS (VideoToolbox)
|
|
783
|
+
ffmpeg -i input.mp4 -c:v h264_videotoolbox output.mp4
|
|
784
|
+
|
|
785
|
+
# Windows (NVIDIA NVENC)
|
|
786
|
+
ffmpeg -i input.mp4 -c:v h264_nvenc output.mp4
|
|
787
|
+
|
|
788
|
+
# Linux (VAAPI)
|
|
789
|
+
ffmpeg -vaapi_device /dev/dri/renderD128 -i input.mp4 -c:v h264_vaapi output.mp4
|
|
790
|
+
```
|
|
791
|
+
|
|
792
|
+
- Reduce quality settings for faster processing
|
|
793
|
+
- Use `-threads 0` to auto-detect optimal thread count
|
|
794
|
+
|
|
795
|
+
### Issue: Output File Has No Audio or Video
|
|
796
|
+
|
|
797
|
+
**Symptoms**: Resulting file is missing audio or video stream
|
|
798
|
+
|
|
799
|
+
**Solutions**:
|
|
800
|
+
|
|
801
|
+
- Check input file streams:
|
|
802
|
+
|
|
803
|
+
```bash
|
|
804
|
+
ffprobe -v error -show_streams input.mp4
|
|
805
|
+
```
|
|
806
|
+
|
|
807
|
+
- Explicitly map streams:
|
|
808
|
+
|
|
809
|
+
```bash
|
|
810
|
+
ffmpeg -i input.mp4 -map 0:v -map 0:a -c copy output.mp4
|
|
811
|
+
```
|
|
812
|
+
|
|
813
|
+
### Issue: "Permission denied" Writing Output
|
|
814
|
+
|
|
815
|
+
**Symptoms**: `output.mp4: Permission denied`
|
|
816
|
+
|
|
817
|
+
**Solutions**:
|
|
818
|
+
|
|
819
|
+
- Check write permissions on the output directory
|
|
820
|
+
- On Windows, ensure the file is not open in another application
|
|
821
|
+
- Try writing to a different location:
|
|
822
|
+
|
|
823
|
+
```bash
|
|
824
|
+
ffmpeg -i input.mp4 ~/Desktop/output.mp4
|
|
825
|
+
```
|
|
826
|
+
|
|
827
|
+
### Issue: Aspect Ratio or Resolution Problems
|
|
828
|
+
|
|
829
|
+
**Symptoms**: Output video is stretched, cropped, or wrong size
|
|
830
|
+
|
|
831
|
+
**Solutions**:
|
|
832
|
+
|
|
833
|
+
- Explicitly set output size while maintaining aspect ratio:
|
|
834
|
+
|
|
835
|
+
```bash
|
|
836
|
+
ffmpeg -i input.mp4 -vf "scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2" output.mp4
|
|
837
|
+
```
|
|
838
|
+
|
|
839
|
+
---
|
|
840
|
+
|
|
841
|
+
## References
|
|
842
|
+
|
|
843
|
+
- [FFmpeg Official Website](https://www.ffmpeg.org/)
|
|
844
|
+
- [FFmpeg Official Download Page](https://www.ffmpeg.org/download.html)
|
|
845
|
+
- [FFmpeg Documentation](https://www.ffmpeg.org/documentation.html)
|
|
846
|
+
- [FFmpeg Homebrew Formula](https://formulae.brew.sh/formula/ffmpeg)
|
|
847
|
+
- [FFmpeg Chocolatey Package](https://community.chocolatey.org/packages/ffmpeg)
|
|
848
|
+
- [FFmpeg Windows Builds (gyan.dev)](https://www.gyan.dev/ffmpeg/builds/)
|
|
849
|
+
- [FFmpeg Static Builds (BtbN GitHub)](https://github.com/BtbN/FFmpeg-Builds)
|
|
850
|
+
- [Ubuntu Packages - FFmpeg](https://packages.ubuntu.com/ffmpeg)
|
|
851
|
+
- [FFmpeg Wiki - Compilation Guides](https://trac.ffmpeg.org/wiki/CompilationGuide)
|
|
852
|
+
- [FFmpeg Hardware Acceleration](https://trac.ffmpeg.org/wiki/HWAccelIntro)
|