https://github.com/zd4y/videos-duration
Command for getting the total duration of one or more videos
https://github.com/zd4y/videos-duration
Last synced: 5 months ago
JSON representation
Command for getting the total duration of one or more videos
- Host: GitHub
- URL: https://github.com/zd4y/videos-duration
- Owner: zd4y
- License: mit
- Created: 2022-09-13T03:21:57.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-09-13T03:24:57.000Z (almost 4 years ago)
- Last Synced: 2024-06-21T08:05:28.761Z (almost 2 years ago)
- Language: Go
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# videos-duration
Get the total duration of one or more videos
## Installation
Clone this repository and enter:
```
go install .
```
## Usage
The path of the videos is received from stdin, so for example you can get the total duration of all
the videos in the current directory like this:
```
ls | videos-duration
```
Or you could specify the paths with echo:
```
echo -e "video1.mp4\nvideo2.mp4" | videos-duration
```
Or simply running `videos-duration` and manually typing the paths and then using Ctrl+D
Or any other way of writing to stdin you like.
## Usage as a lf command
Add this to your `lfrc`:
```
cmd duration ${{
total="$(printf '%s\n' $fx | videos-duration)"
lf -remote "send $id echo '$total'"
}}
```
And now you can select the videos and use `:duration`