vlc.py returns ""cannot initialize COM"
Posted: 19 Oct 2018 23:54
I've written a PyQt4 app that uses VLC. I've primarily developed it on a Linux machine but it's intended for use on Win7-64 host.
When run on Linux, works fine. When run on Win7, the exact same code returns the following error message:
>> plugin path: C:\Program Files\VideoLAN\VLC
>> Warning: option --plugin-path no longer exists.
>> Warning: option --plugin-path no longer exists.
>> [0000000000349ed0] mmdevice audio output error: cannot initialize COM (error 0x80010106)
>> [000000000c0724c0] mmdevice audio output error: cannot initialize COM (error 0x80010106)
On Win7, app launches fine, but when it attempts to load & play a movie in a PyQt4 window the error above is printed.
Again, on Linux, this all works. Movie is played back fine in the PyQ4 window.
It's only on Win7 that this fails. It's not related to PyQt4.
VLC version on Win7 is latest version, 3.0.4. The normal VLC app (vlc.exe) works fine, loads & plays movies fine.
Here's a snippet of the relevant code:
self.instance = vlc.Instance('--no-xlib', '--no-audio', '--mouse-hide-timeout=3')
self.mediaplayer = self.instance.media_player_new()
Just recently added the '--no-audio' flag hoping this might fix the issue but it did not.
Strictly speaking, I don't need to hear the audio really, just need this to play the video,etc.
I've searched the forum here and found two mentions of 'cannot initialize COM' but they don't seem to relate to this issue.
The Win7-64 host does not have an audio card, but uses the onboard sound chip,etc.
All other apps on the computer (Spotify,VLC,RV) produce normal audio output.
Does anyone have any advice about how to resolve this? Are there add'l flags I should add on the 'Instance' line? A Preferences setting?
Thank you very much,
When run on Linux, works fine. When run on Win7, the exact same code returns the following error message:
>> plugin path: C:\Program Files\VideoLAN\VLC
>> Warning: option --plugin-path no longer exists.
>> Warning: option --plugin-path no longer exists.
>> [0000000000349ed0] mmdevice audio output error: cannot initialize COM (error 0x80010106)
>> [000000000c0724c0] mmdevice audio output error: cannot initialize COM (error 0x80010106)
On Win7, app launches fine, but when it attempts to load & play a movie in a PyQt4 window the error above is printed.
Again, on Linux, this all works. Movie is played back fine in the PyQ4 window.
It's only on Win7 that this fails. It's not related to PyQt4.
VLC version on Win7 is latest version, 3.0.4. The normal VLC app (vlc.exe) works fine, loads & plays movies fine.
Here's a snippet of the relevant code:
self.instance = vlc.Instance('--no-xlib', '--no-audio', '--mouse-hide-timeout=3')
self.mediaplayer = self.instance.media_player_new()
Just recently added the '--no-audio' flag hoping this might fix the issue but it did not.
Strictly speaking, I don't need to hear the audio really, just need this to play the video,etc.
I've searched the forum here and found two mentions of 'cannot initialize COM' but they don't seem to relate to this issue.
The Win7-64 host does not have an audio card, but uses the onboard sound chip,etc.
All other apps on the computer (Spotify,VLC,RV) produce normal audio output.
Does anyone have any advice about how to resolve this? Are there add'l flags I should add on the 'Instance' line? A Preferences setting?
Thank you very much,