How to share url of video in nextcloud for a wordpress blog

Dear community,

we have a family blog set up using Wordpress. Since storage space is scarce on our hosting platform, we store the larger video files on our self-hosted Nexcloud server.

Currently we still use the Nextcloud Sharing Path app, to get a static URL for the video files, which then can be used as streaming source in the Wordpress video player. This worked pretty well.

Unfortunately, the Sharing Path app does not show any signs of development since a year and it is marked as incompatible for Nextcloud version 25.

Though, sooner or later I will have to update to Nextcloud 25 now - so I wonder, has anyone an idea how we could solve the described video-streaming use-case in another way with Nextcloud?

Thanks a lot for your help!

Kind regards,

I have this, I had a similar idea yours.
Nextcloud refuses to connect in an iframe.

I have had some good luck and some bad luck trying to iframe my server.
Was stuck at PHP Version 7.3 too low …Now Version PHP 8.2.3 too high.

Try a shared folder with read only permissions say 1 video.
Then hyperlink to it and then use the builtin Nextcloud player for the video.

Instead of the app Sharing Path maybe you can use the app ShareRenamer. Also you can use e.g. https://cloud.server.tld./s/*****/download (add /download) for the url.

Thanks, I guess this could work - but I will first try to avoid redirecting the visitor to my Nextloud instance: it probably causes confusion and I also don’t want to expose the cloud to the public (staying in the background) for security reasons.

So I will try to find a solution with the builtin Wordpress video player first.

Thanks for this hint! Just tried: it works in the web browser, as long as I do not share the complete video directory but a single video file. If I use the same URL from the browser in the Wordpress video player, it tells me that the file has no supported video format.

I believe the reason is, that the Share-URL just opens a page with a download button and the opportunity to click ‘play’ and start the video. It does not start the video stream instantly as it does, if you click on the video file directly.

This, for some reason, seems to be the difference between the apps Sharing Path and ShareRenamer: With the Sharing Path link, the video starts instantly.

During the weekend I will open an issue on the ShareRenamer GitHub project: maybe this is a nice feature they also can support.

This is the result of 2 shared folders with one account the last one read only or add custom permissions to upload new files then turn off. It also works between users and have not tested groups and federation sharing.

Happy for you or the Public to try the URL.

I have similar use for it as well.

If you hover over the file in question. There is ?path%2F---- added to the base shared url. I will try that.
Also if you add /download to the end of a shared URL it downloads straight away.

I used this system 3 weeks ago to collect footage of a friends family birthday party with a new cheap android phone.
I uploaded most of footage as it I was going so it was not stored on the phone, I only stored on the phone when there was a big upload going on, I never tried to switch back to the camera and upload again.

I did have the nextcloud client installed on the phone connected to another NC server.

I did not take any other computers to the party just the phone.
I had the remote computer, that the family use syncing to the data as well. So a remote local copy.
While I was there I used my cloud desktop install to generate and preview the footage into mp4 and play on there TV via Plex installed on there computer.

The remote cloud draft render process of all the video clips took ~4.5 hours to process, then sync ~1 GB of data at 60 mbps to the remote local pc. I did this twice while I was there.

When we traveled home ~200 km from the event. I then connected a Linux pc and my Windows PC to the same cloud accounts and synced the data.
I did more editing and added the generated a DVD ISO image to burn of the event. The new ISO image should of been transferred to the remote location, yet to confirm.

All this syncing was done automatically by the remote NextCloud server.

Please note: You must Mirror the Nextcloud account in the server for the same server to change and add the data. Untested yet. Not sure if another cloud desktop image with a client has the same options or bandwidth transfer speeds.

It’s pretty heavy on traffic the data was just 25 GB but my home internet was ~5 times that.
I had setup a 60 GB server but you loose half in a Mirror configuration.
It was fine I did not have wait to upload/download any data manually.

You are looking for Nextcloud Raw

I wonder if you can’t just modify the .htaccess (Nextcloud instance or second virtual webserver on the same host) to point direct access to a substructure of the Nextcloud files (data/username/files) via a suitable rewrite. Of course, taking into account possible security risks.

Perhaps someone is creative and has an idea for this or may try it out. Probably you would have to adjust the configuration again with each update. So i think a second virtual webserver or a subfolder outside Nextcloud would be the better solution.

I personaly like the github-like solution in nextcloud-raw

1 Like

Sorry for the very delayed answer and many thanks to everyone here, sharing their thoughts and ideas.

I tried a lot now but in the end there does not seem to be a solution by sharing a path and then referencing on video files for automated download, inside of this path.

The only solution is to share a link for each single file ad add the postfix /download to the URL, as suggested by devnull:

It is a bit of work to create all the link shares and change the URLs in WordPress, but I will go with this solution now - the advantage is also, that I do not depend on a 3rd party app anymore this way.

Kind regards,