pystardust / ani-cli

A cli tool to browse and play anime

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No Sound in Video Player (MPV)

AurorinhaBoreal opened this issue · comments

Metadata
Version: 4.8.0
OS: Manjaro - Gnome 45.3
Shell: zsh 5.9*
Anime: Any

It's really not complex. I just run ani-cli, search for any anime that I want to watch, click on them. The mpv Player open, the video is okkay, I can change the resolution, but I simply don't have audio. I tried with the following animes>

  • Naruto | Ep 1
  • Naruto Shippuden | Ep 1
  • Boruto | Ep 1
  • Shigatsu Wa Kimi no Uso | Ep 1
  • Kill la Kill | Ep 6

Already Tried

  • Change my output device
  • Restart my pc
  • Unistall and install again ani-cli
  • Run it as a normal and super user
    image

I saw that someone already opened a similiar issue, but didn't provide enough information to resolve it so here I am.
Steps to Reproduce

  1. Run ani-cli
  2. Choose Any Anime
  3. Choose Any Episode

Expected behavior
Sound Should Work

Additional context
I tried to install it through "git clone [link]", but as I am a newcomer in Linux I eventually install it through AUR
I don't know if it could have any package conflict or something...

*Correction for my shell

sound should work indeed, this is strange.
Can you try playing a youtube video with mpv for testing?

Okkay, I could't find how to make a link work in mpv, but I play a file instead and the problem is the mpv, the file didn't have audio too.

I was searching how to play links in mpv and I didn't found a file called mpv.conf, apparently the audio config is in this file?
image

Sorry for any grammar mistakes, do you know about this? Maybe I should search for any error in the mpv community...

commented

Sorry for the question, but does you audio work at all? (for example when you play a youtube video in a browser)

Go to your sound settings while mpv is playing and check what sources(playback in pavucontrol) you have. Mpv should be in there. Check that it is not muted and is assiges to correct output device.

Another reason might be that something is outputting directly to alsa, which, from my experience, blocks everything else from making any sound.

No, it doesn't apparently! I searched a little and found that maybe it is some problem with the mpv itself. I found some changes that you can do in your mpv.conf file, will test it later and post the resulsts here

commented

If your audio doesnt work at all then its most probably pulseaudio/alsa or pipewire/alsa problem.

Yeah, I think it was exactly that!

I found out that for some reason, when I installed the mpv, the mpv.conf wasn't created.

So, I had to created manually.

1 - I installed the MPV through AUR
2 - Created the mpv.conf using nano ~/.config/mpv/mpv.conf
3 - Pasted the following in the mpv.conf:

# ===== Audio =====
ao=alsa
audio-device=auto

Apparently just sets the audio for alsa as @Nannk mentioned and sets the output device for automatic>

After that it worked perfectly! Any files that I open with it, plays audio and the anime that I tested in ani-cli worked too!

It is really weird that this wasn't created automatically though...

Just want to thanks @Nannk and @port19x for the help!

Gonna close this Issue! Have a good weekend you two! <3