Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jack plugin freezes mpv. #1

Closed
crocket opened this issue Aug 9, 2019 · 8 comments
Closed

jack plugin freezes mpv. #1

crocket opened this issue Aug 9, 2019 · 8 comments

Comments

@crocket
Copy link

crocket commented Aug 9, 2019

I'm using alsa-plugin-1.1.8

mpv --audio-device=alsa/plug:rawjack /path/to/musicfile freezes mpv.
mpv doesn't freeze only when it plays a wav file.
I have to press Ctrl+C twice to kill mpv.

@aqxa1
Copy link

aqxa1 commented Aug 12, 2019

I've experienced that problem too, but turned out it was a faulty .asoundrc. Try removing .asoundrc, as there should be a default Jack pcm, as of alsa-plugin-1.1.7.

In your example, you could then use:

mpv --audio-device=alsa/jack /path/to/musicfile

You can also configure your .asoundrc to your liking, and point to the built in "jack" pcm.

@crocket
Copy link
Author

crocket commented Aug 12, 2019

> mpv --audio-device=alsa/jack /path/to/musicfile
cannot connect alsa-jack.jackP.17825.0:out_000 to alsa_pcm:playback_1

mpv --audio-device=alsa/plug:jack /path/to/musicfile just freezes.

@trebmuh
Copy link

trebmuh commented Aug 12, 2019

@crocket : did you change /path/to/musicfile to fit with your own configuration?

@crocket
Copy link
Author

crocket commented Aug 12, 2019

Yes, I made it play a youtube video. Replacing it with a local video file doesn't change the outcome.

@aqxa1
Copy link

aqxa1 commented Aug 15, 2019

@crocket Try putting the following in ~/.asoundrc:

pcm.jacktest {                                                                                                                 
        type jack                                                                                                              
        playback_ports {                                                                                                       
                0 system:playback_1                                                                                            
                1 system:playback_2                                                                                            
        }                                                                                                                      
        capture_ports {                                                                                                        
                0 system:capture_1                                                                                             
                1 system:capture_2                                                                                             
        }                                                                                                                      
        hint {                                                                                                                 
                show {                                                                                                         
                        @func refer                                                                                            
                        name defaults.namehint.basic                                                                           
                }                                                                                                              
                description "JACK Audio Connection Kit"                                                                        
        }                                                                                                                      
}

Then:

mpv --ao=alsa --audio-device=alsa/jacktest "filename"

If that works, check that /usr/share/alsa/alsa.conf.d/50-jack.conf exists, and has the same content. Your second error looks like it's using alsa_pcm ports (which don't work for me either) instead of system.

Also, you should be able to just use mpv's JACK output directly, without going through ALSA.

Like this:

mpv --ao=jack "filename"

@crocket
Copy link
Author

crocket commented Aug 15, 2019

Many applications don't support JACK, and I want them to use JACK indirectly.

--audio-device=alsa/plug:jacktest freezes mpv, but --audio-device=alsa/jacktest doesn't.

dosbox requires plug:jacktest

@aqxa1
Copy link

aqxa1 commented Aug 19, 2019

It looks to have been fixed in alsa-plugins-1.1.9, which explains why I wasn't having the issue with the built in jack plugin. See: 613ac0c

So it should be enough to use the built in jack PCM, if you use alsa-plugins-1.1.9 or later.

@crocket
Copy link
Author

crocket commented Dec 15, 2019

I'm going to close it for now. I will reopen a new issue when the issue happens again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants