Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

FLV to the Wii via JW's Media Player (Working!)

13 replies [Last post]

Hello all,

After a lot of time perusing and fussing about trying to get an internal server to stream FLVs to a Wii, I finally figured out how to do it.

Progressive streams will not work because of the limited amount of memory on the Wii. It will fill up and sieze playback forcing you to start over. The only solution to this was to set up a genuine Flash Media Server to handle incremental streaming instead of dropping the whole thing into memory.

After looking over the incredible amount of information about Streaming and, consequentially noticing how little correct information there was out there, I finally got my answers and streamed "Big Love" episode 1 from a computer on my internal network to my Wii.

Using Red5 and JW's player, I got it all together. I'll post the minor changes I made to the basic mediaplayer.html code to get it working. This is for the single FLV player, though I've gotten it to work on both.

CODE:
var so = new SWFObject('mediaplayer.swf','mpl','640','600','7');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','true');
so.addVariable('displayheight','480');
so.addVariable('location','rtmp://localhost/oflaDemo');
so.addVariable('id','Transformers.flv');
so.addVariable('type','rtmp');
so.addVariable('width','640');
so.addVariable('largecontrols','true');
so.addVariable('bufferlength','20');
so.addVariable('shuffle','false');
so.addVariable('volume','100');
so.addVariable('usefullscreen','false');
so.addVariable('usekeys','false');

I believe the exclusion of the usefullscreen variable allowed it to be playable on the Wii, not including any Flash 9 code. (But I didn't try it the other way.)

Also, this is the correct use of the ID and Location tags as well as what I found to be crucial, the type tag. The type tag seemed to be the key for me getting it to stream, but it could have been not tacking on the .flv on the end of the file. (Something that people said you didn't need.)

In any case, this format works on the internal PC. Make sure to change localhost to your internal network IP address to get it to work.

Happy streaming!

And ... THANK YOU JW for being the only worthwhile source on the net for any of this information. I knew it was possible to stream to the Wii, but it was only your site that gave me enough information to do it. :)

@elcman,

WOW!

Thanks for the info. Streaming to the Wii is how I originally found the JW Players. Since then I've gotten diverted too many times.

So, I'm putting everything aside and going back to that project.

I noticed that your display area is 640x480, what is the native resolution of the video file that you streamed and how (codecs, settings, etc.) was it encoded?

I decided to use a large enough viewing area that I wouldn't have to zoom in or out when I first viewed the page.

Zooming has weird effects on the Wii with this player, chopping the video and resizing the player each time. It's annoying, so I wanted to max the size so I wouldn't have to futz with it.

After that, I use the "Fit to Player" flag that resizes everything. I know this is inefficient, but I use it anyway.

I use the Wii Video 9 converter (from www.redkawa.com) for the conversion. However, I think I might want to try maximizing the quality as his defaults are a touch low. (Avoid the Wii Media Center X from Red Kawa for now. It won't play past 5 minutes if you haven't already run into that.)

I also use the Riva FLV encoder, I'm not sure how good the quality compares to the actual Adobe encoder, but I'm not that worried.

I'll be running more tests to find out the optimum settings are. I need to play around with source and destination resolutions to see if I can find the best replay on the Wii.

Thanks for the interest! I was surprised no one overtly mentioned streaming to the Wii on these forums, so I didn't know if I was alone in this pursuit. :)

Good to see I'm not!

--
elcman

@elcman,

Let us know what encoder ans settings work for you. As soon as I have some good video I'll post my settings.

There are a lot of posts about Wii video. Enter "Wii" in the "Search these forums" to see them.

Yeah, I originally started with RedKawa, but quickly moved to Red5 and the JW Player. Then I got stalled waiting for the Opera browser upgrade and never got back to it.

The settings that I have with the Wii Video 9 are the native FLV settings profile that come with the tool.

The bitrate is 1024 and the audio is MP3 encoded. The rest of the advanced settings I use the defaults for now. (Just got it working last night at 11PM, so I need to do a lot more...) I don't change the source framerate and, depending on how big it is, I will pare down the resolution to something more resembling "480p". I want to keep them as high as possible, I don't know if there is a point where that would bog down the system.

I might change the resolution to sit at the 640x480 that I have the player set to, but for now, I enlarge it through the player. This might be why I was seeing some artifacts during playback. Again, I'm not sure at what point that might bog down playback.

I want to make it seem like I am as close to watching regular broadcast TV as possible without breaking the system.

If you have recommendations on player size (to fit a regular TV screen), resolution and framerate, please let me know. I've had a lot of experience with the old FlaskMPEG ("Pre-easy DVD ripping") stuff and also plenty with VirtualDub, but I'm hazy on advanced settings that might increase the broadcast quality.

Open to any suggestions. :)

--
elcman

Ultimately I want to stream 720x3nn-4nn which is in avi xVid right now. I hope to convert on-the-fly, but don't know if the Wii/Opera can handle widescreen.

Will,

I saw your previous Wii entry with this info:

"So, by trial and error, I discovered that player dimensions of 670x525 give a full screen display without any adjustment or zooming."

I'm going to try converting this to resolution for my videos. Since the only reason I AM converting is for the Wii, I think this will likely be the best handling of it.

I don't want to upconvert smaller files to bigger ones, but I'll try it out for the meantime.

Also, from Wombat's post, I'm going to up the Bitrate, though it might force me to decrease my buffer size from 20 Seconds as I'll still be filling up the Wii memory faster than I want to be. I'm not sure when I'll hit the buffering limit with larger files where I will not be able to keep up with the player.

You'd expect a Wireless connection to dole it out fast enough, but strangely, it seems to have trouble with the Wii for me.

One thing I'm not seeing that bothers me with JW's player, the buffer isn't being kept track of. Once I hit 100% when the buffer first begins, I can't tell when the buffer starts to fall behind. I can't gauge if I need to cut back or if I have any traffic load dropping my rates because of this.

I hope to be able to keep track of the buffer so I know when I'm hitting a good balance between bandwidth and playback.

Oh, and much to the chagrin, (I'm sure) of the Red Kawa people, I posted a complete instruction guide on how to set up Red5 with JW's Media Player and ditch their Wii Media Center X stuff.

You can find the link to the complete instructions here:

http://www.redkawa.com/forums/showthread.php?t=2481

This is an install from the ground up using all of the components that we talked about. I just hope that it gets some people working on it. I expect a lot more people to start creating tools for it if this gets to be more public.

--
elcman

@elcman,

JW's Player does output the buffer status through the JavaScript API as 'load' 0-100% or are you saying it's not working when streaming?

Also, Shawn posted this code to display the buffer:

I noticed that there was no javascript function for showing the buffer, so I wrote one with a little help from CSS. Here ya go:

CSS:

#prog-border {
height: 10px;
width: 205px;
background: #FAFBE8;
border: 1px solid silver;
margin: 0;
padding: 0;
}
#load {
height: 8px;
margin: 1px;
padding: 0;
background: #006600;
width: 0%;
}

Make these changes to the getUpdate function:

