{"id":228,"date":"2012-11-26T23:23:01","date_gmt":"2012-11-26T23:23:01","guid":{"rendered":"http:\/\/www.timokorthals.de\/?p=228"},"modified":"2016-12-28T00:25:55","modified_gmt":"2016-12-27T23:25:55","slug":"playing-videos-in-shell-without-disturbing-cli-outputs","status":"publish","type":"post","link":"http:\/\/www.timokorthals.de\/?p=228","title":{"rendered":"Pi: Playing videos in shell without disturbing CLI outputs"},"content":{"rendered":"<p>Hi there,<\/p>\n<p>I&#8217;m happy with my new Pi and after installing everything I needed, I wanted to watch a nice video. The problem is, that when I wanted to play a movie in letter-box format, the CLI was visible on top and bottom of the movie :-(. So here a nice command, to play movies with a clean black background:<\/p>\n<pre class=\"lang:sh decode:true \" >clear && tput cup 50 50 && omxplayer MOVIE.mkv > \/dev\/null<\/pre>\n<p>Here the explanation:<br \/>\n<strong>clear<\/strong>: Clears the screen<br \/>\n<strong>tput cup 50 50<\/strong>: Puts the disturbing curser to position x:50 y:50 on screen (So anywhere behind the movie)<br \/>\n<strong>omxplayer MOVIE.mkv > \/dev\/null<\/strong>: Playes the movie and send all the CLI outputs to nowhere (\/dev\/null).<\/p>\n<pre class=\"lang:sh decode:true \" >clear && tput civis && omxplayer MOVIE.mkv &> \/dev\/null && tput cnorm<\/pre>\n<p>Will also do it&#8217;s job, by setting the blinking\u00a0curser to invisible. But the problem is, the if you break up the player, the last command wont be executed and so the curser stayes invisible until you bring it back.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi there, I&#8217;m happy with my new Pi and after installing everything I needed, I wanted to watch a nice video. The problem is, that when I wanted to play a movie in letter-box format, the CLI was visible on top and bottom of the movie :-(. So here a nice command, to play movies &hellip; <a href=\"http:\/\/www.timokorthals.de\/?p=228\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Pi: Playing videos in shell without disturbing CLI outputs<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1,5],"tags":[],"_links":{"self":[{"href":"http:\/\/www.timokorthals.de\/index.php?rest_route=\/wp\/v2\/posts\/228"}],"collection":[{"href":"http:\/\/www.timokorthals.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.timokorthals.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.timokorthals.de\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.timokorthals.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=228"}],"version-history":[{"count":2,"href":"http:\/\/www.timokorthals.de\/index.php?rest_route=\/wp\/v2\/posts\/228\/revisions"}],"predecessor-version":[{"id":409,"href":"http:\/\/www.timokorthals.de\/index.php?rest_route=\/wp\/v2\/posts\/228\/revisions\/409"}],"wp:attachment":[{"href":"http:\/\/www.timokorthals.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=228"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.timokorthals.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=228"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.timokorthals.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=228"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}