New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
how to stream 1080p videos from a VPS
Hello,
a friend of mine uses his VPS to download 1080p videos and later stream it to his iPhone/iPad. The speed between him and the VPS reaches about 1,3MB/s (more isn't possible with his connection), but I think this should be sufficient for streaming. He gets the files over apache2 and streams it with vlc media player. But after a few minutes the movie always starts lagging, the results are the same when he uses vlc on his computer. So I don't think that it's a CPU speed issue with his iPhone/iPad. So I suspect that apache2 isn't optimized or maybe there is a better protocol for streaming media?
thank you
Comments
mmmm I'm sure someone more qualified will chime in but until then, for my setup I try to get MP4s, since so many browsers support streaming it (except maybe Firefox but I think that will change soon) and I prefer Nginx instead of Apache.
I've never had any problems streaming content over http.
Megabytes or megabits? The suffix indicates megabytes, but bandwidth is rarely quoted in megabytes/sec. How much bandwidth does the streamed format require?
He might want to look at his buffer settings for vlc. If he sets a long buffer time that should fix the lag.
Like this for instance:
https://forum.videolan.org/viewtopic.php?t=99281
Give plex a try it can transcode the videos for you.
Thanks for your answers
These files are mkv files and I'm pretty sude he doesn't want to convert them first.
Maybe I should try nginx later.
@Mircrolinux No, its correct. I meant Megabytes. Where can I see how much bandwidth the streaming format requires?
@sc754 I will tell him. Thank you
Yeah already thought at plex. But I think it needs lot of performance. The VPS just has 512MB ram (360MB already in use) and one core.
+1 for plex
it works amazingly ... i've be able to easily get about 30 streams at the same time. the server software is not 100% stable now as it use to be last year, but still it's awesome.
i don't recommend using a VPS for what you want to do because the transcoding (if it does any) will eat up and possibly get your VPS terminated due to abusing the CPU 100% of each core.
I have Plex running on a couple servers - one only has 256MB RAM and it runs fine. The only time it really puts a strain on resources is when it scans your library for changes & updates movie/tv show covers, etc. But Plex is definitely the best if you want a nice organized library that you can stream on a bunch of different devices.
My setup:
-/movies/ and /tv-shows/ directory in a private nginx directory that's password protected incase I want to access them without Plex
-add /movies/ and /tv-shows/ to Plex's library
Let me know if you want any help setting this up! Plex rules apart from having to rename files if a torrent is disorganized.
1.3MB/s are ~15Mbit.
A Full HD movie of 90 minutes has (at least) 10GB and thus requires 1851Kb/s or ~20Mbit to run as live stream.
His connection simply is not fast enough for 1080p.
I'm not sure about the plex thing. I heard, just some of you mentioned, that plex needs a lot of CPU and ofc he doesn't want to get suspended because of that. But maybe it's worth a try.
@William thank you for your answer. I'm wondering why YouTube, Twitch and other streaming plattforms work like a charm with 1080p with his connection. But I assume they have a special "technology" on how to.make it working with less bandwidth? Might plex fixes this speed problem?
They re-encode the uploaded videos to a "web optimized" format/bit-rate. Youtube uses 4.5 Mbit/s for 1080p videos (if I remember correctly).
Use nginx with x-accel-redirect , my not so good server streams 3-3.5TB everyday without any problems , infact the server is never unders tress ...
I imagine the information is out there for MKV, but at 1080, I can easily envision it needing more bandwidth than is currently available.
Plex uses a lot of CPU if the video needs to be transcoded (add subtitles/change codec/bitrate etc) but if it's already in the native format (mp4/aac) it is basically just a download and uses no CPU at all.
1080p seems excessive for viewing on an ipad. I'm sure a 800-1000Kbps 720p would look just as good on that screen size. maybe that's just me being old and crotchety though...
Last time I checked an iPad/iPhone/Any mobile Apple device isn't able to play back MKV files. So you'd be stuck with converting it first.
As @telephone said YT/Dailymotion and alike convert to less bitrate, using around 5Mbit.
Any operation, be it transcoding or converting, will use a lot of cpu. It's not ideal to run on a VPS IF you won't be directly streaming the video without ffmpeg being involved.
Maybe your friend should upgrade it to a cheap dedicated server or settle with 720p downloads.
With 1.3MB connection even if it's Nginx you won't get a smoothless stream on 1080p. Maybe even for some 720p.
Sorry, but which models of iphone/ipad have the ability for displaying real high defination images?
All with Retina displays.
What is a 'real high definition' image?
Real is being an adjective here. Not a new term. ;-)
So anything at 720p or above then? In that case, all the Retina-equipped iPads and the iPhone 6/6+. The iPhone 4 is double-VGA and the iPhone 5 isn't quite 720p.
The 6+ is the only 1080p iPhone.
So, I just installed Plex for him. I followed this "guide" http://www.htpcguides.com/install-plex-media-server-on-debian-linux/
I have Plex up and running, but it looks like the guide uses and older version. Because when I open ttp://YOURSERVERIP:32400/web/ I only see a login and register page. Even after registering and login in I can't see any real settings of the server. Maybe somebody could give me a few hints?^^
Initial configuration has to be done on the host machine; either go through a virtual desktop or create an ssh tunnel and configure it that way.
or just use windows.. and get all the great features with it.
No idea what you're talking about.
Advanced Deduplication for starters ^ and plex is way easier to setup
Connect via ssh tunnel of your server and use
:32400/manage/index.html
I've done tens of Plex servers on Debian, there's no way Windows is 'way' easier. It might be more straight-forward for a non-techie, but that's not really relevant here.
No idea what 'advanced deduplication' is, care to elaborate of what is is and why I should change platform to use it?