I’ve built a hobby media management application in Python on Linux. For video playback (think holiday movies) I recently switched from libvlc to using GStreamer. Today I chased down a strange problem where the application would correctly play sound when invoked from the terminal, but not under PyCharm. After much digging and comparing invocation (PYTHONPATH etc.) I realized I invoked the app by typing python /gallery.py while PyCharm uses python3 /gallery.py.
I’ve tested at the terminal and can reproduce the “no audio” issue by using python3 as the interpreter name. They’re all symlinks to the same base interpreter.
Technical details: my playback Gstreamer pipeline is playbin3 using gtk4paintablesink to embed the video in a widget. I don’t set the audio sink to let playbin3 automatically find one.
My questions are:
- has anyone else come across this or have an idea what’s going on?
- where would I start looking in GStreamer and the Python wrapper to see why it might care about the interpreter name?
My intention is to try to track this down further myself and produce a good bug report if necessary, so I’m not looking for people to investigate unless they already know the answer.