movies stuttering


Recommended Posts

i just got my unraid server up and running and one of the items i store on the server is movies.  the movies are stored in their original format (.ifo) on a 500 GB SATA drive on the server.

 

last night when i was watching a movie, it was sporadically skipping.  i don't know what i can improve to fix this.  the server and the media center pc (that i was watching the movie from) are connected via gigabit Ethernet.  the media center PC is an amd athlon 64 3800+ with 2GB of RAM and a 200GB SATA drive for the OS.

 

before i moved my movies to the unraid server, it was a rare occasion that i ever experienced any skipping during a movie.  so to me that says that it has to be something with the network or with the speed of the unraid server.

 

has anyone else had this problem?  any suggestions for a fix would be appreciated.

Link to comment

Perhaps a few more details of you config would help:

- what is the network config (eg, which switch)?

- what player on the htpc are you using?

- how are you accessing the movie; ie, mounting to a driver letter via daemon tools, or accessing via unc path, or something else?

- does it studder at the same places consistently?

- any discernable pattern to studdering?

- do other movies on the same disk studder similarly?

 

Unless the server disk is reporting errors, it's not likely the cause.  If the 'Errors' column on the Management Utility Main page is incrementing, then it's your disk.

Link to comment

- what is the network config (eg, which switch)?

well i have a Dlink DGL-4300 router. one port on that router goes to a gigabit switch (Dlink DGS-1005D) and one of the ports on that switch goes to the unraid server.  the reason i have this switch is because the other ports on my router are already used up.

 

then from another port on the router i go upstairs to my living room - from that wall jack, i go out into a gigiabit switch (Dlink DGS-1005D).  and from that switch one port goes to the media center PC.

 

- what player on the htpc are you using?

windows media player - i play the movies directly through media center

 

- how are you accessing the movie; ie, mounting to a driver letter via daemon tools, or accessing via unc path, or something else?

via a unc path - when i put a movie on the unraid server i just copy the video_TS folder over to the server.  then media player accesses those via a unc path \\tower\disk2\movies\moviename\video_ts\

 

- does it studder at the same places consistently?

no - it is random

 

- any discernible pattern to studdering?

not that i can find

 

- do other movies on the same disk studder similarly?

yes - i actually have movies on disk1 and disk 2 on the unraid server and movies from both drives studder seemingly at random

 

i actually didn't check to see if the disk was reporting errors right after playing the movie - i will take a look at that tonight.  but any other advice you could offer would be appreciated.

Link to comment

Try bringing the server to the HTPC and connecting them with a cable? (if they are both gigabit NICs, I think you can use a normal patch cable, if not, use a crossover).  That will rule out the LAN.

 

I'd be tempted to run a bandwidth test before and after this (I'd use a file copy of a file of a known and reasonable size, from a command prompt) and time it.  Then at least you know exaclty what throughput you're getting, and when, which might help figure things out.  Make sure you use a nice chunky sized file, say a good 50MB or more.

 

HTH!

 

Matt :)

Link to comment

ok so i tried connecting the 2 systems with a regular patch cable and it could not find the unc path to the movie.  so i assume i need a crossover cable.  the thing is that they are in two separate rooms connected by a cable running through the wall with a wall jack on each end.

 

so because it is a pain to move the systems, i am wondering if there is any way to make the crossover cable work via the wall jack.  can i just put a crossover cablefrom the server to the wall jack and then regular cables the rest of the way or some other combination?

 

i also tried using a standard patch cable with a switch at each end of the wall jack thinking that it may auto-negotiate the crossover for me (unraid to a switch, switch to wall jack....wall jack to switch, switch to HTPC).  but that didn't work either - still couldn't find the unc path to the movies.

 

so is there any way to do this through the wall jack or so i have to lug the htpc down to my "server room"?

Link to comment

- what is the network config (eg, which switch)?

well i have a Dlink DGL-4300 router. one port on that router goes to a gigabit switch (Dlink DGS-1005D) and one of the ports on that switch goes to the unraid server.  the reason i have this switch is because the other ports on my router are already used up.

 

