docs: Fixed formatting error in table.

This commit is contained in:
Spencer Brower
2024-03-04 09:08:09 -05:00
parent 05415cb273
commit d7aed73263
3 changed files with 42 additions and 38 deletions

View File

@@ -55,8 +55,7 @@ use <path-to-repository>/filters *
| settb | Set the timebase to use for the output frames timestamps. It is mainly useful for testing timebase configuration. | | settb | Set the timebase to use for the output frames timestamps. It is mainly useful for testing timebase configuration. |
| split | | | split | |
| vflip | Flip the input video vertically. | | vflip | Flip the input video vertically. |
| xfade | Apply cross fade from one input video stream to another input video stream. The cross fade is applied for specified duration. | xfade | Apply cross fade from one input video stream to another input video stream. The cross fade is applied for specified duration. Both inputs must be constant frame-rate and have the same resolution, pixel format, frame rate and timebase. |
Both inputs must be constant frame-rate and have the same resolution, pixel format, frame rate and timebase. |
## Examples ## Examples
@@ -64,54 +63,54 @@ Both inputs must be constant frame-rate and have the same resolution, pixel form
```nu ```nu
# Return a table from ffprobe # Return a table from ffprobe
> ffprobe https://sample-videos.com/video321/mp4/720/big_buck_bunny_720p_1mb.mp4 > ffprobe https://sample-videos.com/video321/mp4/720/big_buck_bunny_720p_1mb.mp4
╭───┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬─────╮ ╭───┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬──────────────
# │ streams │ ... # │ streams │ format
├───┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────┤ ├───┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼──────────────
0 ╭───┬────────────┬───────────────────────────────────────────┬─────────┬────────────┬──────────────────┬────────────┬─────╮ ... 0 ╭───┬────────────┬───────────────────────────────────────────┬─────────┬────────────┬──────────────────┬────────────┬───────┬────────┬─────────────┬──────────────┬─────────────────┬────────────┬──────────────┬───── {record 11
# │ codec_name │ codec_long_name │ profile │ codec_type │ codec_tag_string │ codec_tag │ ... │ │ # │ codec_name │ codec_long_name │ profile │ codec_type │ codec_tag_string │ codec_tag │ width │ height │ coded_width │ coded_height │ closed_captions │ film_grain │ has_b_frames │ ... │ │ fields}
├───┼────────────┼───────────────────────────────────────────┼─────────┼────────────┼──────────────────┼────────────┼─────┤ ├───┼────────────┼───────────────────────────────────────────┼─────────┼────────────┼──────────────────┼────────────┼───────┼────────┼─────────────┼──────────────┼─────────────────┼────────────┼──────────────┼─────
0 h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 Main video avc1 0x31637661 ... 0 h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 Main video avc1 0x31637661 1280 720 1280 720 0 0 0 ...
1 aac AAC (Advanced Audio Coding) LC audio mp4a 0x6134706d ... 1 aac AAC (Advanced Audio Coding) LC audio mp4a 0x6134706d ...
╰───┴────────────┴───────────────────────────────────────────┴─────────┴────────────┴──────────────────┴────────────┴─────╯ ╰───┴────────────┴───────────────────────────────────────────┴─────────┴────────────┴──────────────────┴────────────┴───────┴────────┴─────────────┴──────────────┴─────────────────┴────────────┴──────────────┴─────
╰───┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴─────╯ ╰───┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴──────────────
``` ```
```nu ```nu
# Use ffprobe on mutliple files at once # Use ffprobe on mutliple files at once
> ffprobe https://sample-videos.com/video321/mp4/720/big_buck_bunny_720p_1mb.mp4 https://sample-videos.com/video321/mkv/720/big_buck_bunny_720p_1mb.mkv > ffprobe https://sample-videos.com/video321/mp4/720/big_buck_bunny_720p_1mb.mp4 https://sample-videos.com/video321/mkv/720/big_buck_bunny_720p_1mb.mkv
╭───┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬─────╮ ╭───┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬──────────────
# │ streams │ ... # │ streams │ format
├───┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────┤ ├───┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼──────────────
0 ╭───┬────────────┬───────────────────────────────────────────┬─────────┬────────────┬──────────────────┬────────────┬─────╮ ... 0 ╭───┬────────────┬───────────────────────────────────────────┬─────────┬────────────┬──────────────────┬────────────┬───────┬────────┬─────────────┬──────────────┬─────────────────┬────────────┬──────────────┬───── {record 11
# │ codec_name │ codec_long_name │ profile │ codec_type │ codec_tag_string │ codec_tag │ ... │ │ # │ codec_name │ codec_long_name │ profile │ codec_type │ codec_tag_string │ codec_tag │ width │ height │ coded_width │ coded_height │ closed_captions │ film_grain │ has_b_frames │ ... │ │ fields}
├───┼────────────┼───────────────────────────────────────────┼─────────┼────────────┼──────────────────┼────────────┼─────┤ ├───┼────────────┼───────────────────────────────────────────┼─────────┼────────────┼──────────────────┼────────────┼───────┼────────┼─────────────┼──────────────┼─────────────────┼────────────┼──────────────┼─────
0 h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 Main video avc1 0x31637661 ... 0 h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 Main video avc1 0x31637661 1280 720 1280 720 0 0 0 ...
1 aac AAC (Advanced Audio Coding) LC audio mp4a 0x6134706d ... 1 aac AAC (Advanced Audio Coding) LC audio mp4a 0x6134706d ...
╰───┴────────────┴───────────────────────────────────────────┴─────────┴────────────┴──────────────────┴────────────┴─────╯ ╰───┴────────────┴───────────────────────────────────────────┴─────────┴────────────┴──────────────────┴────────────┴───────┴────────┴─────────────┴──────────────┴─────────────────┴────────────┴──────────────┴─────
1 ╭───┬────────────┬─────────────────────────────┬────────────────┬────────────┬──────────────────┬───────────┬───────┬───── ... 1 ╭───┬────────────┬─────────────────────────────┬────────────────┬────────────┬──────────────────┬───────────┬───────┬────────┬─────────────┬──────────────┬─────────────────┬────────────┬──────────────┬─────╮ {record 10
# │ codec_name │ codec_long_name │ profile │ codec_type │ codec_tag_string │ codec_tag │ width │ ... │ │ # │ codec_name │ codec_long_name │ profile │ codec_type │ codec_tag_string │ codec_tag │ width │ height │ coded_width │ coded_height │ closed_captions │ film_grain │ has_b_frames │ ... │ │ fields}
├───┼────────────┼─────────────────────────────┼────────────────┼────────────┼──────────────────┼───────────┼───────┼───── ├───┼────────────┼─────────────────────────────┼────────────────┼────────────┼──────────────────┼───────────┼───────┼────────┼─────────────┼──────────────┼─────────────────┼────────────┼──────────────┼─────┤
0 mpeg4 MPEG-4 part 2 Simple Profile video [0][0][0][0] 0x0000 1280 ... 0 mpeg4 MPEG-4 part 2 Simple Profile video [0][0][0][0] 0x0000 1280 720 1280 720 0 0 0 ...
1 aac AAC (Advanced Audio Coding) LC audio [0][0][0][0] 0x0000 ... 1 aac AAC (Advanced Audio Coding) LC audio [0][0][0][0] 0x0000 ...
╰───┴────────────┴─────────────────────────────┴────────────────┴────────────┴──────────────────┴───────────┴───────┴───── ╰───┴────────────┴─────────────────────────────┴────────────────┴────────────┴──────────────────┴───────────┴───────┴────────┴─────────────┴──────────────┴─────────────────┴────────────┴──────────────┴─────╯
╰───┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴─────╯ ╰───┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴──────────────
``` ```
```nu ```nu
# Extract the video streams from a video # Extract the video streams from a video
> ffprobe https://sample-videos.com/video321/mp4/720/big_buck_bunny_720p_1mb.mp4 | streams video > ffprobe https://sample-videos.com/video321/mp4/720/big_buck_bunny_720p_1mb.mp4 | streams video
╭────┬─────────────┬──────────────────────────────────────────────────────┬─────────────┬───────────────────┬────────────┬────────┬─────╮ ╭────┬────────────┬───────────────────────────────────────────┬───────────────────────────────────────┬────────────┬───────┬────────┬─────────────┬──────────────┬─────────────────┬────────────┬──────────────┬─────────────────────┬─────╮
# │ codec_name │ codec_long_name │ profile │ codec_type │ codec_tag_string codec_tag │ width │ ... │ # │ codec_name │ codec_long_name │ profile │ codec_type │ codec_tag_string codec_tag │ width │ height │ coded_width │ coded_height │ closed_captions │ film_grain │ has_b_frames │ sample_aspect_ratio │ ... │
├────┼─────────────┼──────────────────────────────────────────────────────┼─────────────┼───────────────────┼────────────┼────────┼─────┤ ├────┼────────────┼───────────────────────────────────────────┼───────────────────────────────────────┼────────────┼───────┼────────┼─────────────┼──────────────┼─────────────────┼────────────┼──────────────┼─────────────────────┼─────┤
0 h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 Main video avc1 0x31637661 1280 ... 0 h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 Main video avc1 0x31637661 1280 720 1280 720 0 0 0 1:1 ...
╰────┴─────────────┴──────────────────────────────────────────────────────┴─────────────┴───────────────────┴────────────┴────────┴─────╯ ╰────┴────────────┴───────────────────────────────────────────┴───────────────────────────────────────┴────────────┴───────┴────────┴─────────────┴──────────────┴─────────────────┴────────────┴──────────────┴─────────────────────┴─────╯
# Extract the audio streams from a video # Extract the audio streams from a video
> ffprobe https://sample-videos.com/video321/mp4/720/big_buck_bunny_720p_1mb.mp4 | streams audio > ffprobe https://sample-videos.com/video321/mp4/720/big_buck_bunny_720p_1mb.mp4 | streams audio
╭────┬─────────────┬─────────────────────────────┬─────────┬────────────┬──────────────────┬────────────┬────────────┬─────────────┬─────╮ ╭───────────────┬─────────────────────────────┬─────────┬────────────┬──────────────────┬────────────┬────────────┬─────────────┬──────────┬────────────────┬─────────────────┬─────────────────┬─────┬──────────────┬────────────────┬─────
# │ codec_name │ codec_long_name │ profile │ codec_type │ codec_tag_string │ codec_tag │ sample_fmt │ sample_rate │ ... │ # │ codec_name │ codec_long_name │ profile │ codec_type │ codec_tag_string │ codec_tag │ sample_fmt │ sample_rate │ channels │ channel_layout │ bits_per_sample │ initial_padding │ id │ r_frame_rate │ avg_frame_rate │ ... │
├────┼─────────────┼─────────────────────────────┼─────────┼────────────┼──────────────────┼────────────┼────────────┼─────────────┼─────┤ ├───────────────┼─────────────────────────────┼─────────┼────────────┼──────────────────┼────────────┼────────────┼─────────────┼──────────┼────────────────┼─────────────────┼─────────────────┼─────┼──────────────┼────────────────┼─────
1 aac AAC (Advanced Audio Coding) LC audio mp4a 0x6134706d fltp 48000 ... 1 aac AAC (Advanced Audio Coding) LC audio mp4a 0x6134706d fltp 48000 6 5.1 0 0 0x2 0/0 0/0 ...
╰────┴─────────────┴─────────────────────────────┴─────────┴────────────┴──────────────────┴────────────┴────────────┴─────────────┴─────╯ ╰───────────────┴─────────────────────────────┴─────────┴────────────┴──────────────────┴────────────┴────────────┴─────────────┴──────────┴────────────────┴─────────────────┴─────────────────┴─────┴──────────────┴────────────────┴─────
``` ```
```nu ```nu

View File

@@ -10,6 +10,8 @@
pkgs = nixpkgs.legacyPackages.x86_64-linux; pkgs = nixpkgs.legacyPackages.x86_64-linux;
in in
{ {
formatter.x86_64-linux = pkgs.nixpkgs-fmt;
devShells.x86_64-linux.default = pkgs.mkShell { devShells.x86_64-linux.default = pkgs.mkShell {
packages = with pkgs; [ packages = with pkgs; [
ffmpeg ffmpeg

View File

@@ -8,6 +8,9 @@ def main [] {
help commands help commands
| where command_type == "custom" and name !~ "p(rompt|wd)|^main$" | where command_type == "custom" and name !~ "p(rompt|wd)|^main$"
| select name usage | select name usage
| update usage {
str replace -a "\n" " "
}
| to md -p | to md -p
) )
} }