HitFilm in Linux - experiments with Wine

edited November 2018 in Everything Else

This thread serves as an ongoing record of my experiments using the Wine compatibility layer to run HitFilm in Linux.

It is currently possible to run a demo version of HitFilm Pro in Wine, although there are some quirks, and some features which work fine in Windows will cause HitFilm to crash in Wine.

 

In order to run HitFilm in Wine, it is necessary to configure Wine to use some native (Windows) dlls. This can be done by running winecfg, and in the "libraries" tab, add new overrides for the libraries "fusion" and "msvcp140". I also set the windows version to Windows 10. Making these changes should allow HitFilm to start in Wine.

Upon starting HitFilm in Wine, the HitFilm home screen remains blank and I am greeted by the friendly and generic error message "We're sorry, HitFilm encountered a problem and needs to exit...". Dismissing this error box will cause HitFilm to close. However despite the error box, and the blank home screen, you can still click the "File" menu along the top of the HitFilm main window, and from there you can start a new project or open an existing project. (Remember to leave the error box open). Edit: as of Wine 3.19, this is no longer an issue.

The activation app does not currently work in Wine: this means that it is only possible to run HitFilm in Demo mode without the ability to export. The activation app will open a new window, but this window will remain useless and blank. In versions of Wine prior to 3.0, attempting to run the activation app would sometimes cause Wine to crash.

Once inside HitFilm, most features and effects seem to work fine. There  are of course exceptions, some notable stuff that doesn't work in Wine for me includes:
-Text layers - the text is invisible.
-Text effect - causes a crash.
-Scopes - both the scopes effects and the scopes panel cause a crash.
-Re-arranging the panels is also kinda buggy.

 

I have thus far only tested HitFilm Pro (version 6) with Wine and not HitFilm Express 2017 or any of the earlier versions for HitFilm Pro. I tried HitFilm 2 Ultimate and could not get it to work in Wine.

I am currently using Wine 3.0 running in Linux Mint 18.3.

Once I have carried out more testing of what works and what doesn't, I intend to make an entry for HitFilm in the Wine application database.

Comments

  • Ooh, that sounds awesome. :)

  • Awesome, thank you! I tried to install wine to use hitfilm, but I misread my package managers dependency fix, and uninstalled all of gnome and GDM. I just decided to dual boot to windows. I wish this existed when I tried to do that.

  • Updates:

    -using Wine 3.19, the home screen now displays properly and I no longer get a "Hitfilm has encountered a problem..." error message.

    -HitFilmRenderClient.exe requires the same DLL overrides as HitFilm (fusion, msvcp140) in order to run the program. If using winecfg to set the DLL overrides for all applications, that's not a problem. But if using winecfg to set an application-specific DLL override for HitFilm, then it is also necessary to set another application-specific override for HitFilmRenderClient.

    Still haven't found a way to get activation to work in Wine yet though

  • Updates from testing HitFilm Pro 10 in Wine 3.19

    Playback does not work, although you can still view individual frames by scrubbing through the timeline. Ram Preview also works (at least while it is drawing the frames), but is redundant since you can't play it back.

    Audio playback does not appear to work, but audio waveforms still display correctly and the audio meters behave as expected when scrubbing the timeline.

    Also, I worked out a way to activate HitFilm in Wine, despite the fact that the (windows version of the) activation app does not work in Wine. Now that I have activated HitFilm in Wine, I can confirm that exporting files appears to work without any problems. (although the process is much slower than on Windows)

     

    All in all this experiment has gone from being a fun toy experiment to something that might actually be useful.

  • The other day I submitted a request for HitFilm to be added to the Wine application database (appDB), and that has now been accepted.

    https://appdb.winehq.org/objectManager.php?sClass=application&iId=19146

    At the moment, the main issue with using HitFilm in Wine is the lack of audio and video playback. If that changes, or if there are any other significant improvements, then I will put a note in this thread. But otherwise, I think I will post my tests and notes on appdb.winehq.org from now on.

    I'd encourage anyone else who has also been playing around with HitFilm in Wine to submit their own test results to the wine appDB

  • It is possible to get playback in HitFilm 10.0 working in Wine by using a dll override for "xaudio2_7".

  • If you still lurk on these forms, how did you get the activation working?

  • Triem23Triem23 Moderator

    @JacoubthePerson haven't seen @JMcAllister in a couple of months. Depending on his forum settings he might get an email notification from responses to his own threads and/or being tagged by name in a response. This whole post is really about the tag to help you get J's attention  :) 

  • edited May 22

    (Thanks for the tag, @Triem23 , it's true I've not been on here for a while, but I have the email notifications set up like you describe)

    @JacoubthePerson activating HitFilm in Wine is a bit of a hack, but basically most of the activation app is just javascript being run through nw.js and node.js.

    https://nwjs.io/

    https://nodejs.org/

    For some reason the windows versions of those programs (nw in particular) don't work well in wine, so the activation app doesn't run properly. But by using native linux versions you can basically build your own version of the FXhome activation app that will run without needing wine, and then use that to install the license file. Once you have the license file (assuming it's valid and is for your computer) then HitFilm *should* be activated. It behaves in essentially the same way as an offline activation.

    The only other part of the activation app that is a windows binary is a program called "DumpInfo.exe", but it basically just prints a small amount of text to terminal, so it's easy to make a shell script or a linux binary that will print the same text (although one of the things it prints is a filepath, so you should change that to a linux path that will point to the equivalent location inside your wineprefix)

    There's a more detailed explanation on the HitFilm page of the Wine app database:

    https://appdb.winehq.org/objectManager.php?sClass=application&iId=19146

     

    if you have any other questions feel free to tag me again

  • Triem23Triem23 Moderator

    @JMcAllister *Thumbs up Emoji* (But from my laptop)

  • hmm. Re-reading my earlier comment (and the instructions that I wrote last year on appDB) about how to activate HitFilm in Wine, I think it might be worth making (and sharing) a custom script that would automate the process.

  • this bash script isn't perfect (I'm pretty sure it won't work properly if run on a machine that has more than one FXHOME software installed) but in theory, it could be run from anywhere on the system, requires no user input, and automates the entire process of setting up an activation app for HitFilm in linux (including running the activation app, at the end). So it's probably a good start

     https://drive.google.com/file/d/1prA4lETGFoQ_qQMKYsqKbOnFNeBLeKlv/view?usp=sharing

  • edited May 25

    @JMcAllister

    This seems to be working well so far! I have successfully installed it, and now can see a loading indicator whenever I click the Activation button, which is progress from when I saw a blank window without the script. The only thing that's stopping me is after it loads, the window immediately closes. Do you have any ideas on how to troubleshoot this?

    EDIT: To fix that, I had to run the script from the file explorer, not by the button in Hitfilm. Now I've gotten past the loading screen, but it's saying it can't verify the details of the FXhome software I've installed. How do I fix this?

  • @JacoubthePerson

    yeah the "activate" button in HitFilm just calls the normal (windows) activation app, so I'm surprised you even got as far as the "loading" indicator... to use the linux activation app you have to launch it manually

    As for the error message, I know the one you mean, I got that many times while writing and testing the script. It probably means there's something wrong with DumpInfo.

    A few suggestions of things to check:

    Assuming you used my script, go to whatever folder you installed HitFilm into (by default it's ~/.wine/drive_c/Program Files/FXHOME/HitFilm Express (or HitFilm Pro if you installed Pro))

    1) check there is a folder called "ActivationAppLinux" - if not, then my "activate" script has been running in the wrong directory and shouldn't work at all.

    2) go to "ActivationAppLinux/Resources/bin" and check there is a script called "DumpInfo.sh", if there is, make sure it is marked as executable (simplest way is just to try running it direct from a terminal (ie ./DumpInfo.sh) - if it runs, great. If it fails with a permission error, then it needs to be marked as executable first)

    3) go to "Resources/modules" and open the file "constants.js". Check that the "DUMP_INFO_BINARY" is set to "../bin/DumpInfo.sh" and not "../bin/DumpInfo.exe" or anything else

    4) run "WINEDEBUG=-all wine DumpInfo.exe" in a terminal, then run "./DumpInfo.sh" and compare the output. They should be exactly the same except for the line that begins "licenseFilePath" which should be different (and should also be in a different order in the list). In particular, check for any differences in the line that starts "programCode" - this is what the activation app uses to determine which FXHOME software is being activated, so if there are any mistakes that would result in that line being read incorrectly, then the activation app will be "unable to determine the details of which FXhome software you have installed" and you get the error message.

    5) also open "DumpInfo.sh" in a text editor and see if there's any odd characters in the text that just aren't showing up in the terminal. Again, check in particular the line that starts "programCode"

    Let me know if any of those things are the problem, or if it's something else

  • @JMcAllister

    I think I found the problem. I do have that ActivationAppLinux folder, but in Resources/bin, there's only a DumpInfo.exe and a DumpInfo.txt but no DumpInfo.sh. How can I create the .sh file?

  • @Jacoubtheperson

    how odd.

    In that case you'll probably need to also edit "Resources/modules/constants.js", because my script is set up to edit that after it's created DumpInfo.sh, and it is supposed to stop if it fails any of the steps (I realise now, I forgot to add "&&" to the last couple of lines so it will still try and launch the activation app regardless)

    as for "DumpInfo.sh"...

    it's basically just printing text, so all you need is the shebang (#!/bin/bash) on the first line and then an "echo" statement on a line after that. You should be able to copy most of it from DumpInfo.txt, in theory the only line that you will need to change is the line that starts "licenseFilePath", where you will need to do 2 things:

    1) change the path to a Linux path (ie replace the "C:\" with the path to your wineprefix and "drive_c")

    2) correct the case of some of the letters. You can either check the folder names by hand, or use "locate -i" in the terminal to find the correct path. This is because linux is case-sensitive (Windows is not) so some paths that are equivalent in Windows are different in linux.

    (Also, 3, DumpInfo.txt may have some funky extra characters that are not supposed to get printed, if so, delete them)

    Something like this: (but obviously the actual values will be different)

    https://drive.google.com/open?id=1NSfd77TiaUXIoi-VkZqkmx3i6sk8361Q

  • @JacoubthePerson I have a theory why my script didn't work on your computer, any chance you could send me a copy of your DumpInfo.txt file, so I can test? Also, what linux distro are you using, and what versions of Wine and Hitfilm?

  • @JMcAllister

    I am currently using Linux Mint 19.1 Cinnamon, Wine 4.0, and Hitfilm 12.2.8707.07201. 

    Here is my DumpInfo.txt file.

  •  @JacoubthePerson thanks! You confirmed my suspicions about where the mistake is in my script. Give me a few minutes, I'll upload a newer version that ought to work on your computer.

    Basically, on my computer, DumpInfo.exe printed some funky extra characters, so I wrote the script to take them into account. But on your computer, they're not there, so the script fails. Don't know why the characters are there on my computer and not on yours, but I can look into that later

  • @JacoubthePerson

    ok, here is a newer version of the script, hopefully it will work this time

    https://drive.google.com/open?id=1XCmcDPIQ3m5AcnYrD-1jiO7eUb0ilpVh

    delete the "ActivationAppLinux" folder and then run this new script, and it should work.

    Although note that now if it fails at any of the steps, it'll just stop without launching the activation app. So it should be run in the terminal if you want to see what it's doing (or not doing)

  • @JMcAllister

    It worked! Thank you so much for this script and guiding me through this whole process! Now I can use Linux without anything setting me back 

  • @JacoubthePerson you're very welcome, glad it's working now

    If you want to help, it'd be useful if you could submit a test report for HitFilm on the Wine appDB, especially if you find anything specific that causes wine to crash. (I should probably submit another test report myself - my last tests were a few months ago)

    https://appdb.winehq.org/objectManager.php?sClass=application&iId=19146

    From my experience all the basic editing tools work fine (I actually edited a short film entirely in HitFilm/wine last December), although some effects and other stuff don't. But with all the many features in HitFilm, and with Wine updates every couple of weeks (in the development branch), I have a hard time trying to keep track of everything that works and everything that doesn't.

  • This thread is pretty awesome. :)

  • @spydurhank not as awesome as your thread.

  • @JMcAllister

    I do have a few things I want to add there. Is it fine if I don't use my real name? I don't really want that on the internet. 😬

  • I'm pretty sure you can use any name, it might even be possible to submit tests anonymously (I can't remember).

  • @JMcAllister ,

    Thankyou. I like Linux and have used it for a few days at a time throughout the years: nothing fancy: . It made my change to Windows 10 Pro pretty easy. It will be really good when you crack this. :)

  • @JacoubthePerson if you really don't want to sign up on appDB to submit test reports, you could always just post in this thread with any problems you have running HitFilm in Wine, then I could file test reports instead (assuming you provide the usual info like Wine version, OS version, Hitfilm version etc)

Sign In or Register to comment.