Streaming HD Videoclips: Buffering takes ages, while downloading the entire file is quick

When I try to stream my video-clips earlier recorded with my smart phone (1080 / 60fps / 50mbps) I recognize that the client often needs long time until the video starts playing. In the Android client the spinning wheel is spinning for ages, in the browser (Firefox) the video screen is just black until the video finally play.

I’m aware that certain buffer time and also possible interruptions are normal for a video with such high bitrate and it is depending on network connection speed. However, the point I’m making here is, the buffering often takes significant longer than the time needed to download the entire video - while I’d expect the exact opposite.

For example, here in the local LAN it takes 2-3 sec to download a small 70MB video-clip to my client PC. If I try to stream the same file it takes maybe 20 sec until it starts playing. I also observed time to play varies from try to try, while time for just downloading the file is fairly same all the time.

The issue does not happen (or at least is significantly less) with low bitrate videos. However, I guess this is only because the issue is hidden by the comparatively small throughput needed for such videos.

I have tested this with multiple clients under Android (tested with Nextcloud App and Firefox Browser) and Windows (Firefox browser) clients. I’m running NC server 15.0.05, but observed the same issue with earlier versions as well.

Thoughts, suggestions?

1 Like

I can only share a few thoughts, I’d try different codecs. Could be that the server or client is re-encoding into a supported format.

Unfortunately my Galaxy S8 (likewise most Phones) does not allow to choose the codec. However, it is H264, what is pretty standard.

I tested to stream the URL with VLC player to find out if the Nextcloud server is doing any recode. It does not.

H264 sounds good. The codec stuff would have been one explanation why it takes longer than downloading the whole file. You could check if other Nextcloud instances have the same problem (e.g. Demo instances of 9-14 now live).

Finally, check with the developers for more help on debugging:

I quickly checked NC 9, NC 12 and NC 14. I can reach only 25Mbps throughput from them. (Probably a server-side limitation, my connection is 240Mbps inbound).

So I re-encoded a test video from the original 50Mpbs performance down to 25Mbps. With that, the streaming performance is a bit better, but still week. It is not better than from my own NC15 installation when using the same test video.

My conclusion is the weakness seems general and neither NC server version depending nor specific to my own HW or installation.

While doing these tests, I observed a new interesting aspect: Steaming performance using VLC (enter https URL into VLC player) is much better than using browser or Nextclud Android app. Basically, with VLC, video streaming is working as expected.

The problem seems depending on the (browser embedded?) Media player that the Nextcloud Website triggers when clicking on a video.

On my PC (Win10) I usually work with Firefox, that performs bad with the 25Mpbs clip and is basically unusable with the 50Mbps video (even in local LAN). I just now compared the 25Mbps clip in Chrome, that plays better than in Firefox. The Nextcloud Android App has substantial issues even with the 25Mbps clip (worse than Firefox under Win 10).

Are you optimizing for streaming by applying the +faststart flag during encoding. The aac audio information is usually at the end of the file. This moves it to the start of the file.

ffmpeg -i *filename* -b:c x264 -movflags +faststart -b:c aac -f mp4 *filename*.mp4

This can be done after encoding by issuing copy as the codec for audio and video. It will just move the moov atom.

Update: Within NC server and client in local LAN, the Android Phone running Chrome Browser handles even the 50Mbps clip quick and interruption free. Firefox on Android behaves very similar than Firefox on Win 10: the 25Mbps clip is a pain and 50Mbps clip is unusable.

The Android Nextcloud app performs even worse than Firefox.

1 Like

I’m having the same issue on nextcloud 16 :confused:

@theiconer1 since my inital post I made some interesting observations. As it stands, the root cause is not the Nextcloud server side, but weak performing client software!

On my PC (Windows 10) I usually use Firefox, and as it appears, Firefox is performing week when it comes to high bitrate video streaming. I could solve the issue simply by using Chrome instead.

On Android, the official Nextcloud App can’t well stream high bitrate videos either. When I use the NC App just to find out the URL to the video - but manually paste the URL into Android VLC Player, the video is streamed seamlessly. Oddly, when the Nextcloud Android app is used to stream with VLC as external player (tab on the 3 dots next to the video filename, then select “stream with”) the performance is as weak as when using the app’s build in player. It looks when involved, the Nextcloud Android app causes a general bottleneck that drives (high bitrate) video streaming unusable.


I am observing the same things. Have there been no improvements to this?


+1 for fixing this issue.

Honestly video streaming support with a file browser that has thumbnail preview support was one of my primary reasons for trying nextcloud.