then from another port on the router i go upstairs to my living room - from that wall jack, i go out into a gigiabit switch (Dlink DGS-1005D).  and from that switch one port goes to the media center PC.

 

- what player on the htpc are you using?

windows media player - i play the movies directly through media center

 

- how are you accessing the movie; ie, mounting to a driver letter via daemon tools, or accessing via unc path, or something else?

via a unc path - when i put a movie on the unraid server i just copy the video_TS folder over to the server.  then media player accesses those via a unc path \\tower\disk2\movies\moviename\video_ts\

It sounds as if there are two switches and a router/switch between your HTPC and the unRaid server. 

 

As others already mentioned, it could easily be a network throughput issue.  Anything you could do to ensure that all the packet sizes going through the various routers and switches are the same would help so packets are not lost.  Also, if you can possibly reconfigure to eliminate all but one of the routers between the unRaid server and the HTPC it sure can't hurt.  Now, normally you don't even have a clue of the packet sizes involved across the LAN with those routers, but perhaps Tom can shed some light on how Samba and TCP/IP are configured on unRaid.

 

This article: http://www.dd.iij4u.or.jp/~okuyamak/Documents/tuning.english.html gives a lot of tips on tuning Samba for best performance.  Perhaps it will give you (or Tom) an idea or two. I think SP_SNDBUF is currently set to 65535.

 

The article describes the use of "tcpdump" to capture a TCP/IP session so we can figure out what is going on.  Perhaps Tom can supply a copy on his downloads page for our use. (Hint to Tom ... any possibility... please... could shed some light on what is happening on our LAN)

 

My unRaid server connects through a cheap 100Mhz switch to my MG-35 media players.  They mount the ISO image on their file-system and then play it using their built-in dvdplayer software.  As long as the bit-rate of the DVD is not too high, I get no stuttering.  Only on a few DVDs, those with high bit-rates (and lots of detail) do I get stuttering, and only when there is a lot of detail AND a lot of movement. (again, a high bit rate)

 

I too would love to tune the TCP/IP parameters to maximize transfer speed.  Let's hope Tom can assist with tcpdump for us to do some analysis.

 

Joe L.

 

 

 

 

 

 

Link to comment

ok so i just did a little testing.

 

with my unraid server and htpc connected as usual, i coped a 577mb file and it only took 46 seconds.

 

also - i opened media center and started playing the movie Cars.  with that running i did a ctrl+alt+del and brought up windows task manager.  then i watched the performance and networkign tabs.

 

the page file usage hangs pretty consistently at 435-450 MB.  the networkign doesnt seemto exceed 2%

 

and right around the times that the movie is skipping it seems liek the cpu is spiking aroud 50% (and only once it hit 100% for a little under a second).

 

so with that information - what the heck coudl be going on.  doesnt seem like its a networkign issue right?  and if its the cpu - why would it only happen on movies coming from the unraid server - i dotn understand.

Link to comment

If it's cpu that's causing the problem, then it might be the machine working to decode the video stream?  What spec machine is the HTPC, and what type of video stream is it?  If you switch to process list in Task Manager, you can select extra columns and then you can display CPU Time.  You can then see which processes have been using the most CPU, but also you want to try and figure out which process is causing the CPU spikes.

 

Then you'll know what to attack or it might be obvious what's happening.

 

Matt :)

 

P.S. Don't bother with CTRL-ALT-DEL for Task anager, right click the task bar (I personally have it running all the time, from startup, run minimised with it set to "hide when minimised").

Link to comment

I do have tvtonic installed that could be accessing the internet but looking at the network usage it doesn't seem likely that that's the culprit.

 

i do have theatertek and zoomplayer - i could give those a try.  i have actually been meaning to set up mymovies to use theatertek but i have to figure out how to use girder first so that the control via my remote is seamless.

Link to comment

Good news! it seems like the stuttering has gone away - i still have to watch some more movies to confirm this but on my motherboard there are 2 gigabit lan ports.  i just tried switching the cable over to the other port and now it seems to be ok.

