How do I start or open a video file from matlab

4 ビュー (過去 30 日間)
Rached
Rached 2014 年 4 月 23 日
回答済み: Karan Singh 2025 年 2 月 19 日
I want to run open or start a video file (.mp4) from Matlab.
I know how to do it
on Windows OS:> system('start videofile.mp4')
on Mac OS :>system('open videofile.mp4')
but I need to do it on Linux OS ?

回答 (1 件)

Karan Singh
Karan Singh 2025 年 2 月 19 日
Hi @Rached,
A bit (lot) late but this might be helpful for those comming across the same doubt. To open or play an ".mp4" video file from MATLAB on a Linux system, you can use the "system" function to call an external video player. A commonly available video player on Linux is "xdg-open", which opens a file with its default associated application. Here's how you can do it:
system('xdg-open videofile.mp4');
Karan

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by