function getUpdate(typ,pr1,pr2,pid) {
var id = document.getElementById(typ);
var id2 = document.getElementById(typ); //add this
var image = "<img src='Images/icons/time.png' alt='time' />";
if(typ == "time") { currentPosition = pr1;}
else if(typ == "volume") { currentVolume = pr1; }
else if(typ == "item") { currentItem = pr1; setTimeout("getItemData(currentItem)",100); }
else if(typ == "load"){currentLoad = pr1; } //and this
if(typ == "time"){id.innerHTML = image+secondsToMinutes(pr1);}
else if(typ == "load"){id2.style.width = currentLoad+"%" ;} //And this
else{id.innerHTML = Math.round(pr1)+" ";}

Wherever you want the progress bar to display put this in the HTML:

<div id="prog-border">
<div id="load"></div>

Voila, you now have a progress bar you can update with pure CSS anytime you want.

Link to it in action: LazyCode it's at the bottom of the page.

Shawn (09.07.2007):

I forgot, you also must ad var currentLoad;

Hey guys......I have been trying to get the JW Player to work on the wii with no success so far. I have tried the player using the javascript object and a straight embed code that were both posted on the tutorials page. I can get a FLV to play if I do it for on movie but not with a playlist even 2 files long. Just seeing if anyone has had this problem.
By the way I am using Charlie Craigs playlister without ID3 detection.
Here is code:

<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Hey</title>
</head>

<body background="Background.JPG" style="background-attachment: fixed">

<p align="center"><span style="background-color: #FFFFFF"><font size="5">Hey!!!!! This is our personal page for playing all the music
we have stored on our server. For now it is just a test.</font></span></p>
<p align="center"> </p>

<script type="text/javascript" src="swfobject.js"></script>
<center><div id="player">This text will be replaced</div></center>
<script type="text/javascript">var so = new SWFObject('mediaplayer.swf','mpl','800','420','8');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addVariable('height','420');
so.addVariable('width','800');
so.addVariable('shuffle', 'false');
so.addVariable('file','playlist.xml');
so.addVariable('displaywidth','300');
so.addVariable('autoscroll','false');
so.addVariable('autostart','true');
so.addVariable('thumbsinplaylist','true');
so.addVariable('repeat', 'list');
so.write('player');
</script>

<span style="background-color: #FFFFFF"><font size="5">Just click the folder you want to move to. They are listed by artist. Maybe it will work!!
</font></span>

<p><a href="http://76.187.78.58/External/Music/A-B/music.html" title="A-B">
<font color="#FFFF00">A-B</font></a></p>
<p><a href="http://76.187.78.58/External/Music/C-D/music.html" title="C-D">
<font color="#FFFF00">C-D</font></a></p>
<p><a href="http://76.187.78.58/External/Music/E-F/music.html" title="E-F">
<font color="#FFFF00">E-F</font></a></p>
<p><a href="http://192.168.2.9/External/Music/G-H/music.html" title="G-H">
<font color="#FFFF00">G-H</font></a></p>
<p><a href="http://76.187.78.58/External/Music/I-J/music.html" title="I-J">
<font color="#FFFF00">I-J</font></a></p>
<p><a href="http://76.187.78.58/External/Music/K-L/music.html" title="K-L">
<font color="#FFFF00">K-L</font></a></p>

<p><a href="http://76.187.78.58/External/Music/M-N/music.html" title="M-N">
<font color="#FFFF00">M-N</font></a></p>
<p><a href="http://76.187.78.58/External/Music/O-P/music.html" title="O-P">
<font color="#FFFF00">O-P</font></a></p>
<p><a href="http://76.187.78.58/External/Music/Q-R/music.html" title="Q-R">
<font color="#FFFF00">Q-R</font></a></p>
<p><a href="http://76.187.78.58/External/Music/S-T/music.html" title="S-T">
<font color="#FFFF00">S-T</font></a></p>
<p><a href="http://76.187.78.58/External/Music/U-V/music.html" title="U-V">
<font color="#FFFF00">U-V</font></a></p>
<p><a href="http://76.187.78.58/External/Music/W-Z/music.html" title="W-Z">
<font color="#FFFF00">W-Z</font></a></p>

</body>

</html>

Please can someone help. I cannot get and Javascript interaction to work on the Wii. It works fine in Opera and IE7 on the PC, but the Wii just wont add songs to aplaylist or get the length of the playlist.

The JavaScript API only works with the Adobe Flash Player v8 or later.

The Wii Opera browser uses the Adobe Flash Player 7.

Until Nintendo/Opera update the Opera browser and the Adobe Flash Player that it uses, you can't use the JavaScript API on the Wii.

hi,

just a word here.

Even without mentionning the streamming thing, I am rather surprised to see that the JW player does not seem to work on the wii at all.

For instance, if I try the exemple given in the JW Player release (as of 29 oct 2008), instead of being offered to watch the example video "Get the latest Flash Player bla bla bla" is displayed on the wii (USER AGENT is => Opera/9.30 (Nintendo Wii; U; ; 2047-7; fr)"

any idea anyone?

thx

Unfortunately, the Wii is stuck in the distant past with Flash 7.

Use a v3.x player. Use old FLV or MP3.