i will do more testing this week and post if the problem continues but i think I've got it.

 

on a separate note, limetech, do you use the myMovies plugin with your MCE?  if so how do you get zoomplayer to integrate with it?  also i am curious - do you run  your mce system from a remote or from a keyboard mouse?  if you run it from a remote, how do you run zoomplayer (pause, skip, menu...) from that remote?

Link to comment

Good news! it seems like the stuttering has gone away - i still have to watch some more movies to confirm this but on my motherboard there are 2 gigabit lan ports.  i just tried switching the cable over to the other port and now it seems to be ok.

i will do more testing this week and post if the problem continues but i think I've got it.

Please keep us updated.  Are the gigabit lan ports different NIC's?

 

on a separate note, limetech, do you use the myMovies plugin with your MCE?  if so how do you get zoomplayer to integrate with it?  also i am curious - do you run  your mce system from a remote or from a keyboard mouse?  if you run it from a remote, how do you run zoomplayer (pause, skip, menu...) from that remote?

Yes I use myMovies.  You configure the external player via registry key:

  HKEY_CURRENT_USER\Software\My Movies\ExternalPlayerPath

I set this to:

  c:\Program Files\Zoom Player\zplayer.exe

Also

  HKEY_CURRENT_USER\Software\My Movies\ExternalPlayerParms

is set to:

  {0}

But I think it's like this by default.

(This is for myMovies version 2.00 - haven't tried his latest 2.11 yet.)

 

I use an MX-800 to control the htpc, using it's 'learn' capability to learn the codes from a IR keyboard.  To control Zoomplayer, I created a "Custom DVD Key File" where zoom's transport controls are bound to the MCE's normal Play, Stop, FF, etc. keys.

 

The only problem with this is that you can't "minimize" the running video into the small thumbnail window in the lower left of the MCE screens (ie, "now playing"); so I have "exit" key just cause zoom to exit.  Not a big loss IMO.

 

Here's the contents of my custom.key file:

// Restricted functionality based on my wireless keyboard and mappings to my remote.

// Navigation
nvAddKey(None,37,nvLeft)		// left
nvAddKey(None,38,nvUp)			// up
nvAddKey(None,39,nvRight)		// right
nvAddKey(None,40,nvDown)		// down
nvAddKey(None,13,nvSelect)		// enter
AddKey(None,8,fnExit)			// backspace

// Transport
AddKey(Ctrl+Shift,66,fnRewind)	// B
AddKey(Ctrl+Shift,70,fnFastForward)	// F
AddKey(Ctrl,80,fnPause)			// P
AddKey(Ctrl+Shift,80,fnPlay)		// P
AddKey(Ctrl+Shift,83,fnStop)		// S
AddKey(Ctrl,66,fnPrevTrack)		// B
AddKey(Ctrl,70,fnNextTrack)		// F

// Controls
AddKey(None,67,fnAudioTrack)		// C
AddKey(None,66,fnDVDSub)		// B
AddKey(None,187,fnZoomIn)		// =
AddKey(None,189,fnZoomOut)		// -
AddKey(None,36,fnOverlayControl)	// home
AddKey(Ctrl,68,fnSpace)			// D

// Adjustments
AddKey(Ctrl,116,fnDecBrightness)	// F5
AddKey(Ctrl,117,fnDecContrast)	// F6
AddKey(Ctrl,118,fnDecGamma)		// F7
AddKey(Ctrl,119,fnDecHue)		// F8
AddKey(Ctrl,120,fnDecSaturation)	// F9

AddKey(Alt,116,fnIncBrightness)	// F5
AddKey(Alt,117,fnIncContrast)		// F6
AddKey(Alt,118,fnIncGamma)		// F7
AddKey(Alt,119,fnIncHue)		// F8
AddKey(Alt,120,fnIncSaturation)	// F9


Link to comment

very interesting.  i was toying with the idea of using zoomplayer because it has built in integration with mymovies.  i have a pronto tsu7000 and was going to try and use girder with a usb-uirt, and set it to that if girder sees that theatertek is the active window, it will take the ir from the MCE remote and basically convert them to keyboard commands and send them to theatertek instead of mce. 

 

it all sounds good but i haven't been able to accomplish it yet.

 

 

interesting to know that there are other options though.  thanks for posting.

Link to comment
  • 8 months later...

I know this is a old topic, but I would like to re-open it because I'm suffering from movies stuttering when playing them over the network.

 

First, some steps leading up to the problem:

1) After first boot, test watching some low-bit rate1 video using VLC.  Everything is awsome!  Yay!

