Transcoding not used for external storage
As the Memories config page states, transcoding will not be used for external storage. Why?
And what to do, if i have local files and files on a remote storage? If I enable transcoding, all videos on the external storage can't be played anymore.
As the Memories config page states, transcoding will not be used for external storage.
To transcode a file, you need download the whole file locally first. This is problematic for large video files on external storage, so it is explicitly disabled.
If I enable transcoding, all videos on the external storage can't be played anymore.
That's possibly a bug. Do you get any error?
Nothing in the logs (debug). Nextcloud just tells me "The media could not be loaded, either because the server or network failed or because the format is not supported." and "Transcoding failed, check the logs".
Can you play if you set the quality of the video as "Direct"?
Doesn't change anything.
Trying to play from a read-only SMB-share
Does your browser support the video to begin with? A simple test would be to disable transcoding and try playing the same video.
Yes. No problems when disabling transcoding.
Are you 100% sure? Disabling transcoding and setting quality to direct are exactly the same thing in the code ...
Hehe. I assumed the same. But yes, I'm 100% sure. Just double-checked.
This is what the developer tools show when playing with enabled transcoding (quality: direct):
SW registered:
ServiceWorkerRegistration { installing: null, waiting: null, active: ServiceWorker, navigationPreload: NavigationPreloadManager, scope: "https://example.com/apps/memories", updateViaCache: "imports", onupdatefound: null, pushManager: PushManager }
memories-main.js:2:3177869
Source map error: Error: request failed with status 404
Resource URL: https://example.com/custom_apps/memories/js/memories-main.js?v=808481ed-0
Source Map URL: memories-main.js.map?v=0b6b2008f363bc70e4b7
Will-change memory consumption is too high. Budget limit is the document surface area multiplied by 3 (2045952 px). Occurrences of will-change over the budget will be ignored. 04
VIDEOJS: WARN: The element supplied is not included in the DOM memories-vendors-node_modules_plyr_dist_plyr_min_js-node_modules_plyr_dist_plyr_css-node_modules_video-6ca800.js:2:371545
VIDEOJS: WARN: videojs.mergeOptions is deprecated and will be removed in 9.0; please use videojs.obj.merge instead. memories-vendors-node_modules_plyr_dist_plyr_min_js-node_modules_plyr_dist_plyr_css-node_modules_video-6ca800.js:2:371545
XHRGET
https://example.com/apps/memories/api/video/transcode/vdlsaebzm600/423453/index.m3u8
[HTTP/2 403 Forbidden 27ms]
VIDEOJS: ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED) The media could not be loaded, either because the server or network failed or because the format is not supported.
Object { code: 4, message: "The media could not be loaded, either because the server or network failed or because the format is not supported." }
memories-vendors-node_modules_plyr_dist_plyr_min_js-node_modules_plyr_dist_plyr_css-node_modules_video-6ca800.js:2:371545
PsVideo: Direct video stream could not be opened. memories-main.js:2:3016916
PsVideo: Trying HLS stream memories-main.js:2:3016985
XHRGET
https://example.com/apps/memories/api/video/transcode/vdlsaebzm600/423453/index.m3u8
[HTTP/2 403 Forbidden 28ms]
VIDEOJS: ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED) The media could not be loaded, either because the server or network failed or because the format is not supported.
Object { code: 4, message: "The media could not be loaded, either because the server or network failed or because the format is not supported." }
memories-vendors-node_modules_plyr_dist_plyr_min_js-node_modules_plyr_dist_plyr_css-node_modules_video-6ca800.js:2:371545
PsVideo: HLS stream could not be opened. memories-main.js:2:3016620
Uncaught (in promise) DOMException: The media resource indicated by the src attribute or assigned media provider object was not suitable. memories-vendors-node_modules_plyr_dist_plyr_min_js-node_modules_plyr_dist_plyr_css-node_modules_video-6ca800.js:2
Source map error: Error: request failed with status 404
Resource URL: https://example.com/custom_apps/memories/js/memories-vendors-node_modules_plyr_dist_plyr_min_js-node_modules_plyr_dist_plyr_css-node_modules_video-6ca800.js?v=1de1918b548ccbfe9249
Source Map URL: memories-vendors-node_modules_plyr_dist_plyr_min_js-node_modules_plyr_dist_plyr_css-node_modules_video-6ca800.js.map?v=1de1918b548ccbfe9249
MouseEvent.mozPressure is deprecated. Use PointerEvent.pressure instead. memories-vendors-node_modules_plyr_dist_plyr_min_js-node_modules_plyr_dist_plyr_css-node_modules_video-6ca800.js:2:380951
I'm transcoding videos from an external storage, both playing in auto and direct mode just fine. My external storage is an rclone volume mounted as local external storage into a docker volume. It even has to decrypt the file and it works
You're right. If I mount the smb-share locally and use "local external storage", it's working fine.
I encountered this on my testing instance but @drhirn was faster to issue it. Is there going to be a way to enable transcoding for SMB storage? Is transcoding disabled only for SMB storage? I am running Nextcloud in Docker and mounting user data as external SMB storage with authentication even though the storage is local. This way I have the correct owner on the files that I write through Nextcloud and I can also access the files directly. It was working fine for me so far.
I can understand that the poor performance can affect the experience in case of WebDAV or Amazon S3 as these are usually not on the same machine as the Nextcloud/Memories instance.
Not right now. ffmpeg works best when the file is locally available; to support anything else we probably need another wrapper.
Are you 100% sure? Disabling transcoding and setting quality to direct are exactly the same thing in the code ...
I do think there is something going on as well, I was able to see no noticeable difference between any of the 3 settings within the admin panel for ffmpeg transcoding. My very rough test consisted of disabling transcoding, reloading the page, having the video play in original quality, then repeating the process of disabling and refreshing the page between changing settings.
It would go from the native resolution to what appeared to be the same transcoded resolution even with the transcoding enabled, and Direct (without transcode) option set.
The admin settings only define the default quality. The user can still select whatever quality they desire, and that will be persisted per-user.
The admin settings only define the default quality. The user can still select whatever quality they desire, and that will be persisted per-user.
I apologize as this is now irrelevant to the current issue, but for the life of me I can’t find that user setting?
Bottom right during video playback:
If this is not visible, that likely means the video isn't transcoding to begin with. There might be errors in the go-vod logs (/tmp/go-vod/<instance-id>.log) or some permissions errors (in the memories admin interface).
@pulsejet thank you, I see it on desktop now.
iOS Safari on the other hand only displays captions and speed. Logs show no error and it is clearly being transcoded.
Unless I’m missing something else I will open a new ticket for this?
@ChildLearningClub the iOS player doesn't support switching quality, but indeed it's a bug that there's no way to switch between transcoded and direct video. I opened a tracker at #650
I apologize for getting everyone of topic, but I think this can be closed? transcoding does work for external storage, and looks like it was just an issue with how to storage was being mounted?
You're right. If I mount the smb-share locally and use "local external storage", it's working fine.
Is anyone else still having this issue?
Well not really. The way go-vod works is by picking up files from the filesystem directly. To fully support external storage, we need to access the filesystem through Nextcloud, which will e.g. also allow transcoding files on S3
Well not really. The way
go-vodworks is by picking up files from the filesystem directly. To fully support external storage, we need to access the filesystem through Nextcloud, which will e.g. also allow transcoding files on S3
Sorry for bumping, but is it this way even for local remote storage? As in it can't be acessed directly?
@MrRinkana, the files need to be accessed directly for the go-vod server to transcode them. But for local remote storage this can be done with SMB Share.
Yeah, the transcoder only works with local files for now. If you can mount the remote storage that would likely work.
Yeah I was just worried that even local storage added trough the external storage app would suffer from the same "need to go through nc".
But that was a quick thing to test when I got home, I probably didn't need to ask.. Transcoding works like a charm! (At least in my case when the local storage just is a different zfs dataset that's actually faster for large files than the default storage)
Thanks anyway!
When we say "local storage", does this just mean locally mounted in the file system? Rather than done through nextcloud external storage?
How can I add a local path to nextcloud without using the external storage feature?
Bottom left corner when in the Memories app. You can add paths there. Is this what you are looking for?
“Local Storage” I believe he is referring to drives that are on the local network. So drives that are either connected directly to the computer he has running Nextcloud or drives that are connected through something like a NAS and maybe shared through SMB. But that are not the main directory that was selected when setting up Nextcloud initially. Hope that makes sense?
Bottom left corner when in the Memories app. You can add paths there. Is this what you are looking for?
No, I was asking about how to add "local storage/files" so that the transcoder works properly. I have external SMB shares mapped into my Nextcloud instance, but the transcoder fails on these paths.
“Local Storage” I believe he is referring to drives that are on the local network. So drives that are either connected directly to the computer he has running Nextcloud or drives that are connected through something like a NAS and maybe shared through SMB. But that are not the main directory that was selected when setting up Nextcloud initially. Hope that makes sense?
Yeah, that's what I was thinking. But @MrRinkana seemed to indicate that he got the transcoder to work by mounting the files a different way.
By local storage I mean the "local” option in the external storage app. It's only visible to server admins and allows adding another directory (other than the main data dir) to Nextcloud.
In my case I added '''/mnt/media''' which is a directory directly mounted into the lxc container running Nextcloud (like adding a drive), although it should work (as stated above, and by reason that nc can't differentiate such mounts) for any storage mounted outside of Nextcloud such as smb shares mounted in the os and then added to nc as a "local folder". Ofcourse if there is a long delay and low bandwidth on the smb that could be a limiting factor. You must make sure any mounts give the wwwrun user (or w/e) proper permissions as it will read/write from the storage.
In the options for the local storage mount there is a checkbox about generating previews you might want checked, dunno if it's required for trancoding though.
By local storage I mean the "local” option in the external storage app. It's only visible to server admins and allows adding another directory (other than the main data dir) to Nextcloud.
Gotcha. That makes sense. I'll see what makes sense for me to set up.
In the meantime, I've turned off HEVC video on my phone, as that's what's apparently been prompting the need to transcode (why can't browsers just support HEVC??! /endrant).