{"id":330,"date":"2008-08-08T15:01:24","date_gmt":"2008-08-08T22:01:24","guid":{"rendered":"http:\/\/www.stevenbrown.ca\/blog\/?p=330"},"modified":"2008-08-08T15:01:24","modified_gmt":"2008-08-08T22:01:24","slug":"playing-video-from-your-linux-pc-on-your-wii","status":"publish","type":"post","link":"https:\/\/www.stevenbrown.ca\/blog\/archives\/330","title":{"rendered":"Playing Video from your Linux PC on your Wii"},"content":{"rendered":"<p>Maybe you&#8217;ve watched youtube videos on your Wii using the Internet Channel or the promo videos on the Nintendo Channel and you thought it would be cool to watch other videos from your (Linux) PC.  I know I did.  But I wasn&#8217;t sure if it would be possible in a reasonable quality.  Since then, I&#8217;ve decided the quality was unacceptable for me&#8230; But I&#8217;ll try to quickly document what I did for others.<\/p>\n<p>You basically have two options: Put a decompressed copy of your video on your SD card and watch it in the Photo Channel <em>OR<\/em> watch it streaming from your PC over your network via the Internet Channel (like youtube).<\/p>\n<h3>1. Playing it directly off your SD card<\/h3>\n<p>Instructions for how to convert the video to play in the Photo Channel can be found here:<br \/>\n<a href=\"http:\/\/icculus.org\/~dolson\/wii-video-conversion.html\">http:\/\/icculus.org\/~dolson\/wii-video-conversion.html<\/a><br \/>\n<em>HOWEVER<\/em>, 3\/4 of an hour of <em>decent<\/em> quality video will cost 1+ gigabytes, due to the format.  The quality will be maintained, but  unless you have a 2GB card and\/or small videos, this may not be feasible.  I couldn&#8217;t get my 45min (350MB originally, I think) file to fit on my 1GB SD card in the appropriate format, so I gave up on this method.  I was more interested in browsing multiple files on my PC, anyways.<\/p>\n<p>On to the other option&#8230;.<\/p>\n<h3>2. Stream it from your computer<\/h3>\n<p>For this method, you need a few more things:<\/p>\n<ul>\n<li>A home PC accessible from the network via your Wii<\/li>\n<li>Videos you want to play need to be converted to Flash video (FLV).  To do this, you will need ffmpeg.<\/li>\n<pre lang=\"bash\">sudo aptitude install ffmpeg<\/pre>\n<li>Web server running on your home PC.  I&#8217;m using Apache on an Ubuntu PC.<\/li>\n<pre lang=\"bash\">sudo aptitude install apache2 apache2-utils<\/pre>\n<\/ul>\n<p>Most of what follows can be configured, but I&#8217;m going to try and follow what&#8217;s default in Ubuntu (if I can remember correctly).<\/p>\n<p>To keep things clean, I enabled user directories.  To do this, you must enable the <code>userdir<\/code> mod in apache:<\/p>\n<pre lang=\"bash\">sudo a2enmod userdir<\/pre>\n<h4>What are user directories?<\/h4>\n<p>This is a directory (usually called &#8220;public_html&#8221;) that every user can use to publish things (like webpages) on the webserver from their home directory.  For me, my home directory is<code> \/home\/steve\/ <\/code> so my user directory is <code> \/home\/steve\/public_html\/ <\/code>.  It is optional, so I have to create it if it doesn&#8217;t already exist.<\/p>\n<pre lang=\"bash\">mkdir ~\/public_html\/  <\/pre>\n<p>When accessing these user directories via a web browser (Internet Channel), you must enter your Home PC&#8217;s IP address, followed by a tilde (~) and your username.   <\/p>\n<p><code>\"http:\/\/your.pc's.ip.address\/~username\/\"<\/code><\/p>\n<p>So accessing my <code>public_html<\/code> directory is done as follows: <code>http:\/\/192.168.0.99\/~steve\/ <\/code>.  (Note that <code>192.168.0.99<\/code> is a <em>private<\/em> IP address and unless your computer is set up on your local network with the same IP <em>AND<\/em> your username is &#8220;steve&#8221;, this won&#8217;t work for you. \ud83d\ude09 )<\/p>\n<p>Test it, and make sure you&#8217;ve installed Apache and set up user directories correctly.<\/p>\n<h4>Flash Video Player<\/h4>\n<p>Now you need a compatible flash player to embed into your webpage.  Wii&#8217;s Internet Channel is based on Opera, and includes Flash version&#8230;. 7?! Doh!  Newer FLV players won&#8217;t work!  Also, Full-screen mode isn&#8217;t possible so  you want the video to be as large as possible, or to be easily zoomed in and centred &#8211; yup, it&#8217;s a pain.  The best player I found for this was <a href=\"http:\/\/flv-player.net\/\">FLV Player<\/a>, but feel free to look around for more.  \ud83d\ude09  Now put your player of choice (I chose <code>player_flv_maxi.swf<\/code>) in <code>public_html<\/code> somewhere so that it can be included in your webpage.<\/p>\n<h4>Example Preparing Video<\/h4>\n<p>An example command for converting your video to FLV using ffmpeg:<\/p>\n<pre lang=\"bash\">ffmpeg -i input_video.avi -ar 22050 -b 1280 -s 320x240 output.flv<\/pre>\n<h4>Example Webpage<\/h4>\n<p>An example of an html page containing a video:<\/p>\n<pre lang=\"html4strict\">\r\n< !DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.01 Transitional\/\/EN\">\r\n<html xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\r\n<head>\r\n\r\n\t<title>Wii Video Test<\/title>\r\n\r\n\t<style type=\"text\/css\">\r\n\t\tbody { background-color: #000; padding: 0 20px; color:#000; font: 13px\/18px Arial, sans-serif; }\r\n\t\ta { color: #360; }\r\n\t\th3 { padding-top: 20px; }\r\n\t<\/style>\r\n\r\n<\/head>\r\n<body>\r\n\r\n    <object type=\"application\/x-shockwave-flash\" data=\"player_flv_maxi.swf\" width=\"624\" height=\"352\">\r\n        <param name=\"movie\" value=\"player_flv.swf_maxi\" \/>\r\n        <param name=\"allowFullScreen\" value=\"true\" \/>\r\n        <param name=\"FlashVars\" value=\"flv=my_converted_video.flv&amp;autoload=1\" \/>\r\n    <\/object>\r\n\t\r\n<\/body>\r\n<\/html>\r\n<\/pre>\n<p><strong>Note<\/strong>: both <code>player_flv_maxi.swf<\/code> and <code>my_converted_video.flv<\/code> must be in the same directory as this html page.  For testing purposes, call this index.html and put it in your <code>public_html<\/code> directory.<\/p>\n<p>That&#8217;s it, I think.  Again, I wasn&#8217;t really satisfied with the compression of FLVs and the frame rate of bigger videos, so I ended up not using either of these two methods.  I suppose a media PC, Apple TV, or PS3 or something would be better suited &#8211; none of which I have.  \ud83d\ude42<\/p>\n<h3>Related<\/h3>\n<ul>\n<li><a href=\"http:\/\/www.ubuntugeek.com\/convert-flv-google-videos-to-mpg-using-ffmpeg.html\">ffmpeg and FLVs<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Maybe you&#8217;ve watched youtube videos on your Wii using the Internet Channel or the promo videos on the Nintendo Channel and you thought it would be cool to watch other videos from your (Linux) PC. I know I did. But I wasn&#8217;t sure if it would be possible in a reasonable quality. Since then, I&#8217;ve&hellip; <a class=\"more-link\" href=\"https:\/\/www.stevenbrown.ca\/blog\/archives\/330\">Continue reading <span class=\"screen-reader-text\">Playing Video from your Linux PC on your Wii<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[3,11],"tags":[172,171,122,42,30,124,20],"class_list":["post-330","post","type-post","status-publish","format-standard","hentry","category-geek","category-projects","tag-apache","tag-ffmpeg","tag-flash","tag-how-to","tag-ubuntu","tag-video","tag-wii","entry"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4jEMb-5k","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/posts\/330","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/comments?post=330"}],"version-history":[{"count":0,"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/posts\/330\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/media?parent=330"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/categories?post=330"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.stevenbrown.ca\/blog\/wp-json\/wp\/v2\/tags?post=330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}