-
Notifications
You must be signed in to change notification settings - Fork 58
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
Feature request: Any plans for WebP support? #13
Comments
Thanks for taking the time to submit a feature request. The ability to convert files to and from .webp files is included in v2.7.1 (9f0c9ba). Other newly supported file formats include;
As for your request to be able to store converted files on the server, this is a good concept and one that I had actually developed a solution for before HRConvert2 was around. Take a look at HRCloud2. It contains the same conversion engine as HRConvert2 but it also adds user based Cloud drive features as well. It does take a bit more to setup, so keep an eye on HRCloud3 which is probably about a year or so away from a beta version. |
AI was thinking about your secondary request a little bit more. This can be accomplished by adding two functional lines of code to the convertCore.php file. Specifically, we would need to add the same line of code twice, as there are two cleanup routines. Depending on where you want your permanent copies stored you could get away with only adding one line of code. The line of code is;
If you want to store your permanent copies in /var/www/html/HRProprietary/HRConvert2/DATA then add this special line of code directly underneath the line If you want to store your permanent copies in the $ConvertLoc specified in config.php then add this special line of code directly underneath the line If you want to store permanent copies in both places, then place the special line of code in both places. Note that this code is specific to Video files, as you said you would like to store those. If we were going to save documents, we would want to specify the $DocumentArray instead. Scroll up a bit in convertCore.php to see which arrays are defined and what extensions they contain. If you wanted to move these files somewhere else instead of leaving them in either directory we could do something like;
Note that you would only need to add this special line of code once. Then add a line in config.php to define $CustomLocation.
Just make sure that $CustomLocation exists and that the www-data user has read/write permissions in it. Note that in all of these special lines of code we've developed we're doing a couple of things. We are checking if the file HRConvert2 is working on is a directory, because if it is then PATHINFO_EXTENSION would throw an error. In the later code samples we're also checking that a file does not already exist in the $CustomLocation. If it did and we tried to write another one then copy would throw an error. |
@zelon88 Thanks for all the responses and help! Good to know WebP is already working. I don't need a full cloud platform at present, but in my home office I have two PCs, right? One where I do my work and gaming, and one that acts as a server/records video and audio from my first PC. So I'm thinking that I could install the converter on my server-ish PC, and just have it automatically store files I convert. And well, with everything you just wrote, I think that might well be possible. Could probably even make it work in a (privileged) LXD container and mount the relevant data directories as storage in the container... A project to consider. (He said, adding it to an ever-growing and increasingly impractical list.) |
Basically just that. Though I wouldn't say no to the ability to automatically store specific kinds of converted files on the drive automatically. (I work with video a lot.)
The text was updated successfully, but these errors were encountered: