Playing transcoded video files as a preview

Hello,

As a replacement for things like google drive nextcloud does not handle video files very well. It would seem that if viewing video files via streaming there is no preview encoding or transcoding happening like G drive does. This means that the full resolution file with high bit rate gets beamed through to clients.

I am in need of a way to generate a seperate file (using ffmpeg) upon upload of new video files that would be optimised for online streaming. Before downloading the full fat file.

This is critical for using nextcloud in my project of having an place i can upload my rushes in the field for the remote editors to pick up, review and download. When dealing with multi gigabyte files its just not feasible to first download it before knowing if its indeed the one that was needed.

Can anyone help me with this? I have searched everywhere I can and asked all the platform professionals I know about this.

Thank you,
Daavok

1 Like

How about to use automation application to run external script when your file was uploaded? E.g. when you upload a new file set tag to it via automation tagging app and then convert to smaller video, so that your users have to use smaller version of video before download bigger.

Yes I was considering doing this as it would be a simple ffmpeg command and the server is powerful enough to run through these. However this brings an organisational issue for users. If you had a folder with RAW and Proxy folders you would need to have two browsers open to preview and select the correct raw video you would like to download by matching the name, mistakes can be made, its not ideal.

On the other hand if the proxys are already generated it would mean editors could pick them up at the same time as the raws and edit directly so in fact it might be a good compromise now that I think about it. I will need to see what the workflow and folder structure is like for the various non linear editors we are using.

Still though I would very much like either live transcoding to HEVC or something similar

Did you tried to enable “MOVIE” Previews in your config as described here: https://docs.nextcloud.com/server/17/admin_manual/configuration_server/config_sample_php_parameters.html#previews

he following providers are disabled by default due to performance or privacy concerns:

    ...
    OC\Preview\Movie
    ...

Yes I have, and they generate fine. However these are only thumbnails. Not lower resolution video files. I orginally thought this was the solution but when looking at the .ooc command the ffmpeg part only generates an image file at a couple seconds into the video for the thumbnail. Changing this to generate a video file would not work as the player only streams the master file (i think I have not tested this)

1 Like

And why not use a dedicate media server?

You could use NC to manage files and another dedicated service to preview the videos.

I would like to stream MKVs like you, but now NC seems do not have time to spend in programming that part, the first seems finish the Hub of apps. If we have luck, video stream it is a part (as I think)

I don’t know how this is not a more requested feature. Especially for a self-hosted platform such as this. Anyway the only thing so far that comes as a solution is as @castillo92 mentioned using PiGallery2 It references the files you have in Nextcloud, or whatever folder for that matter, and will create lower resolution versions based on your settings. Those are what plays on the front end. If a users hits the download button it pulls the original down. Not only that but does a similar thing with the photos, you set the quality you want, and full resolution only happens when front end user starts zooming in. Again seems like stuff like this would be built into Nextcloud to make it way more usable for all the users serving things on a connection from their homes/slower networks.

1 Like

Media server functionality like video transcoding etc is usually a feature which is demanded by home users. But home users are not necessarily the users who provide the project with any funding :wink: So I can understand that the priorities in the development of Netxloud are in other areas. Nevertheless, I agree with you, that there is a lot of room for improvement, in terms of how Nextcloud is handeling media files, even if you look at it from this point of view.

But Nextcloud will most liklely never be a replacement for dedicated media server solutions like Plex, Emby or similiar products and neither as a storage backend for media production or similiar workloads. There are better suited solutions out there for such use cases. Nextcloud primarily wants to be a replacement for services like M365 or Google Workspaces and therfore aims mainly at the needs of business users.

1 Like

True Nextcloud may never be a replacement, but there is no reason it can’t be very close in functionality :wink: especially when it only enhances the platform. I would argue that even the big guys are impacted by not having the ability to transcode their media. They may have plenty of bandwidth to spare, but what about all their users. Anyway until that does happen As you mentioned other platforms such as Jellyfin do offer that functionality and are also great projects to support :slight_smile:

Looks like PiGallery2 uses a /temp folder generates the low resolution version and puts it in there. This could be a hidden folder in Nextcloud or just a separate volume. The database would need the links I would think to play the low resolution version when previewed.

I would be happy if Nextcloud Photos would eventually offer a complete replacement for Google Photos :wink: And I think more can and should not be expected in this direction imho.

Apart from that, Jellyfin and Nextcloud cover completely different usecases and partly have completely different requirements for the components involved. And personally I don’t need to have my movie collection in the same place as my documents and photos. I honestly prefer Nextcloud to focus on improving allready implemented features like “Fotos” (which of course could make use of some kind of transcoding too) instead of adding new functionality for which there are already specialized products that do their specific job better anyway.

1 Like