anrayliu / pyvidplayer2

Reliable, easy, and fast video playing in Python
MIT License
35 stars 10 forks source link

Correct audio device is not detected on Linux using PipeWire+PulseAudio or PipeWire+Jack #35

Closed Poikilos closed 2 months ago

Poikilos commented 2 months ago

As discussed at PR #33

Hey, thanks for the pull request!

Before I merge it, I would like to ask a few questions because I'm too well versed in this.

Firstly, are you on linux? I don't have a linux machine right now and am unable to test pyvidplayer2 there. If so, how was the experience? Did everything work properly?

Yes, it is tested on:

Second, why did you make a custom logger instead of using the default warnings logger?

That was mostly for having info messages shown conditionally. It operated similarly to Python's own logging module, but for backward compatibility I didn't import that. I didn't notice until I was finished that you use the warnings module, which I never used before. Anyway:

And lastly, I'm still confused about the features you've added.

The separate_wave feature was mostly for testing, so I could play audio samples without video. However, after seeing your comments and questions, I looked at the code further, and much more code would be necessary to actually synchronize the separate audio file and to get it working with pygame audio (I only tested it with PyAudio mode, and didn't test it with rewind etc. which wouldn't have worked). Therefore:

Can you explain a little bit more what pulse is?

Again, thanks for your contribution. I would love to collaborate!

I'm very glad to help! I have been searching for fast and accurate video scrubbing in Python for a long time, and look forward to using it to make applications.

anrayliu commented 2 months ago

Merged!