| Flag | Usage |
|---|---|
| -af filterGraph | Apply filterGraph to the input audio stream A filterGraph is a process made of several piped filters. One of the available filterGraphs is aformat |
| -f format | Force input or output file format. The format is normally autodetected for input files and guessed from file extension for output files, so this option is not needed in most cases. To list supported file formats (containers) : ffmpeg -formats
|
| -i inputFile | input file. It is possible to have several input files :
ffmpeg -i file1 -i file2
and to refer to individual streams with -map x:y
|
| -map fileId:streamId | -map x:y refers to :
|
| -ss position |
|
| -t duration | Stop writing the output after its duration reaches duration. duration may be a number in seconds, or in hh:mm:ss[.xxx] form.
|
| -threads n | Use n threads for processing. Or auto : ??? (showed the maximum CPU usage when tried ) Or 0 : ??? |
| -y | Overwrite output files without asking (actually auto-answers "yes" to Overwrite (y/n) ? prompt.) |
| Flag | Usage |
|---|---|
| -aspect ratio | Set the video display aspect ratio
|
|
-c codec -codec codec |
Generic specification : -codec[:optional_stream_specifier] codec input|output|stream Select a decoder (when used before an input file) or an encoder (when used before an output file) for one or more streams. codec is the name of a decoder/encoder or the special value copy (output only) to indicate that the stream is not to be re-encoded (often seen as : -c copy).
|
|
-acodec codec -codec:a codec |
Specify the audio codec. -c:a copy means that the input audio will be copied as is, without any transcoding. |
| -b:stream value | Set the bitrate of the (optional parameter) stream stream (a for audio, v for video) to value bits/s (value can use the k suffix) |
| -crf quality | Select the quality for constant quality mode. It goes from 0 (lossless) upwards logarithmically. You'll probably want a value between 19 and 25 in most cases. |
| -deinterlace | deinterlace the video stream |
| -preset type | Configuration preset. This does some automatic settings based on the general type of the image (?). Sets the speed of the encoding, either "slow", "medium", or "fast". Slow should get you smaller file sizes with an obvious tradeoff. |
| -r:stream value | Set the frame rate of the specified video stream stream to value frames/s |
| -s:stream WxH | Declare the size (width*height) of the input stream, OR set frame size to WxH |
|
-vcodec codec -codec:v codec |
Specify the video codec. |
| -vf filter | Apply the filter filter to the input video |
This command returns a failure exit code as ffmpeg expects an "output file" parameter (I found no better solution so far ). For this reason ("failure" exit code + output message sent to stderr rather than stdout), you have to redirect everything to stdout before processing it :
fallocate(2) system call : ext4, btrfs, xfs and ocfs2Filesystem Size Used Avail Use% Mounted on tmpfs 3,1G 164K 3,1G 1% /run/user/1000 -rw------- 1 bob developers 1,0G déc. 19 12:37 /run/user/1000/test_1GiB 1,0G /run/user/1000/test_1GiB actual file size Filesystem Size Used Avail Use% Mounted on tmpfs 3,1G 1,1G 2,1G 33% /run/user/1000
Filesystem Size Used Avail Use% Mounted on tmpfs 3,1G 164K 3,1G 1% /run/user/1000 -rw------- 1 bob developers 1,0G déc. 19 12:45 /run/user/1000/test_1GiB 0 /run/user/1000/test_1GiB actual file size Filesystem Size Used Avail Use% Mounted on tmpfs 3,1G 164K 3,1G 1% /run/user/1000
| Flag | Usage |
|---|---|
|
-l length --length length |
specify the length of the range
|
Filesystem Size Used Avail Use% Mounted on /dev/mapper/vgxubuntu-root 914G 52G 816G 6% / before Filesystem Size Used Avail Use% Mounted on /dev/mapper/vgxubuntu-root 914G 55G 813G 7% / after : +3GB used
ls: cannot access '/tmp/.fKpHFCCUVWyxfSi2': No such file or directory
marked as deleted, even though it's not actually deleted yet because there's a process still using it.
bash 11107 kevin 4r REG 252,1 3221225472 0 48758805 /tmp/.fKpHFCCUVWyxfSi2 (deleted) the process holding $bigFile
grep 15062 kevin 4r REG 252,1 3221225472 0 48758805 /tmp/.fKpHFCCUVWyxfSi2 (deleted) the grep right above
(the terminal closes)
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vgxubuntu-root 914G 52G 816G 6% / back to the "before" usage
| Flag | Usage |
|---|---|
| -u | unmount |
| -z | lazy unmount |
| Flag | Usage |
|---|---|
| (none) | list all mounted filesystems in a tree-like format |
| -n --noheadings | don't print the header line |
| -o list,of,columns --output list,of,columns |
output only columns listed in list,of,columns |
| -t list --types list |
limit the set of printed filesystems to those matching list :
|
| Flag | Usage |
|---|---|
| -w width --witdh=width | use width columns instead of 80 |
a b c d e f g h i j k l m n o p q r s t u v w x y z
selectmode)
replaymode)
| Flag | Usage |
|---|---|
| -e -l -n -l | flags and options for the selectmode (not detailed here so far) |
| -s search=replacement command | This is the replaymode :
Looks like successful fc -s commands are not recorded in the history.
|
.:"="./"'bash: .:script.sh: command not found
(normal output of script.sh)
factor 8 17 42
8: 2 2 2 17: 17 42: 2 3 7
| Flag | Usage |
|---|---|
| (none) |
Simply output the file type :
|
| -i --mime | Output mime type strings rather than the more traditional human readable ones. Thus it may say text/plain; charset=us-ascii rather than ASCII text. |
| Command | Usage |
|---|---|
| ftp host | open an ftp session on the distant server host Use either your personal login/password or anonymous/[Enter] |
| ftp -s:commands.txt | automatically run the commands from commands.txt (works only with Windows FTP) |
| get fileName | download fileName to current local directory |
| mget * | download all the files of the remote directory to the local directory |
| put fileName | upload fileName to current remote directory |
| mput * | upload all the files of the local directory to the current remote directory |
| delete fileName | delete the specified remote file |
| mdelete | delete multiple files |
| prompt | Toggle interactive prompting. Interactive prompting occurs during multiple file transfers to allow the user to selectively retrieve or store files. By default, prompting is turned on. If prompting is turned off, any mget or mput will transfer all files, and any mdelete will delete all files. |
| binary / ascii | toggle binary / ascii file transfer mode :
|
| rename remoteFile1 remoteFile2 | rename the remote file called remoteFile1 into remoteFile2 |
| lcd localDirectoryName | change to local directory localDirectoryName |
| ! mkdir localDirectoryName | create the local directory localDirectoryName |
| open | re-open connection after time-out disconnect (still in ftp prompt: ftp> _ ) |
Use cURL
Without privileges, fuser won't display anything if the corresponding PID is not yours.
| Flag | Usage |
|---|---|
| -a --all | Show all files specified on the command line. By default, only files that are accessed by at least one process are shown. |
| -k -signal myFile | Send signal signal to process(es) accessing myFile. If signal is omitted, SIGKILL is sent. With -i : prompt before killing a process. |
| -m myFile | List processes accessing files that are on the same filesystem than myFile. It also displays Frcem flag to identify the access type. |
| -v | verbose |
| Flag | Usage |
|---|---|
| -b / -k / -m / -g | display amounts in bytes / kilobytes / megabytes / gigabytes |
| -t | display a "total" line |
total used free shared buffers cached Mem: 16085 15884 200 0 347 12940 -/+ buffers/cache: 2596 13489 Swap: 1951 0 1951