Im using PyQt5 for my program, one of its functions is viewing an mp4 file (h264 or h265). I'm using a videoItem in a graphicsView since it allows me to rotate the video. My script works fine in Pycharm and worked fine when I created an executable through pyinstaller. I noticed problems on a different PC and started installing codecs to try and fix the issue. Somehow it now doesn't work on my PC either, I get the following error on all systems. However, the file still plays fine on pycharm.
DirectShowPlayerService::doSetUrlSource: Unresolved error code 0x80004005 (Unspecified error)
The url is set as follows. The only difference in the url between the pycharm script and the executable is an additional folder (dist). Any idea how I can fix this error?
content = QtMultimedia.QMediaContent(QUrl.fromLocalFile(file))
my spec file:
# -*- mode: python -*-
block_cipher = None
options = [ ('v', None, 'OPTION'), ('W ignore', None, 'OPTION') ]
a = Analysis(['\\'],
pathex=['C:\\Users\\tim-8\\PycharmProjects\\qttest\\venv'],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
runtime_tmpdir=None,
console=True )
Edit:
Since my script requires rotating the video, the videoplayer is based on the following code: QGraphicsVideoItem
User contributions licensed under CC BY-SA 3.0