mirror of
https://github.com/sbrow/nu-ffmpeg.git
synced 2025-12-29 16:23:11 -05:00
docs: Updated README.md.
This commit is contained in:
10
ffprobe
10
ffprobe
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user