flathub / net.ankiweb.Anki

https://flathub.org/apps/details/net.ankiweb.Anki
21 stars 13 forks source link

No Audio #7

Closed cwmke closed 6 years ago

cwmke commented 6 years ago

Trying this out but I get an error stating it needs mpv or mplayer installed. I'm running Fedora 28.

Exception in thread Thread-70:
Traceback (most recent call last):
  File "/app/share/anki/anki/sound.py", line 226, in startProcess
    env=env)
  File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
    raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'mplayer'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    self.run()
  File "/app/share/anki/anki/sound.py", line 173, in run
    self.startProcess()
  File "/app/share/anki/anki/sound.py", line 229, in startProcess
    raise Exception("Did you install mplayer?")
Exception: Did you install mplayer?
dsd commented 6 years ago

Anki uses mplayer and this can't be trivially replaced with another audio player because it actually uses mplayer features (manages a playlist etc).

Wondering if there might be legal concerns with codecs etc, I looked at building a minimal mplayer only with support for MP3/vorbis/wav. But that's pretty hard.

Giving up on that, and thinking of another approach: what does Debian do?

Debian preinstalls loads of build deps and then builds mplayer with these args:

CONFIGURE_FLAGS = \
    --prefix=/usr \
    --confdir=/etc/mplayer \
    --enable-xvmc \
    --enable-menu \
    --enable-radio --enable-radio-capture \
    --disable-arts \
    --language=all

That'll use the internal ffmpeg with loads of demuxers/filters/decoders enabled.

I could just use a similarly small set of build args and let mplayer's autodetection do the rest (based on which other libs are available in the build root), also including many internal ffmpeg-supported formats. I'm thinking if Debian are OK shipping it along these lines then we should be too?

@nedrichards @ramcq thoughts?

cwmke commented 6 years ago

Not sure if this helps any but doesn't Anki use mpv now with the 2.1 series?

dsd commented 6 years ago

Ah, I didn't realise that. mplayer is only used as a fallback if mpv is not available. And I can copy mpv from the existing flathub io.github.GnomeMpv.json

dsd commented 6 years ago

Pushed that. Should be published shortly.

cwmke commented 5 years ago

I don't have errors anymore but audio still doesn't seem to work.

ggiaur commented 5 years ago

I have the same problem