docs: Updated README.md.

This commit is contained in:
Spencer Brower
2024-01-09 11:00:48 -05:00
parent 555073c428
commit e854b53bcf
4 changed files with 38 additions and 16 deletions

10
ffprobe
View File

@@ -4,14 +4,14 @@
# Multimedia stream analyzer.
export def main [
...input_files: path
] {
]: nothing -> table {
$input_files | each {
^ffprobe -v quiet -print_format json -show_format -show_streams $in | from json
}
}
# Retrieve all the streams from a list of ffprobe outputs
export def streams [] {
export def streams []: table<streams: table, format: record> -> table {
let streams = ($in | get streams);
match ($streams | describe) {
@@ -21,16 +21,16 @@ export def streams [] {
}
# Retrieve all the video streams from a list of ffprobe outputs
export def "streams video" [] {
export def "streams video" []: table<streams: table, format: record> -> table {
$in | streams | where codec_type == "video"
}
# Retrieve all the audio streams from a list of ffprobe outputs
export def "streams audio" [] {
export def "streams audio" []: table<streams: table, format: record> -> table {
$in | streams | where codec_type == "audio"
}
# Get the dimensions of a video stream
export def "dimensions" [] {
export def "dimensions" []: table<streams: table, format: record> -> record<width: int, height: int> {
$in | select width height
}