Can't Play Audio

Julie's Avatar

Julie

13 Mar, 2019 09:39 PM

The audio on cards plays just fine on the iOS mobile version, but I'm having a complete nightmare getting it to work on the desktop client. I am using Anki 2.1.11 on OS X 10.11.6 (El Capitan), though earlier versions of Anki also failed to work.

Initially, I got the message asking me to install MPlayer or MPV. It seems that there are issues with MPlayer installers being infected, so I went for MPV. Anki seemed to not recognise that it is installed, as I still get the same message. I tried opening MPV directly and it just crashes. I tried installing seven versions of MPV and they all crash upon opening (lua crashes). Somebody suggested IINA instead of MPV, so I installed that and it works just fine, but Anki doesn't recognise that either. I eventually tracked down an old, clean version of MPlayerX, but that is also not recognised.

I am ready to tear my hair out, to be honest. Is there anything that I can do? It absolutely sucks to not be able to play audio on my cards.

  1. Support Staff 1 Posted by Damien Elmes on 15 Mar, 2019 12:27 AM

    Damien Elmes's Avatar

    Anki uses a bundled copy of mpv, and there should be no need to install extra software on a Mac. It seems the bundled version is failing to start on your computer for some reason, which is resulting in a misleading suggestion to install mpv.

    Please use the magnifying glass in the top right of your screen to start Terminal.app, then type the following in and hit enter (or copy&paste)

    /Applications/Anki.app/Contents/Resources/audio/mpv

    Please copy and paste the resulting output, as it may reveal why mpv is failing to run. If it is displaying help output and not what looks like an error, please also try paste the above line in, but instead of hitting enter, press space after the mpv part, then drag an mp3 file from Finder into the terminal window, and hit enter. Does the sound play? If not, what do you see?

  2. 2 Posted by Julie on 15 Mar, 2019 12:58 PM

    Julie's Avatar

    Thank you for your response, Damien. When I paste the path above into Terminal, all I get back is 'Illegal instruction: 4'. I tried to play an .mp3 file as described above (just in case) and got the same result.

  3. 3 Posted by Julie on 15 Mar, 2019 01:08 PM

    Julie's Avatar

    P.S. These are my hardware specs. It is a very old machine (but runs really well with an SSD so I see no need to replace it). Would swapping in a version of mpv from an older copy of Anki to the folder perhaps be helpful?

    Hardware Overview:

      Model Name: iMac
      Model Identifier: iMac7,1
      Processor Name: Intel Core 2 Duo
      Processor Speed: 2.4 GHz
      Number of Processors: 1
      Total Number of Cores: 2
      L2 Cache: 4 MB
      Memory: 4 GB
      Bus Speed: 800 MHz
      Boot ROM Version: IM71.007A.B03
      SMC Version (system): 1.21f4
      Hardware UUID: 00000000-0000-1000-8000-001B63B5C275

  4. Support Staff 4 Posted by Damien Elmes on 16 Mar, 2019 12:25 AM

    Damien Elmes's Avatar

    I suspect the bundled mpv was compiled to target newer processors. Please give Anki 2.0.52 a go, as it uses an older audio player - mplayer. If that works for you, I'll look at bundling mplayer instead of mpv in the alternate build in the future.

  5. 5 Posted by Julie on 16 Mar, 2019 09:49 AM

    Julie's Avatar

    I took the copy of mplayer from Anki 2.0.52 and put it into the folder for the newer version. It works perfectly. I'm so happy that I can finally use audio when I'm on my desktop! Thank you very much for your help.

  6. Support Staff 6 Posted by Damien Elmes on 17 Mar, 2019 06:17 AM

    Damien Elmes's Avatar

    You're most welcome!

  7. 7 Posted by Angus on 28 Jun, 2019 09:38 AM

    Angus's Avatar

    hi Damien, I'm currently using Anki 2.1.13 ....... with my Macbook. The
    Macbook software version is 10.13.6. (high sierra). however, the macbook itself is a mid 2012. I'm also having the same problem with mpv/mplayer. It says that it isn't installed. It worked the first time I downloaded Anki. When it reopened Anki a day later the mpv player fails to load.

    The error message is "Sound and video on cards will not function until mpv or mplayer is installed.'

  8. Support Staff 8 Posted by Damien Elmes on 01 Jul, 2019 01:04 AM

    Damien Elmes's Avatar

    Please try the alternate build, available on the Anki download site.

  9. 9 Posted by Charles on 28 Mar, 2020 09:10 PM

    Charles's Avatar

    -bash: Applications/Anki.app/Contents/Resources/audio/mpv: No such file or directory

  10. Support Staff 10 Posted by Damien Elmes on 29 Mar, 2020 09:34 AM

    Damien Elmes's Avatar

    Did you try the alternate build Charles?

  11. 11 Posted by Guilherme on 02 Apr, 2020 06:52 PM

    Guilherme's Avatar

    I'm having that problem too. Maybe because I am using Linux O.S., but I believe that there is a solution.

  12. 12 Posted by Guilherme on 02 Apr, 2020 07:01 PM

    Guilherme's Avatar

    I fixed this error, the page: https://tipsonubuntu.com/2018/07/27/install-mpv-0-29-ubuntu-18-04-lts/ contains the solution to the linux users, just install the MVP.

  13. 13 Posted by John on 27 Apr, 2020 09:29 AM

    John's Avatar

    I'm getting the following text when I type that in Terminal:

    mpv 0.27.0 (C) 2000-2017 mpv/MPlayer/mplayer2 projects
     built on Sat Sep 23 20:53:45 CEST 2017
    ffmpeg library versions:
       libavutil 55.58.100
       libavcodec 57.89.100
       libavformat 57.71.100
       libswscale 4.6.100
       libavfilter 6.82.100
       libswresample 2.7.100
    ffmpeg version: 3.3.4

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

    Basic options:
     --start=<time> 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=<file> specify subtitle file to use
     --playlist=<file> specify playlist file

     --list-options list all mpv options
     --h=<string> print options which contain the given string in their name

    Assertion failed: (self->_mk_tap_port != nil), function __33-[EventsResponder startMediaKeys]_block_invoke, file ../osdep/macosx_events.m, line 407.
    Abort trap: 6
    User:~ User$ /Applications/Anki.app/Contents/Resources/audio/mpv
    mpv 0.27.0 (C) 2000-2017 mpv/MPlayer/mplayer2 projects
     built on Sat Sep 23 20:53:45 CEST 2017
    ffmpeg library versions:
       libavutil 55.58.100
       libavcodec 57.89.100
       libavformat 57.71.100
       libswscale 4.6.100
       libavfilter 6.82.100
       libswresample 2.7.100
    ffmpeg version: 3.3.4

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

    Basic options:
     --start=<time> 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=<file> specify subtitle file to use
     --playlist=<file> specify playlist file

     --list-options list all mpv options
     --h=<string> print options which contain the given string in their name

    Assertion failed: (self->_mk_tap_port != nil), function __33-[EventsResponder startMediaKeys]_block_invoke, file ../osdep/macosx_events.m, line 407.
    Abort trap: 6

  14. Support Staff 14 Posted by Damien Elmes on 27 Apr, 2020 11:19 AM

    Damien Elmes's Avatar

    What device/macOS are you using?

  15. 15 Posted by John on 27 Apr, 2020 12:03 PM

    John's Avatar

    MacBook Pro, 10.14.6

  16. Support Staff 16 Posted by Damien Elmes on 28 Apr, 2020 02:15 AM

    Damien Elmes's Avatar

    When run from the terminal you need to pass in --input-media-keys=no, which Anki does when it calls mpv

  17. 17 Posted by John on 28 Apr, 2020 02:35 AM

    John's Avatar

    What do you mean "pass in --input-media-keys=no" ?

  18. Support Staff 18 Posted by Damien Elmes on 28 Apr, 2020 02:45 AM

    Damien Elmes's Avatar

    Let's take a step back - are you running mpv from the command line because you're receiving an error when playing audio in Anki? If so, what does it say?

Comments are closed, but you can start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac