- This topic has 2 replies, 2 voices, and was last updated Jan 31-6:19 pm by Brian Masinick.
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Forum for users of antiX Linux. Mean and Lean and Proudly anti-fascist.
Forum › Forums › General › Tips and Tricks › List (almost) all videos on your hard drive and play selected one
In my continuous search for handy features for my FT10 package, I’m always coming up with ideas for tiny and (I hope) useful little scripts.
Most computer users are now spoiled by being used to mobile devices- users of those devices don’t even know how to locate files- because they are usually displayed by type of file (video, audio, documents)
Here’s a tiny script to list almost all video files in your computer. You can then click any file from the list to play it in mpv…
It’s only the first draft, and the concept can be adapted to search and open more video file extensions, audio files, documents…
#!/bin/bash
#locate video files (most common extensions)
locate "*.avi" "*.mpg" "*.mpeg" "*.mkv" "*.mp4" "*.mov" "*.3gp" "*.wmv" > /tmp/video-file-list.txt
##Get selection
selection=$(yad --center --height=600 --width=800 --title=$"Videos" --list --column=$"" --button="Play" < /tmp/video-file-list.txt)
selection_to_add=$(echo $selection|cut -d\| -f1)
# if nothing was selected, exit
if [ -z "$selection" ]; then exit
fi
# play selection
mpv "$selection_to_add"
This a version of this script will probably be added, in the future, to FT10, to preview all video files:
#!/bin/bash
#locate video files (most common extensions) and display them all in a rox window
cd /tmp
mkdir video_thumbnails
locate "*.avi" "*.mpg" "*.mpeg" "*.mkv" "*.mp4" "*.mov" "*.3gp" "*.wmv" > /tmp/video-file-list.m3u
cat /tmp/video-file-list.m3u | while read VIDEO_FILE; do destination=$(echo "$(basename "${VIDEO_FILE}")") && ln -s "$VIDEO_FILE" "/tmp/video_thumbnails/$destination"; done
rox-filer /tmp/video_thumbnails/
You have a lot of good ideas PPC.
I’m glad that several of them are now available for those who are interested in what you are doing.
Thank you for your creative thinking and helpful tips and scripts.
--
Brian Masinick
| Cookie | Duration | Description |
|---|---|---|
| cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
| cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
| cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
| cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
| cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
| viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |