VLC Simulation in command line without video
The link that helped me to setup VLC in redhat is the following one, we just need to follow the instructions:
Now the command that will play the network stream content is
:
vlc http://172.121.122.52/VOD/teacher.m3u8
With this command you need to have x-server setup to view
the video file you requested. There is a another way to just download the
content and play the video without actually invoking the display system, the
tool is “cvlc”
cvlc http://172.121.122.52/VOD/teacher.m3u8
--sout '#display{novideo,noaudio}' vlc://quit
so this command will not initialize audio and video module
for the requested content. The interesting feature is that you can actually
playing the content without viewing it which helps us to simulate multiple
clients running at the same time. I was able to run 100 VLC command line payer
to play the stream content without having any problem.
We can use this simple script to simulate that:
#!/bin/sh
for x in {1..100}
do
cvlc http://172.121.122.52/VOD/teacher.m3u8
--sout '#display{novideo,noaudio}' vlc://quit &
done
to verify that all of the vlc player is running simply look
for the vlc keyword in your process list as soon as you run the above
command/script:
watch “ps –ef | grep vlc”
watch “ps –ef | grep vlc | wc –“
It will also close the command line vlc player after
playing the video automatically. I believe we can initiate more vlc player
depending on our need and considering system capacity.
Comments
Post a Comment