Quick music/video preview

Strangely enough somebody asked me if I was aware of a quick media previewer in Dolphin. I came up with a solution a while back, here: https://forum.kde.org/viewtopic.php?f=224&t=176987&p=460250&hilit=quicklisten#p460250 Since it’s the second time it’s asked, I might as well post it here. Apparently some want this as a default xdg for their media files. I guess it can be handy for people who have a lot of audio files and can’t remember what they actually are. I sometimes combine it with my “enqueue” and “put selected in folder” servicemenus.


8 Likes

This looks really cool. People have been asking for something like this since KLook died. Might be worth upstreaming it.

1 Like

It sounded strange at first. It makes sense though for someone who has a ton of ,say, audio files, has no idea what they actually are and needs them catalogued in a quickie. Someone in the music business or something, you know. Especially if you make a desktop app. Like I said, I used it occasionally with that “put in a folder” service menu entry. Click, listen, put in folder, boom. Batch rename…list goes on. And since it’s mpv, you can add a bunch of other commands. I dunno, start 10 secs in the file ( to skip an intro or something) and stop at 20 secs. Just sayin’.

HOWEVER! There’s a downside when using mpv. Namely, mpv doesn’t support a single instance. I mean, it does, but not by default. I believe there’s a script available to do it, not sure. So, I tried this with VLC. Imho, vlc is a very buggy piece of… So, you can set the command to “vlc %f --run-time=10 vlc://quit”. But it’ll open in a big window, regardless if you set a default size in vlc itself. There’s still a bug in vlc which disables/ignores the “–width” and “height” settings completely as well. The cvlc ( no gui) command only works for non-video files and the video files open with the same problem, big window.
SO. If you do need a single instance ( click click click…) and you don’t want to use a python script you might wanna look at mediaplayers that do support window geometry AND single instance. I’ve always used Smplayer as my video go-to. That one DOES work with single instance and geometry. It doesn’t do endpos but you can achieve the same by “timeout 10s smplayer %f”.

Duuh…I just realized I didn’t post the actual file for this.
Here’s the one for smplayer. In short, it plays for 15 secs but starts at 00:59 in the given file ( to skip, like, intros of movie files and such)

[Desktop Entry]
Type=Service
ServiceTypes=KonqPopupMenu/Plugin
MimeType=video/;audio/
Actions=QuickSM
X-KDE-Submenu=
Icon=smplayer
X-KDE-Priority=TopLevel

[Desktop Action QuickSM]
Exec=timeout 15s smplayer -start 00:59 %f
Name=Quicklisten…
Icon=smplayer

1 Like