Greetings!
After much tinkering, I think that I have found a solution to my choppy playback problems.
The problem appears to be twofold:
* Multi-second dropouts in the wireless link
* Lack of buffering on the client (MythTV box)
Here's what I figured out about the first issue. I'm using Madwifi with a D-LINK DWL-G520 PCI wireless card. My /etc/network/interfaces file used to look like the following. Some of the names have been changed to protect the innocent.
Code:
# -- snip --
auto ath0
iface ath0 inet static
address 192.168.0.20
network 192.168.0.0
netmask 255.255.255.0
gateway 192.168.0.1
broadcast 192.168.0.255
#configure the card for G mode
up /sbin/iwpriv ath0 mode 3
#Sample for a configuration with WEP:
up /sbin/iwconfig ath0 essid "Whatever" rate 54Mb key XXXXXX...XXX
# -- snip --
I figured this would work fine. Well, it worked but not very well. Signal levels and signal quality were good, except when data was being transferred. What I discovered was madwifi was actually using the wrong channel! My AP was set to use channel 6 and madwifi was using channel 5. Apparently, this was just close enough to make things work until lots of traffic showed up. The solution to this problem is to simply specify the channel number that your AP is set to.
At the same time, I did a little 'survey' of all the available channel numbers and picked the one that gave me the best signal level and link quality. In my case, this turned out to be channel 2. I set my AP to channel 2, then modified my /etc/network/interfaces file in the following manner:
Code:
# -- snip --
up /sbin/iwpriv ath0 mode 0
up /sbin/iwconfig ath0 essid "Whatever" rate auto channel 2 key XXX...
# -- snip --
First, I set the mode value in the first line to '0'. This allows the driver to pick which mode (A, B, G) is best for the conditions, assuming your hardware is capable. As you can see, I also changed the rate value in the second line to 'auto' but I don't think that had a noticable effect, other than to let the rate 'float' to whatever level it could best achieve according to the signal conditions. The most important setting is the channel number in the second line, of course.
By ensuring the channel numbers matched, my connection became rock steady with no dropouts.
To address the second problem, I forced my MythTV box to buffer the videostream by doing the following:
Code:
# nano /home/mythtv/.mplayer/config
Then add this line to the file:
Code:
cache=1024
This forces mplayer to attempt to keep a 1 meg buffer of your file at all times. This is useful for slow media as well as network connections with latency issues. The only tradeoff here is a slight pause when starting to play a file. There is also a (very) slight pause when fast forwarding in the file.
Additional info:
I bought a couple of inexpensive antennae for my
wireless AP and my
PCI client from Newegg. These boosted my signal level and link quality each by 10 dB. (The PCI card's antenna boosted the signal by 8 dB, the AP's antenna by an additional 2 dB).
On a slightly sadder note, even with all the above tweaks I can only get a maximum throughput of around 10 megabits/s. I think that the madwifi driver still needs a bit of work to improve it's efficiency. Maybe turbo/superG will help.

Anyways, I sure hope that helps! Here's what 'iwconfig ath0' is reporting as I write this:
Code:
ath0 IEEE 802.11g ESSID:"Whatever"
Mode:Managed Frequency:2.417 GHz Access Point: XX:XX:XX:XX:XX:XX
Bit Rate:48 Mb/s Tx-Power:50 dBm Sensitivity=0/3
Retry:off RTS thr:off Fragment thr:off
Encryption key:XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XX Security mode:restricted
Power Management:off
Link Quality=51/94 Signal level=-44 dBm Noise level=-95 dBm
Rx invalid nwid:1 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
Regards,
~ Terrin