UbuntuサーバーのVLCスクリプト

UbuntuサーバーのVLCスクリプト

次のように、3つのvlcコマンドを同時に(Ubuntu Server 14.04で)実行する小さなスクリプトが必要です。

#!/bin/sh
cvlc -vvv v1 --sout "#transcode{vcodec=h264,vb=999,acodec=mp3,ab=128,deinterlace channels=2,samplerate=44100}:standard{mux=ts,dst=x.x.x.x:5656,access=http}" 
cvlc -vvv v2 --sout "#transcode{vcodec=h264,vb=999,acodec=mp3,ab=128,deinterlace channels=2,samplerate=44100}:standard{mux=ts,dst=x.x.x.x:5657,access=http}" 
cvlc -vvv v3 --sout "#transcode{vcodec=h264,vb=999,acodec=mp3,ab=128,deinterlace channels=2,samplerate=44100}:standard{mux=ts,dst=x.x.x.x:5658,access=http}" 

3つのVLCコマンドを実行するスクリプトの完全な方法が必要です(すべてのコマンドは同時にバックグラウンドで自動的に実行する必要があります)。

また、上記のスクリプトが実行されているかどうか(上記のスクリプトのすべてのvlcコマンドが実行されているかどうか)を確認し、停止または競合している場合は、再起動するために別のスクリプトが必要です。

事前にありがとう

砂の塔

ベストアンサー1

screenを使用してバックグラウンドでbashスクリプトを実行できます。

以下の関連記事を確認してください。

https://www.howtoforge.com/linux_screen

http://www.tecmint.com/screen-command-examples-to-manage-linux-terminals/

https://www.rackaid.com/blog/linux-screen-tutorial-and-how-to/

あなたはそれを使用することができます監視装置コマンドを実行し続けます。サービスがクラッシュすると起動します。

おすすめ記事