VLC is lagging when playing HD videos over my home network

26,718

Solution 1

Thanks "AbrahamVanHelpsing" for your replies and sorry for the delay. I have finally fixed my issue and thought it may be helpful for others as well..

After struggling I found out that nothing was wrong with my VLC setup. I could actually just have left the default settings. The problem was my connection speed...

I was convinced that it wouldn't be the issue since my router is supposed to provide up to 150 Mbps (so nearly 20 MB/s). Well, as it turned out I was wrong... I checked my connection speed by transferring a file from my server to my laptop (using the scp command line) and was amazed to see a poor 970 KB/s transfer speed.

this rate was of course not enough. To watch a HD movie over a network you need at least 2.5 MB/s.

Following this article, I understood that it is advised to reboot your home internet connection from time to time. I then restarted my router and the problem was gone! The scp transfer was progressing around 5 MB/s, letting me smoothly watch my HD movies :)

Ps: I also installed XBMC and the result is just amazing!

Thanks again for your time and I hope this thread will be useful to others.

Chris

Solution 2

bit late but someone else will have the same problem as i'm using an old Dell 780 core2 quad @3000, and there are loads on the market at the moment

had the same problem with vlc playing off a nas my windows install (dual booting) and android devices have no problem playing the same files, in ubuntu/vlc the screen would freeze with a grey colour and then a few seconds later would start playing properly

I fixed it by going into vlc tools/preferences (then select show all) /Input/Codec/Access Modules/ and set it to file. i then went to tools/preference /input/codecs and set network default caching policy to higher latency, restarted vlc and it was fixed for me

Share:
26,718

Related videos on Youtube

Chris
Author by

Chris

Updated on September 18, 2022

Comments

  • Chris
    Chris over 1 year

    I am well aware that this question has been asked about a billion times all over the Internet but so far nothing has worked for me...

    I have a home server (Ubuntu Server 12.04) and a laptop (Ubuntu Desktop 12.04) connected to the same local network (both wired to my router).

    What I am trying to do is to access my server from my laptop (ssh) to play HD movies (located on the server) directly on my laptop (using VLC).

    It works just fine with 720p format movies, but as soon as I try with 1080p movies, it starts to lag badly.

    I have tried all the usual tricks:

    • Increasing the caching value
    • Setting the option "Skip the loop filter for H.264 decoding" to "All"
    • Change the "Video output module" value

    None of them worked for me. By increasing the caching value though, it actually seemed to work because it "buffers" for a while before starting the video, but after a while the movie stops and starts to "buffer" again...

    Note:

    If the movie is located on my laptop, it works good. Same issue with other players (Totem, MPlayer etc...)

    This issue has been killing me for a while now, anybody knows how to solve this?

    Thank you very much in advance.

    Chris


    Information about my laptop:

    • HP Pavilion dv6
    • Processor: 2.2 GHz Intel Core i7-2670Q
    • Memory: RAM 6 GB DDR3
    • Video: AMD Radeon HD 6490M (1 GB DDR5 dedicated, up to 4 GB total)
    • RobotHumans
      RobotHumans over 11 years
      If it's lagging on the LAN I'm guessing server side lagging. Does your setup have to do any transcoding during the streaming process?
    • Chris
      Chris over 11 years
      Thanks for your answer. I actually do not have any streaming process I guess... I just connect to my server using ssh, browse through my movies and open them with VLC. So I think that VLC is only caching the time I have set, and stop the movie to redo the caching when this time is reached. I maybe should set a kinda streaming to be able to have a sort of "continuous caching" while playing. Although I have no clue how to do such a thing, any tips?
    • RobotHumans
      RobotHumans over 11 years
      I'ld get it to the desired format once (encode it at whatever quality you plan to view it). Don't send it over ssh, you're asking for a ridiculous amount of crypto processing overhead. Stream with the vlc rtsp streaming options.
  • thomasrutter
    thomasrutter over 11 years
    You may also find that a better wireless router might be a worthwhile investment. I've been through a few and since I have had my WNDR3700 I no longer have any problems (and have not had to restart it since I moved in to my current apartment).
  • BeowulfNode42
    BeowulfNode42 about 9 years
    You will also find that SCP has an additional bottleneck for data transfer rate, the CPUs on either end. This is because SCP is 'secure' by using encryption. This requires decryption on the receiving end. If your home server is like mine and is a cheap low power device then that can also slow down communications. You will also note that most SCP implementations are single threaded and will only use 1 core. For speed testing your network try another protocol like, FTP, NFS, or SMB/CIFS and ensure it is not using encryption. We have an old server at work that only gets 25mbps because of this.