Coder Social home page Coder Social logo

Comments (25)

CogentRedTester avatar CogentRedTester commented on May 16, 2024 1

Yes, autoload.lua would probably break this script. If you like I have a modified autoload.lua that only activates when you use the keybind (ctrl+f8). It's in my main repository.

So to confirm the resume position is working for all files? If so I'll close this issue.

from mpv-scripts.

CogentRedTester avatar CogentRedTester commented on May 16, 2024

I can't replicate this, so I need a little more information. Could you post both your copy of keep-session.lua, and your mpv.conf file?

from mpv-scripts.

abhirup7 avatar abhirup7 commented on May 16, 2024

save-position-on-quit
scripts-opts-append=keep_session-auto_load=yes
just these 2 lines on mpv.conf and keep-session latest commit casues this issue on my Linux system.
Also using the keep-session.lua file from reddit (past file) makes things go back to normal.
Would just like to add something like save-position-on-quit to this script. Anyway this could be done? mpv starts from 00.00 timestamp of video unless I open video from file manager then it continues from where I left.(the feature I was talking about)

from mpv-scripts.

CogentRedTester avatar CogentRedTester commented on May 16, 2024

how are you opening mpv normally? When you try to have the script activate?

from mpv-scripts.

abhirup7 avatar abhirup7 commented on May 16, 2024

Just clicking mpv icon on dock.

from mpv-scripts.

CogentRedTester avatar CogentRedTester commented on May 16, 2024

I'm not sure, but try adding idle=once to mpv.conf. Also try that with the latest version of the script.

from mpv-scripts.

abhirup7 avatar abhirup7 commented on May 16, 2024

No change. For you does it starts from where you left ?

from mpv-scripts.

CogentRedTester avatar CogentRedTester commented on May 16, 2024

Yes, it works perfectly for me, which is why I'm not just immediately reverting. I made quite a few very useful bug fixes between these versions, and I don't want to give them up until I know why it's not working for you.

from mpv-scripts.

CogentRedTester avatar CogentRedTester commented on May 16, 2024

If you run mpv with the option --msg-level=keep_session='debug' then you can see debug messages from the script.

Pasting them here might be helpful to me figuring out what's going on.
You'd want to run mpv from the terminal for this

from mpv-scripts.

abhirup7 avatar abhirup7 commented on May 16, 2024

Screenshot from 2020-04-19 19-30-14

from mpv-scripts.

CogentRedTester avatar CogentRedTester commented on May 16, 2024

The problem is that you've mis-spelt the config option, it's not scripts-opts-append, it's script-opts-append

try again with the latest version of the script

from mpv-scripts.

abhirup7 avatar abhirup7 commented on May 16, 2024

Yeah yeah I saw that. The latest commit still starts the first video of the playlist. That's why i had deleted this line in the first place and while wrting it again must have used scripts because of the folder name scripts foolishly.
But undoing the latest commit and just using
if o.maintain_pos and previous_playlist_pos ~= 1 then
works well. Video starts from where I left off.

from mpv-scripts.

CogentRedTester avatar CogentRedTester commented on May 16, 2024

Are you sure that undoing that line is the cause? Because that line is what fixes it for me. What it does is prevent the current file from being reloaded, which wipes the previously saved position. This only seems to happen on playlist entries after the first one.

from mpv-scripts.

abhirup7 avatar abhirup7 commented on May 16, 2024

Wow the video continued where I left off once and now it's back to starting at 00:00.
Something is messing up the good confg I don't understand.

from mpv-scripts.

CogentRedTester avatar CogentRedTester commented on May 16, 2024

Remember that when you change the script/config files mpv doesn't get updated until it restarts. You need to do two mpv restarts to see the fixed results, the first restart to save the session properly, the 2nd to load it.

from mpv-scripts.

CogentRedTester avatar CogentRedTester commented on May 16, 2024

If you could upgrade to the latest version of the script and send me another screenshot of the terminal output that would be great.

from mpv-scripts.

abhirup7 avatar abhirup7 commented on May 16, 2024

mpv git-2020-04-03-f9cc29e Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects
built on Sat Apr 4 00:21:24 UTC 2020
FFmpeg library versions:
libavutil 56.42.102
libavcodec 58.77.101
libavformat 58.42.100
libswscale 5.6.101
libavfilter 7.77.101
libswresample 3.6.100
FFmpeg version: git-2020-04-03-a6e56d1

Usage: mpv [options] [url|path/]filename

Basic options:
--start= seek to given (percent, seconds, or hh:mm:ss) position
--no-audio do not play sound
--no-video do not play video
--fs fullscreen playback
--sub-file= specify subtitle file to use
--playlist= specify playlist file

--list-options list all mpv options
--h= print options which contain the given string in their name
No error just this stuff.
The latest commit forces mpv to play the first video instead of anything I choose from the playlist but it starts from the position I leave the first video in.

I think the one time time it worked perfectly I had undone the latest commit and somehow for one time the chosen video pkayed at left timestamp.

from mpv-scripts.

CogentRedTester avatar CogentRedTester commented on May 16, 2024

It probably showed this because the last session was empty. Try opening a playlist like last time, quitting, then trying again.

This may seem tedious, but I think this will probably end up being some kind of trivial error that can be spotted through the debug messages.

from mpv-scripts.

abhirup7 avatar abhirup7 commented on May 16, 2024

mpv just won't start from terminal anymore.

from mpv-scripts.

CogentRedTester avatar CogentRedTester commented on May 16, 2024

What's it saying?

from mpv-scripts.

CogentRedTester avatar CogentRedTester commented on May 16, 2024

Did you have --idle in your config file last time? Try adding that to the command line

Idle is necessary for the script to start, but since it worked last time for you I assumed you already had it set. If you had it in your config but removed it that'd be why

Edit: please send me screenshots of your terminal, that would make this much easier to diagnose

from mpv-scripts.

abhirup7 avatar abhirup7 commented on May 16, 2024

Screenshot from 2020-04-19 20 05 45

Okay i figured out the problem. Removing autload.lua makes keep-session.lua work perfectly. Mpv starts from where i left off and plays correct video from file. But obviously now there's no autmatic playlist and I can't choose next or previous video from mpv.

from mpv-scripts.

abhirup7 avatar abhirup7 commented on May 16, 2024

Screenshot from 2020-04-19 20 10 50

from mpv-scripts.

KonoVitoDa avatar KonoVitoDa commented on May 16, 2024

Is there still no way to use the keep the default autoload behavior together with keep-session?

from mpv-scripts.

CogentRedTester avatar CogentRedTester commented on May 16, 2024

Is there still no way to use the keep the default autoload behavior together with keep-session?

What exactly do you want to happen? Explain what you want the behaviour to be when you open a file. and what the current behaviour is.

from mpv-scripts.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.