mirror of
https://github.com/sbrow/nu-ffmpeg.git
synced 2025-12-29 16:23:11 -05:00
79 lines
1.4 KiB
Markdown
79 lines
1.4 KiB
Markdown
{{ if false }}
|
|
<!--
|
|
vim: filetype=markdown :
|
|
->
|
|
|
|
{{ end -}}
|
|
|
|
# nu-ffmpeg
|
|
|
|
Utility commands for working with ffmpeg in nushell.
|
|
|
|
## Capabilities ([see examples](#examples))
|
|
|
|
- Return tables from `ffprobe`
|
|
- `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
|
|
|
|
- Apply complex filters to a video using standard shell pipes `|` rather than filtergraph syntax.
|
|
- Conditionally apply filters to a video based on the inputs
|
|
- Tab-completion for filter options. i.e. `fps --round<tab>` will yield `zero inf down up near`
|
|
|
|
## Setup
|
|
|
|
The `ffmpeg` and `ffprobe` commands are required to be installed and available
|
|
in your path; they are not installed for you.
|
|
|
|
Currently only nushell version {{ nu_version }} is supported.
|
|
|
|
After that, clone this repository and add the following code to your scripts,
|
|
or to your `config.nu` file:
|
|
|
|
```nu
|
|
use <path-to-repository>/ffprobe
|
|
use <path-to-repository>/filters *
|
|
```
|
|
|
|
## FFProbe
|
|
|
|
### Commands
|
|
|
|
{{ ffprobe }}
|
|
|
|
### Examples
|
|
|
|
|
|
```nu
|
|
{{ example "ffprobe" -}}
|
|
```
|
|
|
|
```nu
|
|
{{ example "ffprobe-multiple-files" -}}
|
|
```
|
|
|
|
```nu
|
|
{{ example "streams-video" -}}
|
|
{{ example "streams-audio" -}}
|
|
```
|
|
|
|
```nu
|
|
{{ example "dimensions" -}}
|
|
```
|
|
|
|
## FFMpeg
|
|
|
|
### Supported Filters
|
|
|
|
{{ filters }}
|
|
|
|
### Examples
|
|
|
|
```nu
|
|
{{ example "convert-to-30-fps" -}}
|
|
```
|
|
|
|
```nu
|
|
{{ example "convert-to-30-fps-with-filterchain" -}}
|
|
```
|