mirror of
https://github.com/sbrow/nu-ffmpeg.git
synced 2025-12-29 16:23:11 -05:00
docs: Added *more* examples to README.md.
This commit is contained in:
10
examples/dimensions.nu
Executable file
10
examples/dimensions.nu
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env nu
|
||||
|
||||
use ../ffprobe ["main" "dimensions" "streams video"];
|
||||
|
||||
# Extract the dimensions of a video stream
|
||||
def main [] {
|
||||
echo "> ffprobe https://sample-videos.com/video321/mp4/720/big_buck_bunny_720p_1mb.mp4 | streams video | first | dimensions"
|
||||
ffprobe $'($env.FILE_PWD)/videos/sample-videos.com/video321/mp4/720/big_buck_bunny_720p_1mb.mp4'
|
||||
| streams video | first | dimensions
|
||||
}
|
||||
13
examples/ffprobe-multiple-files.nu
Executable file
13
examples/ffprobe-multiple-files.nu
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env nu
|
||||
|
||||
use ../ffprobe;
|
||||
|
||||
# Use ffprobe on mutliple files at once
|
||||
def main [] {
|
||||
echo "> ffprobe https://sample-videos.com/video321/mp4/720/big_buck_bunny_720p_1mb.mp4 https://sample-videos.com/video321/mkv/720/big_buck_bunny_720p_1mb.mkv"
|
||||
(
|
||||
ffprobe
|
||||
$'($env.FILE_PWD)/videos/sample-videos.com/video321/mp4/720/big_buck_bunny_720p_1mb.mp4'
|
||||
$'($env.FILE_PWD)/videos/sample-videos.com/video321/mkv/720/big_buck_bunny_720p_1mb.mkv'
|
||||
)
|
||||
}
|
||||
@@ -2,5 +2,8 @@
|
||||
|
||||
use ../ffprobe;
|
||||
|
||||
echo "> ffprobe https://sample-videos.com/video321/mp4/720/big_buck_bunny_720p_1mb.mp4"
|
||||
ffprobe $'($env.FILE_PWD)/videos/sample-videos.com/video321/mp4/720/big_buck_bunny_720p_1mb.mp4'
|
||||
# Return a table from ffprobe
|
||||
def main [] {
|
||||
echo "> ffprobe https://sample-videos.com/video321/mp4/720/big_buck_bunny_720p_1mb.mp4"
|
||||
ffprobe $'($env.FILE_PWD)/videos/sample-videos.com/video321/mp4/720/big_buck_bunny_720p_1mb.mp4'
|
||||
}
|
||||
|
||||
10
examples/streams-audio.nu
Executable file
10
examples/streams-audio.nu
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env nu
|
||||
|
||||
use ../ffprobe ["main" "streams audio"];
|
||||
|
||||
# Extract the audio streams from a video
|
||||
def main [] {
|
||||
echo "> ffprobe https://sample-videos.com/video321/mp4/720/big_buck_bunny_720p_1mb.mp4 | streams audio"
|
||||
ffprobe $'($env.FILE_PWD)/videos/sample-videos.com/video321/mp4/720/big_buck_bunny_720p_1mb.mp4'
|
||||
| streams audio
|
||||
}
|
||||
10
examples/streams-video.nu
Executable file
10
examples/streams-video.nu
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env nu
|
||||
|
||||
use ../ffprobe ["main" "streams video"];
|
||||
|
||||
# Extract the video streams from a video
|
||||
def main [] {
|
||||
echo "> ffprobe https://sample-videos.com/video321/mp4/720/big_buck_bunny_720p_1mb.mp4 | streams video"
|
||||
ffprobe $'($env.FILE_PWD)/videos/sample-videos.com/video321/mp4/720/big_buck_bunny_720p_1mb.mp4'
|
||||
| streams video
|
||||
}
|
||||
Reference in New Issue
Block a user