2) Watch a high-bit rate2 video using VLC.  As expected, on a 100mb network, some dropout occurs.

3) Leave Unraid on over night...

4) Move files more files over, perform some additional tests on low-bit rate video using VLC.  Eh?  What's this?  Stuttering??

 

Now the steps I've taken to try to isolate:

1) First, open up VLC and keep an eye on the statistics and messages from the debug log.

2) Executing a file results in dropped packets (according to the VLC statistics) and plenty of warnings about my player PC being too slow.  (Note: Never any issues playing low/high bitrate video on local or Highspeed USB external drives).

3) Re-execute same tests, this time keep an eye on Network traffic.  Network traffic is very low -- less than 5% bandwidth consumed.

4) Perform ifconfig eth0 on Unraid box, confirmed no data packets lost or retransmitted.

5) Suspect low-ram may be issue.  (256MB of ram in Unraid server).

 

So I leave it alone until I get more ram.  Upgraded to 512 and re-ran my tests:

1) First, open up VLC and keep an eye on the statistics and messages from the debug log.

2) Test watching some low-bit rate video using VLC.  Everything is awsome!  Yay!  Problem solved!

3) Move files more files over, perform some additional tests on low-bit rate video using VLC.  Eh?  What's this?  Stuttering??

 

Conclusions

1) Rebooting Unraid seems to clear the problem for a short time may be a hint that it's a Unraid memory allocation issue.  I'm discounting this because I've tested both 256 and 512MB memory configurations.

2) May very well be a VLC issue with a possible SAMBA tweak needed (See this post:http://new-forum.videolan.org/viewtopic.php?f=12&t=11854&st=0&sk=t&sd=a&sid=b18912c95453bd008d3a96bc0da5bc8a&start=30#p66283.  I'll try the SAMBA tweak (if I can figure out how -- too much of a Linux Noob!)

3) Reading through the rest of this particular thread indicates that VLC does LOTS of "tiny" reads.  So I'll try a different player (sigh, I like not having to play the "hunt the codec" game!).  Tweaking the buffer size didn't improve things at all.

4) May be an issue with network configuration or network/pc hardware.

 

I'll let people know how my testing progresses... but if anyone can provide additional testing scenarios or recommendations on where else to look for problems, that would be greatly appreciated.

 

Thanks!

 

1Low-bit rate I've defined as anything that uses on average less than 1000 mbits/sec (as measured by VLC)

2High-bit rate I've defined as anything that uses on average more than 1000 mbits/sec (as measured by VLC)

 

 

Link to comment

Looking at the link to the videolan forum, the two meaningful options which are different are:

 

max xmit (they suggest 65535, default is 16644, max is 65536)

large readwrite (they suggest no, default is yes)

 

If you want to experiment with this, use telnet to log in to your unRAID server and use 'vi' to edit the samba configuration file:

 

vi /etc/samba/smb.conf

 

You can insert these lines anywhere in the [global] section:

 

max xmit = 65535
large readwrite = no

 

You might try experimenting with just one of these at a time.

 

BTW, I've never seen studdering with VLC player, but we're on a GigE network, maybe that's why.  Also, min memory requirement for unRAID is 512MB.

 

I should add - modifying the smb.conf file in this way will not be preserved across reboots.  If changing a parameter in here fixes this problem, I can show you how to make the change permanent.

Link to comment

Update -

 

I tested sending files from my current player system over to unraid - speed was 480MB/sec over standard 100mb Ethernet.

