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

[BUG] Pressing s gives Error writing screenshot if long filename. #146

Open
zenny opened this issue Nov 29, 2022 · 2 comments
Open

[BUG] Pressing s gives Error writing screenshot if long filename. #146

zenny opened this issue Nov 29, 2022 · 2 comments

Comments

@zenny
Copy link

zenny commented Nov 29, 2022

Hi,

Context:

  1. mpv has been assigned as a backend to pipe-viewer in `~/.config/pipe-viewer/pipe-viewer.conf
video_player_selected         => "mpv",
  video_players                 => {
                                     mpv => {
                                              arg => "--really-quiet --force-media-title=*TITLE* --no-ytdl --vo=gpu --hwdec=cuda",
                                              audio => "--audio-file=*AUDIO*",
                                              cmd => "/usr/bin/mpv",
                                              fs => "--fullscreen",
                                              novideo => "--no-video",
                                              srt => "--sub-file=*SUB*",
                                            },
  1. When mpv is configured to grasp screenshot to the $PWD plays well with pipe-viewer

  2. When mpv is asked to save the screenshot to a specific location in ~/.config/mpv/mpv.conf

screenshot-template="~/Pictures/screenshots/mpv/%F/%p__%tm-%tY"


local utils = require("mp.utils")
local basedir = mp.get_property("options/screenshot-directory")
mp.register_event("file-loaded", function()
    local filedir = mp.get_property("filename/no-ext")
    local dir = utils.join_path(basedir, filedir)
    mp.set_property("options/screenshot-directory", dir)
end)

mpv standalone (outside `pipe-viewer) captures the screenshot as desired in the relevant folder specified above.**

But pipe-viewer fails to screenshot with Error writing screenshot! when pressed s!

Any idea? Thanks!

@zenny
Copy link
Author

zenny commented Jul 11, 2023

The pipe-viewer version is latest from master.

$ ./pipe-viewer --version
CLI Pipe Viewer 0.4.7

This issue appears to be with pipe-viewer unable to pipe the long filenames, but NOT with the mpv (unlike smplayer-dev/smplayer#569 (comment)).

The reason is:

screenshot-template="%F - [%P]v%#01n"

reports Error writing screenshot! with pipe-viewer, but goes well with mpv standalone whereas

screenshot-template="screenshot_%n_%p_%02n"

produces the screenshot without any error when pressed s in pipe viewer.

Any clue appreciated! Thanks.

@zenny zenny changed the title screenshot to specific directory with mpv as backend does not work! [BUG] Pressing s gives Error writing screenshot if long filename. Jul 12, 2023
@zenny
Copy link
Author

zenny commented Aug 8, 2023

Hi @trizen

Taking screenshot with long filenames in pipe-viewer have become a hurdle despite the fact that it goes well with standalone mpv. Wish someone look into this outstanding bug that remained unsolved for a long time.

Thanks again, and Cheers

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

No branches or pull requests

1 participant