docs: Added examples to README.md.

This commit is contained in:
Spencer Brower
2024-03-03 00:19:17 -05:00
parent 132e0c0bc8
commit fe06cbea26
6 changed files with 52 additions and 3 deletions

View File

@@ -6,6 +6,22 @@ Utility commands for working with ffmpeg in nushell.
## Capabilities
- Return tables from `ffprobe`
```nu
> ffprobe https://sample-videos.com/video321/mp4/720/big_buck_bunny_720p_1mb.mp4
╭────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬─────╮
# │ streams │ ... │
├────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼─────┤
0 ╭───┬────────────┬───────────────────────────────────────────┬─────────┬────────────┬──────────────────┬────────────┬─────╮ ...
# │ codec_name │ codec_long_name │ profile │ codec_type │ codec_tag_string │ codec_tag │ ... │ │ │
├───┼────────────┼───────────────────────────────────────────┼─────────┼────────────┼──────────────────┼────────────┼─────┤
0 h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 Main video avc1 0x31637661 ...
1 aac AAC (Advanced Audio Coding) LC audio mp4a 0x6134706d ...
╰───┴────────────┴───────────────────────────────────────────┴─────────┴────────────┴──────────────────┴────────────┴─────╯
╰────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴─────╯
```
- `ffprobe` multiple files at once
- Use `streams`, `streams video`, and `streams audio` to filter `ffprobe` output
- get the `dimensions` of a video stream as a record