{"id":546,"date":"2011-01-28T00:30:38","date_gmt":"2011-12-20T21:51:50","guid":{"rendered":"http:\/\/kraftek.com\/blog\/setting-up-a-rtsp-vlc-streaming-server\/"},"modified":"2011-01-28T00:30:38","modified_gmt":"2011-12-20T21:51:50","slug":"setting-up-a-rtsp-vlc-streaming-server","status":"publish","type":"post","link":"\/blog\/index.php\/setting-up-a-rtsp-vlc-streaming-server\/","title":{"rendered":"setting up a RTSP vlc streaming server"},"content":{"rendered":"<p>I wanted to watch my movies remotely, so i used h264 for video and aac for audio, and built a vlc config to startup a<br \/>\ndaemonized RTSP server.I built a script to create the config file by scanning all my videos, and then start the vlc<br \/>\ndaemon :). Here it is:<br \/>\n#!\/bin\/ksh<br \/>\nps -ef | grep -i vlc | grep -v grep |awk &#8216;{ print $2 }&#8217; |while read p;do<br \/>\nkill $p<br \/>\ndone<br \/>\n(<br \/>\nx=0<br \/>\nfind \/disk2\/VIDEO -type f | egrep -i &#8216;avi|mpg&#8217; |while read v;do<br \/>\n#&#8212;- if not using x264<br \/>\n# echo &#8220;new $x vod enabled&#8221;<br \/>\n# echo -n &#8220;setup $x input &#8220;file:\/\/$v&#8221; output&#8221;<br \/>\n#&#8212;- if using x264<br \/>\necho &#8220;new $x vod&#8221;<br \/>\necho -n &#8220;setup $x input &#8220;file:\/\/$v&#8221; enabled output&#8221;<br \/>\n#&#8212;- low quality<br \/>\n#echo &#8221; #transcode{vcodec=mp4v,acodec=mp4a,width=640,height=480,fps=12,vb=128,ab=8}&#8221;<br \/>\necho &#8221; #transcode{vcodec=h264,acodec=mp4a,width=640,height=480,vb=100,ab=4}&#8221;<br \/>\n#&#8212;- mid quality<br \/>\n#echo &#8221; #transcode{vcodec=mp4v,acodec=mp4a,scale=.5,fps=10,vb=256,ab=64}&#8221;<br \/>\n#echo &#8221; #transcode{vcodec=h264,acodec=mp4a,scale=.5,fps=12,vb=256,ab=64}&#8221;<br \/>\n#&#8212;- high quality<br \/>\n#echo &#8221; #transcode{vcodec=mp4v,acodec=mp4a,scale=.5,fps=10,vb=512,ab=64}&#8221;<br \/>\n#echo &#8221; #transcode{vcodec=h264,acodec=mp4a,scale=.5,fps=12,vb=512,ab=128}&#8221;<br \/>\necho &#8221; &#8221;<br \/>\nx=$(($x+1))<br \/>\ndone<br \/>\n) &gt; \/etc\/v.config<br \/>\nnohup cvlc &#8211;vlm-conf \/etc\/v.config -I telnet &#8211;telnet-password vl &#8211;rtsp-host 0.0.0.0:564 &amp;<br \/>\nTry it, and enjoy \ud83d\ude42<br \/>\n38\/433<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I wanted to watch my movies remotely, so i used h264 for video and aac for audio, and built a vlc config to startup a daemonized RTSP server.I built a script to create the config file by scanning all my videos, and then start the vlc daemon :). Here it is: #!\/bin\/ksh ps -ef | [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-546","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/546","targetHints":{"allow":["GET"]}}],"collection":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=546"}],"version-history":[{"count":0,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/546\/revisions"}],"wp:attachment":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=546"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=546"},{"taxonomy":"post_tag","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=546"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}