GithubHelp home page GithubHelp logo

Fails to populate {audio-media} about memento HOT 8 CLOSED

Roxiun avatar Roxiun commented on June 20, 2024
Fails to populate {audio-media}

from memento.

Comments (8)

Roxiun avatar Roxiun commented on June 20, 2024 2

Yep that fixed it

from memento.

ripose-jp avatar ripose-jp commented on June 20, 2024

Try this patch and tell me if it fixes it.

diff --git a/src/gui/mpvadapter.cpp b/src/gui/mpvadapter.cpp
index cff4130..7794d03 100644
--- a/src/gui/mpvadapter.cpp
+++ b/src/gui/mpvadapter.cpp
@@ -913,6 +913,7 @@ QString MpvAdapter::tempAudioClip(
         NULL
     };
 
+    QByteArray configDir = DirectoryUtils::getConfigDir().toUtf8();
     char *script_opts = NULL;
     mpv_event *event = NULL;
     mpv_handle *enc_h = mpv_create();
@@ -929,7 +930,9 @@ QString MpvAdapter::tempAudioClip(
     mpv_set_option_string(enc_h, "sid", "no");
     mpv_set_option_string(enc_h, "secondary-sid", "no");
     mpv_set_option_string(enc_h, "ytdl", "yes");
+    mpv_set_option_string(enc_h, "config-dir", configDir);
     mpv_set_option_string(enc_h, "config", "no");
+    mpv_set_option_string(enc_h, "load-scripts", "yes");
     mpv_set_option_string(enc_h, "o", filename);
     if (normalize)
     {

from memento.

Roxiun avatar Roxiun commented on June 20, 2024

@ripose-jp

Nope still am getting the same issue

from memento.

ripose-jp avatar ripose-jp commented on June 20, 2024

Try this one.

diff --git a/src/gui/mpvadapter.cpp b/src/gui/mpvadapter.cpp
index cff4130..8e93c65 100644
--- a/src/gui/mpvadapter.cpp
+++ b/src/gui/mpvadapter.cpp
@@ -521,7 +521,7 @@ int64_t MpvAdapter::getSecondarySubtitleTrack() const
 QString MpvAdapter::getPath() const
 {
     char *path = NULL;
-    if (mpv_get_property(m_handle, "path", MPV_FORMAT_STRING, &path) < 0)
+    if (mpv_get_property(m_handle, "stream-open-filename", MPV_FORMAT_STRING, &path) < 0)
     {
         qDebug() << "Could not get mpv path property";
         return "";

from memento.

Roxiun avatar Roxiun commented on June 20, 2024

I'm getting this issue once again while on the latest branch

from memento.

ripose-jp avatar ripose-jp commented on June 20, 2024

Considering nothing on Memento's end has changed, I'd assume that either zoro, yt-dlp, or mpv changed something. Do zoro videos load? What version of mpv are you using? What version of yt-dlp are you using?

from memento.

Roxiun avatar Roxiun commented on June 20, 2024

Considering nothing on Memento's end has changed, I'd assume that either zoro, yt-dlp, or mpv changed something. Do zoro videos load? What version of mpv are you using? What version of yt-dlp are you using?

Yeah thats true I tested it out with zoro script and it worked (both on latest and other commit).

The issue only arises when I used this animelon script instead. The zoro script worked fine but for whatever reason when using animelon it fails to populate. Videos and subtitles (seems) to load fine its just when populating into anki.

However it seems to load the videos in the exact same way, so I'm not sure whats going on

Versions:

❯ mpv --version
mpv 0.35.1 Copyright © 2000-2023 mpv/MPlayer/mplayer2 projects
 built on Sat Jan 28 04:49:47 2023
FFmpeg library versions:
   libavutil       57.28.100
   libavcodec      59.37.100
   libavformat     59.27.100
   libswscale      6.7.100
   libavfilter     8.44.100
   libswresample   4.7.100
FFmpeg version: 5.1.2

❯ yt-dlp --version
2023.03.04

from memento.

ripose-jp avatar ripose-jp commented on June 20, 2024

If the Zoro script still works and the Animelon script doesn't, this issue is different. Open a new issue so I can track it.

from memento.

Related Issues (20)

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.