Reply to topic

How to create dolphin service menu with finish notification?

philipbb
Registered Member
Posts
3
Karma
0
I use https://store.kde.org/p/1333385, which is a dolphin service menu for converting a video to webm. Converting a video takes a lot of time. Right now, the output file gets created instantly, but I need to watch `ps aux | ag ffmpeg` to know when it's actually done.

I would like to have a progress bar or a notification to know when it finishes. How can I create a dolphin service menu like that?
visone
Registered Member
Posts
32
Karma
0
OS
philipbb
Registered Member
Posts
3
Karma
0
Thank you, visone. Ideally, I would like a progress bar, but that's too difficult, so here's what I settled on. It shows a "started" notification and then either a "failed" notification or a "finished" notification.

Code: Select all
[Desktop Entry]
Type=Service
ServiceTypes=KonqPopupMenu/Plugin
MimeType=video/*
Actions=convert-webm-15;convert-webm-23;convert-webm-31;convert-webm-42;convert-webm-53
X-KDE-Submenu=Convert video
Icon=video

[Desktop Action convert-webm-15]
Name=Convert to webm: very high quality (crf=15)
Icon=video
Exec=/bin/bash -c 'kdialog  --title "Converting %u to webm" --passivepopup "Started" && { ffmpeg -i "%u" -c:v libvpx-vp9 -crf 15 -b:v 0 -y "%u.webm" || { kdialog --title "Converting %u to webm" --passivepopup "Failed" && false; }; } && kdialog --title "Converting %u to webm" --passivepopup "Finished"'

[Desktop Action convert-webm-23]
Name=Convert to webm: high quality (crf=23)
Icon=video
Exec=/bin/bash -c 'kdialog  --title "Converting %u to webm" --passivepopup "Started" && { ffmpeg -i "%u" -c:v libvpx-vp9 -crf 23 -b:v 0 -y "%u.webm" || { kdialog --title "Converting %u to webm" --passivepopup "Failed" && false; }; } && kdialog --title "Converting %u to webm" --passivepopup "Finished"'

[Desktop Action convert-webm-31]
Name=Convert to webm: medium quality (crf=31)
Icon=video
Exec=/bin/bash -c 'kdialog  --title "Converting %u to webm" --passivepopup "Started" && { ffmpeg -i "%u" -c:v libvpx-vp9 -crf 31 -b:v 0 -y "%u.webm" || { kdialog --title "Converting %u to webm" --passivepopup "Failed" && false; }; } && kdialog --title "Converting %u to webm" --passivepopup "Finished"'

[Desktop Action convert-webm-42]
Name=Convert to webm: low quality (crf=42)
Icon=video
Exec=/bin/bash -c 'kdialog  --title "Converting %u to webm" --passivepopup "Started" && { ffmpeg -i "%u" -c:v libvpx-vp9 -crf 42 -b:v 0 -y "%u.webm" || { kdialog --title "Converting %u to webm" --passivepopup "Failed" && false; }; } && kdialog --title "Converting %u to webm" --passivepopup "Finished"'

[Desktop Action convert-webm-53]
Name=Convert to webm: very low quality (crf=53)
Icon=video
Exec=/bin/bash -c 'kdialog  --title "Converting %u to webm" --passivepopup "Started" && { ffmpeg -i "%u" -c:v libvpx-vp9 -crf 53 -b:v 0 -y "%u.webm" || { kdialog --title "Converting %u to webm" --passivepopup "Failed" && false; }; } && kdialog --title "Converting %u to webm" --passivepopup "Finished"'
visone
Registered Member
Posts
32
Karma
0
OS
Hi!
It's cool, i like it!
Iif you don't mind, I would take the idea for my own service menu
philipbb
Registered Member
Posts
3
Karma
0
visone, I don't mind.
visone
Registered Member
Posts
32
Karma
0
OS

 
Reply to topic

Bookmarks



Who is online

Registered users: atf, Baidu [Spider], Bing [Bot], clh333, egerlach, Gibtnix, Google [Bot], robertotamburrino, Sogou [Bot], vasyok, Yahoo [Bot]