FFmpeg, ffplayer; No sounds with game Katrain

Hi. When I play the game Katrain, I have no sounds of stones being placed on the board. I have had this issue since the upgrade to Jammy and have posted to Discord a long time before this post. I found the following article on this website discussing how to install FFmpeg and libavcodec; Synaptic says that package of libavcodec-extra and libavcodec-extra58 will be removed if I try to install libavcodec58. The libavcodec58 seems to be precursers to the other two packages. On this machine, there are no other sound issues, other than sometimes having to open the PulseAudio Volume Control because I have sound through the hdmi rather than internal. So I want to be careful not to mess the machine up when it is good.

I took the following screenshot of the error reported by the terminal when Katrain was supposed to have sounds.

This article I found on this site I was thinking that I don't need to follow the steps because I already have ffmpeg installed (see Synaptic screenshot) and if I try to add libavcodec-58, then the other *-extra58 and *-extra will be removed.

I installed Katrain with Kivy--my last post was about solving the installation problem for the game using the command of kivy.
Does anyone have any ideas for me? The terminal says patches would be welcome, but I don't want to uninstall packages that may be needed; as I said, everything else is good.

It is a bug in katrain/kivy, according to this page

I am getting the same on linux, as well as font problems in Korean. Unfortunately this is a case of kivy shipping with unstable/misconfigured backends and then blaming said backends.
e.g. kivy/kivy#6601 kivy/kivy#6512
KIVY_AUDIO=[some other backend] as described here: Controlling the environment — Kivy 2.2.1 documentation might work

According to this link, you might have some success with the following instructions:

In case the sound is not working, or there is no available wheel for your OS or Python version, try building kivy locally using:

pip3 uninstall kivy 
pip3 install kivy --no-binary kivy

You can now start KaTrain by running python3 -m katrain

2 Likes

Your program log suggests that error is coming from ffpyplayer module.

The solution at the moment is to rollback ffpyplayer to version 4.3.5 :
pip3 install 'ffpyplayer==4.3.5' --force-reinstall

As a side note, installing Python packages globally using pip3 is not recommended. You shall study a concept of virtual environment in Python and install your Python packages inside virtual environment(s).

3 Likes

Hi. When I try the pip3 command to install ffplayer 4.3.5, I get this error.

My online searches always pull up ffmpeg. I tried Synaptic, but there was no ffplayer package.

your screenshot seems to be missing the py in @ironfoot 's command

pip3 install 'ffpyplayer==4.3.5' --force-reinstall
4 Likes

Glad it worked but the solution to your question was provided by @ironfoot.
Not sure how to change it, maybe if solution arrows show up in post click on it under the correct solution. That's why it is best to copy the posted command to eliminate errors. Changing accepted solution is doable and should go to the one providing the solution.

3 Likes

Hi mendy. Thanks for the error-catching. I will copy-and-paste from now on. I don't think I marked a solution when I saw your post about the miss appearing--I only marked a solution when browsing this site yesterday and looking for topics of mine that didn't have a solution marked. I will try to mark as solution ironfoot's post. Thanks again.

4 Likes