-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to upload still to media pool #197
base: main
Are you sure you want to change the base?
Conversation
I have been intentionally avoiding implementing this because I dont like how limiting it is forced to be. Because companion doesnt have a file picker input, or a way to upload files to companion it forces actions like this to be really clunky, and very difficult to use for a large number of users. I (along with many others mostly using companionpi) configure companion from a different computer to where it is running, meaning that if I want to use this action I will have to upload the files manually to the companion machine, and then type in the correct paths to those. But there is demand for this, and as you have mostly implemented it, I suppose it is time for me to give in and accept it will be done this way for now.
I dont think that will be possible to do for
I think this is something that needs to be done, or it will make this too hard to use for most. It can probably be done with sharp pretty easily, for any format that sharp supports. |
@Julusian what would it take to add a filepicker to the UI? We have one for importing? |
From a technical side, there might be something out there, but it wouldnt surprise me if there isnt anything decent. Picking a file on the server-side is a rather rare thing to want to do, definitely not something you would use on a public portion of a site. I think it really comes down to motivating this functionality over other things |
Yeah I was thinking upload from client side, like the traditional kind |
yeah, I was waffling on the same. I run my primary Companion instance on a Pi, so I was planning on having a local script/process on my Mac to process all the files then SFTP them up to the Pi in a known place. I can try to dig into sharp, but I'm primarily a Java developer (with some Go) by trade, so this Javascript stuff is 🤯 for me. |
Hi, |
This is a first pass for uploading stills to the media pool. It will need some good documentation so people don't get frustrated. I added in a couple of
WARNING
messages to catch the low hanging "file must end in .rgba" and if the file is not found.For my local tests, I took one of the example PNG images available in the pool (Favorites->Example Graphics->Examples - Photos->BlackmagicStudioCamera.png) and pre-processed it with ffmpeg:
ffmpeg -i BlackmagicStudioCamera.png -vf scale=1920:1080 -pix_fmt rgba -f rawvideo ./bsc5.rgba -loglevel debug
and then did an absolute path reference to the
bsc5.rgba
file in the action.Ideas for future improvements:
P.S. I tried to back out the DSK related spacing changes to only have upload related in this PR, but some pre-commit items kicked in that didn't for the other PRs I've put in. Leaving it as is for now and will deal with if you want.