mediasnacks 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,7 +10,9 @@ _mediasnacks_commands=(
10
10
  'hev1tohvc1:Fixes video thumbnails not rendering in macOS Finder'
11
11
  'framediff:ffplay with a filter for diffing adjacent frames'
12
12
  'videodiff:Plays a video with the difference of two videos'
13
- 'vconcat:Concatenates videos'
13
+ 'vconcat:Concatenates videos',
14
+ 'dlaudio: yt-dlp best audio',
15
+ 'dlvideo: yt-dlp best video',
14
16
  )
15
17
 
16
18
  _mediasnacks() {
package/README.md CHANGED
@@ -21,8 +21,10 @@ Commands:
21
21
 
22
22
  - `framediff`: Plays a video of adjacent frames diff
23
23
  - `videodiff`: Plays a video with the difference of two videos
24
- -
25
24
  - `vconcat`: Concatenates videos
25
+ - `dlaudio`: yt-dlp best audio
26
+ - `dlvideo`: yt-dlp best video
27
+
26
28
  <br/>
27
29
 
28
30
  ### Converting Images to AVIF
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mediasnacks",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Utilities for preparing videos, images, and audio for the web",
5
5
  "license": "MIT",
6
6
  "author": "Eric Fortis",
package/src/cli.js CHANGED
@@ -19,6 +19,9 @@ const COMMANDS = {
19
19
  videodiff: ['videodiff.sh', 'Plays a video with the difference of two videos'],
20
20
 
21
21
  vconcat: ['vconcat.sh', 'Concatenates videos'],
22
+
23
+ dlaudio: ['dlaudio.sh', 'yt-dlp best audio'],
24
+ dlvideo: ['dlvideo.sh', 'yt-dlp best video'],
22
25
  }
23
26
 
24
27
  const USAGE = `
package/src/dlaudio.sh ADDED
@@ -0,0 +1,4 @@
1
+ #!/bin/sh
2
+
3
+ yt-dlp -o '%(title)s.%(ext)s' \
4
+ -f 'bestaudio[ext=m4a]/bestaudio' "$1"
package/src/dlvideo.sh ADDED
@@ -0,0 +1,4 @@
1
+ #!/bin/sh
2
+
3
+ yt-dlp -o '%(title)s.%(ext)s' \
4
+ -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4' "$1"