After playing around with configurations in SAMBA and VLC player, I managed to get VLC to not be choppy... but I had to set the cache to 3 seconds, which means any activity (fast forward, pause, stop, etc) in VLC would not occur until 3 seconds later.  Wow, talk about jet lag! :)

 

I wasn't happy with that solution.  Why would VLC be so choppy?  It had to be a separate problem, not related to software.  I started to think maybe it was a router/network wiring issue.  Ugh!

 

So I checked my settings in my DI-524 router... nothing there to cause suspicions.

 

Hmmm....  Wait!  I've never actually performed a speed test going the other way -- FROM unraid to my player without using VLC.  What would happen if I just copied a file off the server?  Sure, seems like an idea any idiot would test first, but nooo, not me... I'm thinking "media server, fill 'er up and forget about it."  Why would I ever want to pull files DOWN from a media server??  Do'h! 

 

I rebooted Unraid (to clear out any changes I made to SAMBA) and started fresh.

1) Upload 1 GB VOB file.  Speed on average: 480 MB/sec

2) Download same file.  Speed on average.... dunno, never let it finished, but I would guesstimate 1 MB/sec

 

Hardware problem!!  Or Unraid software problem... dunno yet.  I am using a SOHO Ethernet card on my motherboard, but the motherboard has onboard RealTek RTL8139 LAN chipset.  Next test:

1) Shutdown Unraid

2) Configure bios to use onboard LAN

3) Start Unraid

4) perform ifconfig to see if onboard LAN is recognized.  Appears so.

5) ping from player pc -- no connection.

 

Hmm... after doublechecking and rebooting to make sure I configured the BIOS properly, I'm stuck.  I can't ping from Unraid to outside world, yet the router link light is on indicating the port is at least getting power.

 

Alright, I am too much of a LINUX noob to do this the unix way, so I'll put my WinXP HD back into the unraid box, and do it from Windows. :)

 

Upon boot up, Windows see's both network cards.  Ok, no hardware problems so far.  Switch the ethernet to the plugin lan card, and start testing:

1) Upload 1 gig VOB file.  Fine, 480MB/sec speed.

2) Download same file.  Same as before, ~ 1MB/sec speed maybe...dunno, never let it finish.

3) Switch cable to onboard LAN

4) Download same file.  Excellent!  560MB/sec speed.

 

I'm assuming the current build of Unraid does not support a RealTek 8139 NIC.  If it had, it should have shown up as Eth0 device, and the SOHO card as a Eth1 device.  No biggie either way, as I'm off to pick up a intel NIC.

 

Of course, this doesn't resolve the VLC issue, but at least I know now it's a hardware problem!

 

Link to comment

before buying a new plug-in NIC, remove the one you have and boot ONLY with the onboard. Try that and see what happens.

 

Actually, I did some quick googling around to see if slackware has any issues with the onboard nic, and sure enough, there were mentions of issues/difficulties, etc.

 

I could have gotten it to work with some tinkering, but hey, a new Intel Gigabit NIC is less than the cost of 4 premium pints of beer, so I figured it's more fun to pick one up and install known good hardware and then spend time drinking than to spend time beating my linux noobness into the ground!!  (hey, I know where my priorities are!)

 

Anyhow, the end result is fantastic.

I can watch HD Planet Earth without a single dropped frame (>16000 bytes/sec at times!) and the low-bitrate video no problem.

 

I will now spend the rest of the weekend enjoying Unraid Goodnesstm:)

 

Thanks Tom, great product!

Link to comment

Stuck at the VI stage?  Best google on how to use VI.  It's not the most intuitive text editor.

 

The basic commands that I remember are:

<i> to go into insert text mode

<esc> to go into command mode

<:w> to write a the modified file

<:q> to quit vi

 

You will need to go into command mode before executing any commands (like write or quit).  You will need to go into the insert text mode to add text and use the backspace key to fix typo's.

 

There are LOTS more powerful commands -- use google to learn them.  But this is the Coles notes that got me through VI. :)

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.