Results 1 to 1 of 1

Thread: HOWTO: Streaming HD 264 MKV Video with NVIDIA + VDPAU Over Wireless Network

Hybrid View

  1. #1
    Join Date
    May 2007

    Wink HOWTO: Streaming HD 264 MKV Video with NVIDIA + VDPAU Over Wireless Network

    If you've ever tried to stream HD Movies from another computer or a media server over Windows File Sharing and a wireless network, you know how slow the videos can be. Using the following, I went from slow and choppy slideshows to crisp and smooth videos. I wanted an easy way to watch my 720p movies on my laptop and this is a guide for making it very simple.

    This guide assumes you have a recent NVIDIA card that supports VDPAU (Hardware Acceleration).

    Check here to see if your Nvidia Card is supported:

    If you haven't already, Install The Proprietary NVIDIA Drivers:

    Next Install VDPAU:

    Note: YouTube and other flash videos may appear with a blue tint after enabling VDPAU. There's a patch for that, just enable this ppa:

    sudo add-apt-repository ppa:tikhonov/misc
    sudo apt-get update
    sudo apt-get install libvdpau1 vdpau-va-driver

    Accessing the Videos on the Network:

    We will mount the Network Share onto a folder on /media/. This will make it a lot easier when trying to play the videos later.

    Install smbfs to be able to mount the folder and create a folder (mount point) for the share::

    sudo apt-get install smbfs
    sudo mkdir /media/SambaShare/

    Next, mount the share to /media/SambaShare/

    USERNAME is the user on the windows computer that is sharing the files. Also, you cannot mount a file within the shared folder, it must be the shared folder itself.

    sudo smbmount // /media/SambaShare/ -o user=USERNAME

    Refer to the first Answer Here for More details:

    Creating a script to mount the shares

    This next step makes it so you don't have to type in the previous code every time you restart your computer. You could add it to your /etc/fstab/ to have it mount when you start your computer but I chose to make it into a script and add it to /bin/ so I can mount with a simple command. It's easier than it sounds.

    Open a text editor to save the script:
    sudo gedit /bin/mountshares
    Paste the following and be sure to modify the second line to your settings.

    sudo smbmount // /media/SambaShare -o user=USERNAME
    Now make it executable.

    sudo chmod +x /bin/mountshares
    Now anytime you want to mount the network share, just type into terminal

    sudo mountshares

    This is 10x easier than remembering all of that code. If you have extra shares that you want to mount, just edit /bin/mountshares as root.

    Now we will install MPlayer and be much closer to playing that HD movie in lag-free super smooth quality.

    sudo apt-get install mplayer
    The reason why the videos were choppy before is because of two things, the first was lack of hardware acceleration which we took care of in the first half. The second is a low cache size. Why MPlayer works so well is because you can specify both.

    We're going to make a second script that makes playing the movies soo much easier. We're going to add it to /bin/ as we did before.

    Open a text editor to save the script:
    sudo gedit /bin/playnetmovie
    Now paste the following:

    echo "Playing Movie Starting at Time $1"
    mplayer -ss $1 -vo vdpau -vc ffh264vdpau -fs -cache 99999 -cache-min $2 "$3"
    Now we're going to make it executable

    sudo chmod +x /bin/playnetmovie

    So that you don't have to go through all those folders to get to the movie files, make a symbolic link to the videos folder on your windows computer:

    mkdir NetVids
    ln /media/SambaShare/place/where/videos/are/stored/ ~/Videos/NetVids
    Now we can finally play our first movie. The syntax for playnetmovie is as follows:

    playnetmovie 00:00:00 30 ~/Videos/NetVids/Movie/filename.mkv
    The 00:00:00 is the start time. If you want to start from the beginning of the movie, just type 0 instead of 00:00:00. If you are continuing the movie from where you left off, just type in the time according to this format HH:MM:SS. The 30 is the percent of the cache that MPlayer should fill up before starting playback. The buffer size for playnetmovie is pre-set to 99,999 KB so if you do any more than 30%, you'll be waiting quite a while. If you're on a fast network you can probably do 10, if you are on a slower network you can bump it up to 50.

    So that's it! Anytime after this you want to stream your HD videos, just type in two commands.

    First mount the network drive:

    sudo mountshares
    Then play the movie:

    playnetmovie 0 20 ~/Videos/Movie/filename.mkv
    This also works for streaming HD movies over the internet:

    playnetmovie 0 20
    For MPlayer Controls:


    *** This also works for MP4, AVI, and any other HD Video you wish to watch ***


    Enabling VDPAU
    Mounting Windows Shares
    MPlayer + VDPAU
    Last edited by strid3r; September 9th, 2012 at 03:30 AM.

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts