From 477698414964f1ca12c461fbe42f3e065b9798b9 Mon Sep 17 00:00:00 2001 From: Spencer Brower Date: Thu, 15 Jan 2026 13:10:11 -0500 Subject: [PATCH] feat(ffprobe): Added `streams subtitle` command. --- README.md | 17 +++++++++-------- ffprobe | 5 +++++ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 9726d94..ca37793 100644 --- a/README.md +++ b/README.md @@ -32,14 +32,15 @@ use /filters * ### Commands -| name | description | -| --------------------- | ---------------------------------------------------------------- | -| ffprobe banner | Print a banner for Nushell with information about the project | -| ffprobe | Run ffprobe on a list of files and return the output as a table. | -| ffprobe dimensions | Get the dimensions of a video stream | -| ffprobe streams | Retrieve all the streams from a list of ffprobe outputs | -| ffprobe streams audio | Retrieve all the audio streams from a list of ffprobe outputs | -| ffprobe streams video | Retrieve all the video streams from a list of ffprobe outputs | +| name | description | +| --------------------- | ---------------------------------------------------------------- | +| ffprobe banner | Print a banner for Nushell with information about the project | +| ffprobe | Run ffprobe on a list of files and return the output as a table. | +| ffprobe dimensions | Get the dimensions of a video stream | +| ffprobe streams | Retrieve all the streams from a list of ffprobe outputs | +| ffprobe streams audio | Retrieve all the audio streams from a list of ffprobe outputs | +| ffprobe streams subtitle | Retrieve all the subtitle streams from a list of ffprobe outputs | +| ffprobe streams video | Retrieve all the video streams from a list of ffprobe outputs | ### Examples diff --git a/ffprobe b/ffprobe index 93e97cc..a09fe05 100755 --- a/ffprobe +++ b/ffprobe @@ -29,6 +29,11 @@ export def "streams video" []: table -> table { export def "streams audio" []: table -> table { $in | streams | where codec_type == "audio" } + +# Retrieve all the subtitle streams from a list of ffprobe outputs +export def "streams subtitle" []: table -> table { + $in | streams | where codec_type == "subtitle" +} # Get the dimensions of a video stream export def "dimensions" []: record -> record {