| 233 | | * Or you can use the full path to the binary: `/home/yourusername/bin/ffmpeg -i ../input.mp4 ../videos/output.mkv` |
| 234 | | * Or if you simply want to just issue the `ffmpeg` command and have your shell use your compiled binary see the Persistent Environment Variables section below. |
| 235 | | |
| 236 | | === Persistent Environment Variables === |
| 237 | | |
| 238 | | You can tell your shell (assuming you're using Bash) to persistently use your new `ffmpeg` in `~/bin`. The first command will allow you to simply run `man ffmpeg` to get the FFmpeg man pages. The second command will source `~/.profile` which will add `~/bin` to your `$PATH`. In short, the following commands will allow you to simply type `ffmpeg` and `man ffmpeg` in your terminal and they will "just work": |
| | 237 | * Or use the full path to the binary: `/home/yourusername/bin/ffmpeg -i ../input.mp4 ../videos/output.mkv` |
| | 238 | |
| | 239 | If you want the `ffmpeg` command to just work from anywhere: |
| | 240 | |
| | 241 | * Log in and log out |
| | 242 | * Or run `source ~/.profile` |
| | 243 | |
| | 244 | {{{ |
| | 245 | #!div style="border: 1pt dotted; margin: 1em; background-color: #fffff9;" |
| | 246 | '''Note:''' `~/bin` is included in the standard Ubuntu `$PATH` by default (via the `~/.profile` file), ''but only when the `~/bin` directory actually exists''. This is why you must log out then log in or run `source ~/.profile` if you just created `~/bin`. See [https://help.ubuntu.com/community/EnvironmentVariables#Persistent_environment_variables Ubuntu Wiki: Persistent Environment Variables] for more info. |
| | 247 | }}} |
| | 248 | |
| | 249 | === Documentation === |
| | 250 | |
| | 251 | If you want to run `man ffmpeg` to have local access to the documentation: |
| 242 | | . ~/.profile |
| 243 | | }}} |
| 244 | | |
| 245 | | {{{ |
| 246 | | #!div style="border: 1pt dotted; margin: 1em; background-color: #fffff9;" |
| 247 | | '''Note:''' |
| 248 | | * This may reset custom variables in the current shell session. |
| 249 | | * This assumes you are using the default `~/.profile` (and therefore `~/.bashrc`). |
| 250 | | * This assumes you are using Bash shell. |
| 251 | | * Sourcing the default `~/.profile` will also source `~/.bashrc`. |
| 252 | | * You may have to log out and then log in for `man ffmpeg` to work. |
| 253 | | * Don't worry: you can undo any of this as shown in [#RevertingChangesMadebyThisGuide Reverting Changes Made by This Guide]. |
| 254 | | }}} |
| 255 | | |
| 256 | | See [https://help.ubuntu.com/community/EnvironmentVariables#Persistent_environment_variables Ubuntu Wiki: Persistent Environment Variables] for more info. |
| | 255 | }}} |
| | 256 | |
| | 257 | You may then have to log out and then log in for `man ffmpeg` to work. |
| | 258 | |
| | 259 | HTML formatted documentation is available in `~/ffmpeg_build/share/doc/ffmpeg`. |
| | 260 | |
| | 261 | You can also refer to the [https://ffmpeg.org/documentation.html online FFmpeg documentation], but remember that it is regenerated daily and is meant to be used with the most current `ffmpeg` (meaning an old build may not be compatible with the online docs). |