pystardust / ani-cli

A cli tool to browse and play anime
GNU General Public License v3.0
7.37k stars 529 forks source link

No Sound in Video Player (MPV) #1283

Closed AurorinhaBoreal closed 4 months ago

AurorinhaBoreal commented 4 months ago

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>

Already Tried

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

port19x commented 4 months ago

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

AurorinhaBoreal commented 4 months ago

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...

Nannk commented 4 months ago

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.

AurorinhaBoreal commented 4 months ago

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

Nannk commented 4 months ago

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

AurorinhaBoreal commented 4 months ago

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...

AurorinhaBoreal commented 4 months ago

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

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