dyphire / mpv-scripts

userscripts for mpv
MIT License
56 stars 5 forks source link

Chapters not getting displayed #29

Closed lamyergeier closed 4 months ago

lamyergeier commented 4 months ago

chapters.txt

00:00:00.000 Largo (The sick man, near death)
00:05:24.000 Allegro molto agitato (The battle between life and death offers no respite to the man)
00:09:09.000 Meno mosso (The dying man's life passes before him)
00:17:09.000 Moderato (The sought-after transfiguration) 

chapter_make_read.conf

#Whether to enable automatic reading and loading external chapter files.Default: yes
autoload=yes
#Whether to enable the automatic export chapter file (when the chapter information is changed).default:no
autosave=no
#Whether to use external chapter information to cover the internal chapter information of the video.default:no
force_overwrite=no
#Specifies the extension of the external chapter file.
chapter_file_ext=.txt
#Select whether the external chapter file needs to match the extension of the source file.
basename_with_ext=no
#Specifies the subpath of the same directory as the playback file as the external chapter file path.
#Note: The external chapter file is read from the subdirectory first.
#If the file does not exist, it will next be read from the same directory as the playback file.
external_chapter_subpath=chapters
#Whether the chapter file is stored in the configuration global directory, the network file will always use the global directory.default:no
global_chapters=no
#Specify the path of the global directory of the chapter file.It can be the relative path or absolute path supported by MPV
global_chapters_dir=~~/chapters
#Whether to use the hash value to save the file name in the global directory.Default: no
## If you set to 'no', the chapter file will be named after the corresponding media documents, which may lead to conflict
## Using hash can prevent the same name, but in different directory media files to obtain the same chapter file
## But if you move the file to different directory, the hash value will be changed so that the chapter file cannot be loaded
hash=no
#ask for title or leave it empty
ask_for_title=yes
#placeholder when asking for title of a new chapter
placeholder_title=Chapter 
#pause the playback when asking for chapter title
pause_on_input=yes

Log

mpv Richard\ Strauss\ :\ Tod\ und\ Verklärung\ \(Mort\ et\ Transfiguration\)\ \(Mikko\ Franck\ ⧸\ OpRF\).00-25-43.2018-12-27.umfttWN5xYo.webm  -v --log-file=./log
dyphire commented 4 months ago

From the log, the script does not find the corresponding external chapter file. Make sure you use the correct chapter file name and save location.

video.chp for video.mp4 with the option basename_with_ext = false

dyphire commented 4 months ago

Tested your sample. It's working fine. image image