File Exchange

image thumbnail

VideoWindow

version 1.1.0.0 (8.9 KB) by Tianxiao
A simple demo to use activex control in matlab to play video

7 Downloads

Updated 01 Oct 2016

View Version History

View License

VideoWindow(filename) will run the demo. It is written as a class. Outside matlab function and script can add event listener to communicate with it. This file only runs in windows computer as it uses activex control component.
Other way to use it:
obj=VideoWindow($video_filename)
Using windows media player activex control to play the video file
obj=VideoWindow($video_filename,$actx_opt)
1,obj=VideoWindow($video_filename,'VLC'), using VLC activex control to play the video file. It is worthwhile to note that you have to install VLC according to the matlab version. If matlab is 32-bit version, try to install vlc 32 bit. If matlab is 64-bit version, try to install vlc 64 bit. You can verify the usability of VLC by typing 'actxcontrollist' in matlab command line.
2,obj=VideoWindow($video_filename,'WMP'), using windows media player to play the video file
After you obtain the object returned from VideoWindow, you can control the video playing using :
obj.play
obj.pause
obj.stop
obj.PlaySpeed=N (for example, 2 fast forward, 1/2 slow down)
obj. CurrentPositionRatio= 1/K (seek the video in relative position)

Cite As

Tianxiao (2021). VideoWindow (https://www.mathworks.com/matlabcentral/fileexchange/48957-videowindow), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (1)

Stavros Skouras

Hi Tianxiao,

Thank you for your contribution!

Can you adapt your code so that you can control/change the playback speed during the playback of a video file?

An example of this would be very useful!

Best wishes,
Stav

MATLAB Release Compatibility
Created with R2014a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!