I want a solution like nextcloud for managing my video files becuase it offers direct easy folder and file organization. The android app’s auto upload feature is good too. Also the desktop client is good for keeping offline copies of the files in case my server is offline/cant connect/broken.

But for my use case streaming video files through the android app is most important, because,

First I need something that can both show thumbnail previews without downloading the entire file to the device. Its difficult to tell videos and photos apart without thumbnails when the camera names them all 20200627_1510.

Second, its also important that videos stream via network and load to RAM rather than using up cache space on legacy phones and tablets that might only have 16/32 GB of internal storage.

I’ve already been using SFTP with VLC player and streaming anything works great but doesnt have thumbnails. Then if I want file/folder management I have to use a file browser and I’d be limited to those that support network protocols. Furthermore if I wanted auto upload I’d need another app for that. Finally if I did want video streaming with thumbnail support I’d need to setup a media server and use another app with that. Then for desktop sync I would need another client.

Seperately that’s about four different programs to do everything that nextcloud can do on one unified platform.

Nextcloud is a great solution, I just want it to work with reliable streaming to Android out of the box with either the default app or VLC.

I read that Solid Explorer has owncloud/nextcloud client support but havent tested it yet. I’ll update this with what I find out.

I have the same problem, the buffering is fine in Chrome on my PC and on Chrome in my Android phone. But the Android app just takes ages to buffering. Even a video thats only 20mb! I’ve tried using VLC on my phone using the “Stream with…” option, but that does not help. I still get stuck in buffering.

Since my last post I’ve tested Solid Explorer on Android and it works with nextcloud video streaming with its owncloud/nextcloud support.

However you don’t get thumbnail previews like you would with the official nextcloud app.

In order to get both thumbnails and streaming working I had to abandon nextcloud and go back to Samba unfortunately.

For both thumbnails and video streaming in one app I ended up using a Samba server with either Nova Player (which is FOSS) or Solid Explorer (paid app). In my experience thumbnail generation worked better with Solid Explorer.

However using Samba I no longer have transit encryption like I would with Nextcloud.

Even though using the file sharing built into Windows works better for me in my specific use case. I still think Nextcloud is a good project and I hope development fixes video streaming in the future.

Solid Explorer does work with Nextcloud video streaming but its a paid app and I’m not recommending it over a FOSS option but its the only Android app I’m aware of that works with Nextcloud video streaming.

Hello I am using NC 18.0.7 and face the same video player issues, with very slow video loading and playback (while downloading the video file is much faster using the same internet connection): clearly an issue NC client side.

I think the NC team should definitely prioritize to correctly make work all NC current features out-of-the-box, before adding any new feature. In my view the 2 main features to fix today in NC 18.0.7 / 19:

  • Video player : currently too slow to load and play a video, making it almost unusable to host/share videos correctly with NC.

  • Collaborative work : Collabora v3.7.3 has a problem with left pannel unusable scrolling (making it painfully usable for collaborative work) / OnlyOffice v4.3.0 works nicely except “Download as pdf” export feature (removes all hyperlinks contained in the NC file, thus making it unusable for collaborative work).

Until these 2 key features don’t work correctly, NC can’t expect mass adoption and will always fall behind Google Drive adoption for obvious reasons.

Hope it can quickly be solved by the NC team: thanks for your great work and long life to Nextcloud !

Too many “moving parts” - device you record the video on (smartphone brand/model, camera, etc.), software you use to encode/recode/remux, torrenting sites, etc.

A few weeks after Blu-ray was standardized new parameters were introduced in AVC (H.264 and corresponding x.264) that would produce a non-standard stream. Even more so today with VP8, VP9, AV1, different containers, etc.

You just can’t take care of all the available options… VLC as a player can… FFmpeg libraries can… Nextcloud cannot! Unless they want to open themselves to lawsuits…

You want to make Nextcloud your own Netflix site? Recode the videos, whatever the origin. Lots of tools for that…

Hi @henry, thanks for your feedback. I may miss some license issue: VLC and FFmpeg are both open-source projects, you think they would not accept their libraries APIs be reused in Nextcloud ?

They definitely will, very much so…
As soon as this happens Nextcloud can be held liable for patent infringement.

In other words, there is no commercial entity behind VLC/FFmpeg, nobody to sue.
As soon as it is used by commercial firms - the risk rises…

I have the same issue. MP4 movies (records from the mobile phone ) aren’t playing.
I’ll attach soon an example of how it looks when trying to playback some short videos.

Anyone with this issue who can support and contribute to helping please participate in the existing github issue.

It needs logs, video screen capture of the issue, and more detailed information to be recognized as an approved bug.

Github is the best way to get the attention of the app developers and help create a path to getting this issue resolved.