파이썬 mp4 재생하기
2024. 5. 6. 11:43ㆍ파이썬
https://oceancoding.blogspot.com/2020/07/blog-post_22.html
from PyQt5.QtWidgets import QApplication
from PyQt5.QtMultimedia import QMediaPlaylist, QMediaPlayer, QMediaContent
from PyQt5.QtCore import QUrl
import sys
if __name__ == '__main__':
app = QApplication(sys.argv)
playlist = QMediaPlaylist()
url = QUrl.fromLocalFile('a.mp4')
playlist.addMedia(QMediaContent(url))
player = QMediaPlayer()
player.setPlaylist(playlist)
player.play()
sys.exit(app.exec_())
TS
- DirectShowPlayerService::doRender: Unknown error 0x80040266
코덱을 설치하면 해결됨
https://www.codecguide.com/download_k-lite_codec_pack_basic.htm
https://blog.naver.com/PostView.naver?blogId=dudrb523&logNo=222317681290
'파이썬' 카테고리의 다른 글
QR Code 생성 (0) | 2024.06.18 |
---|---|
mp4 특정 부분 실행하기 (1) | 2024.05.06 |
Python 사용자 계정 및 홈디렉토리 정보 가져오기 (0) | 2021.04.11 |
TypeError: a bytes-like object is required, not 'str' (0) | 2021.03.28 |
subprocess에서 결과값 받기 (0) | 2021.03.28 |