konstantin1
11th June 2016, 16:08
I have a VPS with fast connection, and reasonable processing power. Sometimes I would like to watch movies from direct links I found on the internet without downloading them. So I simply open the link with an appropriate player, VLC, SMPlayer, FFplay, etc. as I a am Linux user. Unfortunately my internet connection is pretty slow, at least for watching videos online. CPU power is also low, thus decoding 720p videos is demanding for my 2.4 GHz P4.
I found out that I could stream those videos from my VPS applying an on-the-fly encoding to make the videos smaller bitrate, and resolution eg. 720p -> 480p or even 240p. I tried ffmpeg to achieve this task, it can transcode realtime, scaling down, applying some brightness filters, but the resulting stream isn't seekable :(
I also tried AviSynth TCPsource and TCPserver to send the video with a lower resolution, but the bitrate still reamins high, because the compression can be only lossless (Huffman, Gzip, etc). On the top of that Linux players don't support playing .avs files.
I have AviSynth and Apache installed on my VPS, maybe I could use some CGI app to deliver the video and make it somehow react to the seeking at server side. I think when seeking is clicked in the player, then the player makes a HTTP1.1 byte range request, so my wanna be CGI app should be aware of this and continue transcoding from the calculated time position, which would be calculated form the byte position and the average bitrate.
What other method should I consider to make an on-the-fly transcoding which react to the seeking? Maybe there is a handy app / script which I don't know.
I found out that I could stream those videos from my VPS applying an on-the-fly encoding to make the videos smaller bitrate, and resolution eg. 720p -> 480p or even 240p. I tried ffmpeg to achieve this task, it can transcode realtime, scaling down, applying some brightness filters, but the resulting stream isn't seekable :(
I also tried AviSynth TCPsource and TCPserver to send the video with a lower resolution, but the bitrate still reamins high, because the compression can be only lossless (Huffman, Gzip, etc). On the top of that Linux players don't support playing .avs files.
I have AviSynth and Apache installed on my VPS, maybe I could use some CGI app to deliver the video and make it somehow react to the seeking at server side. I think when seeking is clicked in the player, then the player makes a HTTP1.1 byte range request, so my wanna be CGI app should be aware of this and continue transcoding from the calculated time position, which would be calculated form the byte position and the average bitrate.
What other method should I consider to make an on-the-fly transcoding which react to the seeking? Maybe there is a handy app / script which I don't know.