cannot open vlc from matlab using system command
3 次查看(过去 30 天)
显示 更早的评论
cannot open vlc from matlab using system command i used this version of matlab: MATLAB Version: 9.0.0.341360 (R2016a) MATLAB License Number: rutracker.org Operating System: Linux 4.13.16-100.fc25.x86_64 #1 SMP Mon Nov 27 19:52:46 UTC 2017 x86_64 Java Version: Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot™ 64-Bit Server VM mixed mode
the code is as follows: >>[status, msg] = system('"/usr/bin/vlc" test.y4m &') Result given is as follows:
status =
0
msg =
''
My expectation:
Invoking a VLC that will automatically play the file. But the Vlc is not displaying.
What is the problem pls. thanks
4 个评论
Rik
2018-5-6
Please don't use the 'answer' field for comments.
You can use the exact code Chad posted here. You used double quotes (") inside the command. That is not usually needed under Unix systems. The system function should send the entire string (so all text between the single quote marks) to the terminal. If the code works there, it should work in this function as well.
Walter Roberson
2018-5-8
The "" are not a problem in Unix. Using "" around a path is still the general form on Unix, as paths on Unix can contain spaces and other special characters, Using '' inside would be more robust but is a bit of a nuisance
[status, msg] = system('''/usr/bin/vlc'' test.y4m &')
回答(4 个)
Wick
2018-5-6
[status, msg] = system('/usr/bin/vlc test.y4m &')
Note the single quotes on either end of the command to be sent to the prompt. In your statement of the problem you have single & double quotes. In your above answer you have no quotes at all.
Highlight, copy, and paste what I wrote above into MATLAB and see if that works. If it doesn't, highlight and copy everything inside of the single quotes (not including those quotes) and paste that to a terminal. If that doesn't work, the problem is not in MATLAB but in the UNIX command.
Nagarjuna Manchineni
2018-5-8
Hi Ezekiel,
I was able to launch the VLC player and play the video successfully by using the 'system' command on MATLAB R2018a. Can you try once using that release?
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!