alpha
Login
or
Join now
xcc.es
/
scripts
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
[READ-ONLY] Mirror of https://github.com/mrgnw/scripts.
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
probe - summarize ffprobe as json
author
Morgan
date
2 years ago
(Dec 20, 2023, 3:41 AM -0700)
commit
bf83baa0
bf83baa0d42bfaccb620e06a7f93c5eda67c88c0
parent
8d2f0da3
8d2f0da3d8acfb020b279952d55c11ee397abcd5
+13
1 changed file
Expand all
Collapse all
Unified
Split
probe
+13
probe
View file
Reviewed
···
1
1
+
#!/usr/bin/env zsh
2
2
+
3
3
+
ffprobe -loglevel quiet -sexagesimal -print_format json=compact=1 -show_entries error:stream:format "$1" | jq '{
4
4
+
filename: (.format.filename),
5
5
+
size_mb: (.format.size | tonumber / 1024 / 1024 | round),
6
6
+
v_codec: (.streams[0].codec_name),
7
7
+
v_codec_tag: (.streams[0].codec_tag_string),
8
8
+
width: (.streams[0].width),
9
9
+
height: (.streams[0].height),
10
10
+
duration: (.streams[0].duration),
11
11
+
a_codec: (.streams[1].codec_name),
12
12
+
a_codec_tag: (.streams[1].codec_tag_string),
13
13
+
}'