NAS behind 10/2Mbit ADSL modem

Discussion in 'SSDs & Data Storage' started by almalino, Apr 22, 2015.

  1. almalino

    almalino [H]ard|Gawd

    Messages:
    1,553
    Joined:
    Sep 15, 2009
    I plan to buy Synology 214play to store all my pictures and video at home network and access it when travelling via 10/2mbit ADSL modem I have at home.

    What kind of performance in picture viewing, audio video playing should I expect via this relatively slow connection?

    I think I can back up stuff from the phone back to NAS pretty fast over 10Mbit. What about viewing the stuff over 2mbit. Is it painful and too slow?
     
  2. iamwhoiamtoday

    iamwhoiamtoday Limp Gawd

    Messages:
    493
    Joined:
    Oct 29, 2013
    All depends on the bitrate of what you're trying to play back. If you use something like Plex, and just tell it to stream at a lower bitrate, you won't have anywhere near as many problems as you will if you try to stream a 1080P media file
     
  3. almalino

    almalino [H]ard|Gawd

    Messages:
    1,553
    Joined:
    Sep 15, 2009

    Yeah, 1020P over 2MB is defenetelly not an option. But I guess it is still usable with lover bitrates but not too low? :)
     
  4. Philmatic

    Philmatic [H]Lite

    Messages:
    115
    Joined:
    Sep 15, 2011
    Any video at < 2 mbps is going to be painful. Audio should work perfectly fine though.
     
  5. sk3tch

    sk3tch [H]ard|Gawd

    Messages:
    1,443
    Joined:
    Sep 5, 2008
    Plex is the answer to make this a non-issue. I host a Plex server at my bro's house and just tune it down as-needed. Quality is just fine - he's on Comcast consumer cable.
     
  6. dandragonrage

    dandragonrage [H]ardForum Junkie

    Messages:
    8,299
    Joined:
    Jun 5, 2004
    Nah, with a modern codec, 1.5-2Mbps is not too bad, even at 720p and sometimes 1080p. 2Mbps would be about 1.3GB for a 1.5 hour video which with a modern codec like H.264 is not bad for HD. It won't be up to the quality of a good Blu-ray but it could beat Netflix quality by a LOT if done right.
     
  7. almalino

    almalino [H]ard|Gawd

    Messages:
    1,553
    Joined:
    Sep 15, 2009
    Thank you for the optimistic view on the matter :) It sounds promising. I guess I will not regret the buy :)
     
  8. kalston

    kalston Gawd

    Messages:
    982
    Joined:
    Mar 10, 2011
    2mbps for 1080p is a bit of a stretch IMO and you'd have to butcher audio to get there.
    720p with decent video AND audio is definitely doable though. And audio-only will be no problem at all, even FLAC.
     
  9. SomeGuy133

    SomeGuy133 2[H]4U

    Messages:
    3,447
    Joined:
    Apr 12, 2015
    Netflix is ~500-600KBps so it won't touch netflix HD but it would crush hulu. Hulu on high is a mere ~125KBps.
     
  10. SirMaster

    SirMaster 2[H]4U

    Messages:
    2,122
    Joined:
    Nov 8, 2010
    1080p is not doable on 2Mbit but 720p can look pretty good at 1-1.5Mbit in my experience.

    I use Plex, but I modified it's encoder to use up all 8 threads on my Xeon CPU to get a really high quality x264 encode out low bandwidth. The default Plex encoder is not tuned for quality but for speed and low CPU usage.
     
  11. SpeedyVV

    SpeedyVV [H]ardness Supreme

    Messages:
    4,203
    Joined:
    Sep 14, 2007
    :eek: Oh do share will you? How did you do that.

    I have some extra Xeon cores kicking around, and would love to use them for that purpose.
     
  12. dandragonrage

    dandragonrage [H]ardForum Junkie

    Messages:
    8,299
    Joined:
    Jun 5, 2004
    The downside of using Plex or similar for this is that you do indeed lose a lot of quality per bit when you have to be constrained by an encoder that must use very little CPU.

    Still... the convenience is probably worth it to most people. Being able to have any bitrate media on your disks and just have it reencoded on the fly to work streaming from your internet connection.
     
  13. SirMaster

    SirMaster 2[H]4U

    Messages:
    2,122
    Joined:
    Nov 8, 2010
    Well, plex passes ffmpeg encoder parameters into the "Plex New Transcoder" binary which does the live encoding and streaming which the player listens to.

    I simply renamed the "Plex New Transcoder" binary to just "Transcoder" (something different) and then created a simple shell script and named it "Plex New Transcoder". So what happens is the encoder parameters that were supposed to go to the real "Plex New Transcoder", instead go to my shell script. My shell script then modifies the parameters to my liking (higher quality settings) and then simply passes those modified parameters into the "Transcoder" like they were supposed to go to which is the actual "Plex New Transcoder" binary.

    Here is my shell script that intercepts and modified the parameters.

    Essentially what I have done is:

    1. Change the default "Plex 720kbit option" to 1mbit.
    2. Change the x264 preset from "veryfast" to "slow" (this has the most impact on quality)
    3. Change the CRF value form a variable one to 18
    4. Change the output resolution of the default "Plex 2Mbit option" from 1024 width to 1280 width (720p)
    5. Change the output resolution of the default "Plex 1.5Mbit option" from 720 width to 1280 width (720p)
    5. Change the output resolution of the default "Plex 720kbit option" from 576 width to 852 width (slightly better than 480p)

    Code:
    #!/bin/bash
    pkill Transcoder
    
    params=( "$@" )
    
    for ((i=0; i<${#params[@]}; i++));
    do
        pkill Transcoder
    
        if [[ ${params[$i]} = 720k ]]
            then params[$i]="1000k"
        fi
    
        if [[ ${params[$i]} = 1440k ]]
            then params[$i]="2000k"
        fi
    
        if [[ ${params[$i]} = "veryfast" ]]
            then params[$i]="slow"
        fi
    
        if [[ ${params[$i]} = "-crf" ]]
            then params[$i + 1]="18"
        fi
    
        if [[ ${params[$i]} = *1024* ]]
            then params[$i]="[0:0]scale=1280:trunc(ow/a/2)*2:force_original_aspect_ratio=decrease[n0];[n0]copy[out]"
        fi
    
        if [[ ${params[$i]} = *720* ]]
            then params[$i]="[0:0]scale=1280:trunc(ow/a/2)*2:force_original_aspect_ratio=decrease[n0];[n0]copy[out]"
        fi
    
        if [[ ${params[$i]} = *576* ]]
            then params[$i]="[0:0]scale=852:trunc(ow/a/2)*2:force_original_aspect_ratio=decrease[n0];[n0]copy[out]"
        fi
    
        if [[ ${params[$i]} = *568* ]]
            then params[$i]="[0:0]scale=852:trunc(ow/a/2)*2:force_original_aspect_ratio=decrease[n0];[n0]copy[out]"
        fi
    
    done
    
    pkill Transcoder
    
    /usr/lib/plexmediaserver/Resources/Transcoder "${params[@]}"
    pkill Transcoder
    
    Maybe there is a better way to do all this, but meh this works great for me.
     
    Last edited: Apr 23, 2015
  14. SpeedyVV

    SpeedyVV [H]ardness Supreme

    Messages:
    4,203
    Joined:
    Sep 14, 2007
    Super elegant. I like it. Thanks.

    Uhmm, I am running Plex server on a Windows box, will this work? Sorry, too tired to think for myself ;-)
     
  15. dandragonrage

    dandragonrage [H]ardForum Junkie

    Messages:
    8,299
    Joined:
    Jun 5, 2004
    That script wouldn't work natively in Windows, though it would probably work if you installed Cygwin with bash. Otherwise it'd need to be converted to Windows batch format (which might be a bit more complex - bash scripting is a LOT more capable than batch).

    I don't know about Plex but all the reencoding programs I've used have let me set at least some of the settings myself. If Plex doesn't, that's dumb on their part.
     
    Last edited: Apr 24, 2015
  16. kalston

    kalston Gawd

    Messages:
    982
    Joined:
    Mar 10, 2011
    A powershell script would be better than a batch I think :p Don't ask me to write it though, my pshell skills are way too limited.
     
  17. SpeedyVV

    SpeedyVV [H]ardness Supreme

    Messages:
    4,203
    Joined:
    Sep 14, 2007
    Looks like it is time to set up a Linux VM for my Plex Server ;)
     
  18. SirMaster

    SirMaster 2[H]4U

    Messages:
    2,122
    Joined:
    Nov 8, 2010
    I tried finding a place to set the transcoder settings but I never ended up finding any place that I could modify them.

    I think that there must be a place though and I'd like to switch my method over to that.

    In the Plex changelog I saw this:
    Add a (hidden) preference to specify x264 options which override all others

    https://forums.plex.tv/index.php/topic/62832-plex-media-server/?p=610519

    But it's hidden! Where is it? I have not been able to find it.
     
  19. sk3tch

    sk3tch [H]ard|Gawd

    Messages:
    1,443
    Joined:
    Sep 5, 2008
    What about the "Make my CPU Hurt" option under Transcoder?
     
  20. SirMaster

    SirMaster 2[H]4U

    Messages:
    2,122
    Joined:
    Nov 8, 2010
    I haven't found that it does much. Even with "make my cpu hurt" the encoder is still using the "veryfast" x264 preset.
     
  21. SpeedyVV

    SpeedyVV [H]ardness Supreme

    Messages:
    4,203
    Joined:
    Sep 14, 2007
    Well, then I'm going to move Plex to a Linux box/VM. Thanks a bunch.
     
  22. westrock2000

    westrock2000 [H]ardForum Junkie

    Messages:
    8,953
    Joined:
    Jun 3, 2005
    You will incure CPU overhead in doing so.