Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a fallback to let mplayer control the screensaver #1085

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Fat-Zer
Copy link

@Fat-Zer Fat-Zer commented Oct 29, 2024

subj; in case the smplayer's controls are nonoperational.

Bug: #1056

Bug: smplayer-dev#1056
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
@Fat-Zer
Copy link
Author

Fat-Zer commented Oct 30, 2024

For the record, I haven't tested this on any of platforms beyond my own (linux with no org.freedesktop.ScreenSaver service), but unless I've made some embarrassing mistakes it should be fine.

@hnsteyding
Copy link
Contributor

hnsteyding commented Oct 31, 2024

Doesn't work on Windows 10.

mplayer/mplayer.exe -noquiet -slave -identify -v -nofs -sub-fuzziness 0 -priority normal -nodr -double -nostop-xscreensaver -nomouseinput -nokeepaspect -wid 132938 -monitorpixelaspect 1 -osdlevel 0 -subfont-osd-scale 3 -progbar-align 80 -ass -embeddedfonts -ass-line-spacing 0 -ass-font-scale 1 -noflip-hebrew -subcp UTF-8 -alang de|deu|ger -slang de|deu|ger -subpos 100 -volume 32 -speed 1.3 -vf-add screenshot=D:\internet-ordner/shot -noslices -af-add scaletempo -af-add equalizer=0:0:0:0:0:0:0:0:0:0 -fs D:/internet-ordner/fertig/Talkshows/Markus Lanz-Markus Lanz vom 1. Oktober 2024 (S2024_E104)-0540068682.mp4

Unknown option on the command line: -nostop-xscreensaver

@Fat-Zer
Copy link
Author

Fat-Zer commented Oct 31, 2024

Doesn't work on Windows 10.

Hmmm... The same thing should have happened on master without the patch, doesn't it?

I suppose it's possible to add ifdefs to src/mplayeroptions.cpp to be on the safe side, it makes sense as it's a strictly X11 option anyway.

PS: Could you also check if mpv has --stop-screensaver option?

Edit: I meant src/mplayeroptions.cpp, not mpv

@hnsteyding
Copy link
Contributor

MPV player working with and without screensaver activation and SMplayer set commandline options:

grafik

mpv/mpv.exe --no-quiet --terminal --no-msg-color --input-ipc-server=C:/Users/Admin/AppData/Local/Temp/smplayer-mpv-11d0 --msg-level=ffmpeg/demuxer=error --video-rotate=no --no-config -v --no-fs --hwdec=no --sub-auto=exact --priority=normal --no-stop-screensaver --no-input-default-bindings --input-vo-keyboard=no --no-input-cursor --cursor-autohide=no --no-keepaspect --wid=5178778 --monitorpixelaspect=1 --osd-level=3 --osd-scale=1 --osd-bar-align-y=0.6 --sub-ass --embeddedfonts --sub-ass-line-spacing=0 --sub-scale=1 --sub-codepage=UTF-8 --sid=auto --alang=de|deu|ger --slang=de|deu|ger --sub-pos=100 --volume=40 --cache=auto --speed=1 --screenshot-template=cap_%F_%p_%02n --screenshot-format=jpg --screenshot-directory=D:\internet-ordner --audio-pitch-correction=yes --af-add=@aeq:lavfi=[firequalizer=gain='cubic_interpolate(f)':zero_phase=on:wfunc=tukey:delay=0.027:gain_entry='entry(0,0);entry(62.5,0);entry(125,0);entry(250,0);entry(500,0);entry(1000,0);entry(2000,0);entry(4000,0);entry(8000,0);entry(16000,0)'] --volume-max=100 -fs --term-status-msg=. D:/internet-ordner/fertig/Talkshows/Markus Lanz-Markus Lanz vom 1. Oktober 2024 (S2024_E104)-0540068682.mp4

grafik

mpv/mpv.exe --no-quiet --terminal --no-msg-color --input-ipc-server=C:/Users/Admin/AppData/Local/Temp/smplayer-mpv-281c --msg-level=ffmpeg/demuxer=error --video-rotate=no --no-config -v --no-fs --hwdec=no --sub-auto=exact --priority=normal --no-stop-screensaver --no-input-default-bindings --input-vo-keyboard=no --no-input-cursor --cursor-autohide=no --no-keepaspect --wid=5768602 --monitorpixelaspect=1 --osd-level=3 --osd-scale=1 --osd-bar-align-y=0.6 --sub-ass --embeddedfonts --sub-ass-line-spacing=0 --sub-scale=1 --sub-codepage=UTF-8 --sid=auto --alang=de|deu|ger --slang=de|deu|ger --sub-pos=100 --volume=40 --cache=auto --speed=1 --start=12 --screenshot-template=cap_%F_%p_%02n --screenshot-format=jpg --screenshot-directory=D:\internet-ordner --audio-pitch-correction=yes --af-add=@aeq:lavfi=[firequalizer=gain='cubic_interpolate(f)':zero_phase=on:wfunc=tukey:delay=0.027:gain_entry='entry(0,0);entry(62.5,0);entry(125,0);entry(250,0);entry(500,0);entry(1000,0);entry(2000,0);entry(4000,0);entry(8000,0);entry(16000,0)'] --volume-max=100 -fs --term-status-msg=. D:/internet-ordner/fertig/Talkshows/Markus Lanz-Markus Lanz vom 1. Oktober 2024 (S2024_E104)-0540068682.mp4

@Fat-Zer
Copy link
Author

Fat-Zer commented Oct 31, 2024

I suppose it's possible to add ifdefs to src/mplayeroptions.cpp to be on the safe side, it makes sense as it's a strictly X11 option anyway.

done

@hnsteyding, thanks for testing

@hnsteyding
Copy link
Contributor

Unfortunately still doesn't work.
SMplayer still uses command option "--stop-screensaver"/--nostop-screensaver" under Window OS.

@Fat-Zer
Copy link
Author

Fat-Zer commented Nov 1, 2024

Unfortunately still doesn't work. SMplayer still uses command option "--stop-screensaver"/--nostop-screensaver" under Window OS.

What do you mean? I thought you wrote that mpv does support --nostop-screensaver on win, isn't it?
And if you are asking why smplayer always passes --no-stop-screensaver regardless of settings, then that's an expected behavior as on win smplayer supposed to always be able to control screensaver launch on its own.

@hnsteyding
Copy link
Contributor

Sorry for confusion i always use mplayer as "core" video player:
grafik

mplayer (under Win OS) doesn't support command option "--stop-screensaver/--nostop-screensaver" - it will be used for X11 only:
http://www.mplayerhq.hu/DOCS/man/en/mplayer.1.html

mpv also support command option "--stop-screensaver/--nostop-screensaver" under Win OS.

@Fat-Zer
Copy link
Author

Fat-Zer commented Nov 1, 2024

Hmmm... then that shouldn't happen in any way or form now, are you positive you've rebuilt smplayer with the latest commit in the PR (git hash 4f6d023)?

PS: it's -stop-xscreensaver/-nostop-xscreensaver for mplayer (notice x, a single dash and no dash after no), hence the confusion.

@hnsteyding
Copy link
Contributor

Yes, i've rebuilt smplayer with the latest commit in the PR but no change.

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
@Fat-Zer Fat-Zer force-pushed the screensaver-fallback branch from 4f6d023 to e346af9 Compare November 2, 2024 15:56
@Fat-Zer
Copy link
Author

Fat-Zer commented Nov 2, 2024

Yes, i've rebuilt smplayer with the latest commit in the PR but no change.

yeah... sorry, my bad... I haven't noticed there is a fallback in case the option haven't been defined explicitly...

Now it's fixed for sure.

@hnsteyding
Copy link
Contributor

I've rebuilt smplayer with the latest commit in the PR and now it works.
@Fat-Zer thank your very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants