# How to display video in PythonQt?

**URL:** <https://discourse.slicer.org/t/how-to-display-video-in-pythonqt/17564>\
**Category:** Development\
**Created:** [May 11, 2021, 7:48am UTC](https://discourse.slicer.org/t/how-to-display-video-in-pythonqt/17564 "2021-05-11T07:48:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chintha\_Siva\_Prasad](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chintha_siva_prasad/32/7766_2.png) [@Chintha\_Siva\_Prasad](https://discourse.slicer.org/u/Chintha_Siva_Prasad)\
**Post date:** [May 11, 2021, 7:48am UTC](https://discourse.slicer.org/t/how-to-display-video-in-pythonqt/17564/1 "2021-05-11T07:48:25Z")

</div>

How can I display a video in Slicer through PythonQt?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [May 13, 2021, 1:09pm UTC](https://discourse.slicer.org/t/how-to-display-video-in-pythonqt/17564/2 "2021-05-13T13:09:38Z")

</div>

You can display animated gifs, and some videos using QVideo:

```python
movie = qt.QMovie("c:/path/to/myvideo.gif")
label = qt.QLabel()
label.setMovie(movie)
label.show()
movie.start()

```

You can load and replay mkv videos (compressed with VP9 or AV1) as volume sequences in slice views using SlicerIGSIO extension.

You can probably display videos using `slicer.qSlicerWebWidget()`. It is a Chromium web browser window, so it has all the infrastructure to replay videos, but I’m not sure what codecs are installed.

---

<div class="post-metadata">

**Author:** ![lhefeng662](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lhefeng662/32/68064_2.png) [@lhefeng662](https://discourse.slicer.org/u/lhefeng662)\
**Post date:** [May 29, 2025, 9:25am UTC](https://discourse.slicer.org/t/how-to-display-video-in-pythonqt/17564/4 "2025-05-29T09:25:34Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/d/4db9a41a217cecb418278761cac7f038d711e75f.png)  
I am using sequence(or videoUtil) to load mkv videos, but the videos can only be displayed as volumes and cannot be fully watched. What should I do
