MLV App 1.14 - All in one MLV Video Post Processing App [Windows, Mac and Linux]

Started by ilia3101, July 08, 2017, 10:19:19 PM

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

Danne

Been checking into compiling roundtrips in qt and seems if the only thing we want is to compile a static version of Mlv App we don´t need xcode or even the full qt creator package. This means we don´t need to install two humongous packages but a smaller brew qt package seems to do the trick. Following script should take a vanilla mac user from start to finish compiling latest version of Mlv-app(master branch). Please test and report how it goes.
Copy paste following into terminal:
#!/usr/bin/env bash

#start in user directory
cd ~

if [ -f /usr/local/bin/brew ] && [ -d /usr/local/Cellar/qt/5.1* ] && [ -d /Library/Developer/CommandLineTools ]
then
#might help if the script doesn´t start right away
sleep 0.5 && clear && echo "Press enter to run the script" &
fi

if ! [ -d /Library/Developer/CommandLineTools ]
then
xcode-select --install
fi

#check for dependencies
if ! [ -f /usr/local/bin/brew ]
then
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi

#check for qt versions
if ! [ -d /usr/local/Cellar/qt/5.1* ]
then
brew install qt5
brew upgrade qt5
fi

if ! [ -d ~/MLV-App-master ]
then
curl -L https://github.com/ilia3101/MLV-App/archive/master.zip -o mlvapp_master.zip && \
unzip mlvapp_master.zip -d ~/
rm ~/mlvapp_master.zip
else
echo "updating MLV-App-master source"
cd ~/MLV-App-master
git pull https://github.com/ilia3101/MLV-App
fi
if ! [ -f ~/MLV-App-master/platform/qt/FFmpeg/ffmpeg ]
then
unzip ~/MLV-App-master/platform/qt/FFmpeg/ffmpegOSX.zip -d ~/MLV-App-master/platform/qt/FFmpeg/
fi
cd ~/MLV-App-master/platform && \
rm -r MLVAPP
mkdir -p MLVAPP && \
cd MLVAPP && \
$(ls /usr/local/Cellar/qt/5* | head -1 | tr -d ':')/bin/qmake ~/MLV-App-master/platform/qt/MLVApp.pro -spec macx-clang CONFIG+=x86_64 CONFIG+=release && /usr/bin/make -j4 && $(ls /usr/local/Cellar/qt/5* | head -1 | tr -d ':')/bin/macdeployqt ~/MLV-App-master/platform/MLVAPP/MLV\ App.app && \
make clean && \
open ~/MLV-App-master/platform/MLVAPP/


edit: added command-line tools install to the script as well(still smaller than xcode...)

bouncyball

Hmm great! Are you sure this last command compiles static binary? What is the size of the binary?


escho

@masc

A word to the desktop-files in Linux

This is the end of the MLVAPP.pro-file:

#linux-g++ {
    #Add desktop file
#    EXTRA_FILES += \
#        mlvapp.desktop
#    for(FILE,EXTRA_FILES){
#        QMAKE_POST_LINK += $$quote(cp $${FILE} $${DESTDIR/usr/share/applications/}$$escape_expand(\n\t))
#    }
#}


I guess, this was a try to install a desktop file. But this cannot work for two reasons:

First:

"/usr/share/applications" contains desktop-files, that´s true. But these deskop-files are system-wide. For doing something system-wide in Linux, you must logged in as root or use sudo. You will be asked for the root-password then, to proceed.

Second:

"$$quote(cp $${FILE} $${DESTDIR/usr/share/applications/}$$escape_expand(\n\t))"

What is DESTDIR? /usr/share/application is a valid path in Linux. The makefile, created by qmake-qt5, shows:

cp mlvapp.desktop

The destination is missing.


I for my part do not want to install mlvapp system-wide. I want it locally in my home-folder ( /home/myusername/ ). So my way for building mlvapp is:

- download the static version from ffmpeg for linux from the ffmpeg-website
- copy ffmpeg to ~/bin
- cloning mlvapp from git
- making the buildfile with qmake-qt5
- compiling with make


I wrote a little bash-script for doing this, because sometimes I´m a bit lazy :)

OK, mlvapp is compiled. All I like to have know, is a little desktop-file. Not because it´s necessary for mlvapp to start. No, I like nice little buttons and icons to press. (That´s a reason, I love to visit the "Deutsches Museum in München". Many buttons to press there...

I do not want to have this desktop-file system-wide to avoid using the root-password. Fortunately, I can create this desktop-file locally in my home-folder. OK, which file must go to what place, now?

mlvapp.desktop

Theat goes to a hidden folder in $HOME

$HOME/.local/share/applications

MLVAPP.png (in RetinaIMG)

The png-icon has a resolution of 512x512 px. So it must go to another hidden folder in my home-directory

$HOME/.local/share/icons/hicolor/512x512/apps


Another possibility should be, I guess:

$HOME/./icons/hicolor/512x512/apps

mlvapp

The bin-file should go to a place, which is describes in the $PATH envirement-variable

$HOME/bin

Did I tell you, that I´m sometimes a bit lazy. So I wrote some lines into the MLVAPP.pro-file. Now qmake-qt5 and make are doing the job for me. Now I have the mlvapp-starter in the multimedia-part of the KDE-Quickstart-menue. And I appended it to my desktop.

#linux-g++ {
    #Add desktop file
#    EXTRA_FILES += \
#        mlvapp.desktop
#    for(FILE,EXTRA_FILES){
#        QMAKE_POST_LINK += $$quote(cp $${FILE} $${DESTDIR/usr/share/applications/}$$escape_expand(\n\t))
#    }
#}

target.path = $$(HOME)/bin
desktop.path = $$(HOME)/.local/share/applications
desktop.files += mlvapp.desktop
icon512.path = $$(HOME)/.local/share/icons/hicolor/512x512/apps
icon512.files += RetinaIMG/MLVAPP.png

INSTALLS += target desktop icon512


The way to install mlvapp and a desktop-file is now:

qmake-qt5
make
make install


Note, that is only valid for Linux-openSUSE with KDE. It should run on Kubuntu as well. Ubuntu with gnome or Ubuntumate could b different. I cannot test Gnome, but I have ubuntumate. I will give ubuntumate a try next days
https://sternenkarten.com/
600D, 6D, openSUSE Tumbleweed

dfort

Quote from: Danne on May 14, 2018, 04:27:14 PM
Please test and report how it goes.

Worked perfectly over here. I did build MLV App in the past using the humongous qt IDE packages but this was way easier.

Danne

Really cool to hear that it worked dfort. Thanks for testing.

I put the script into an automator wrap here:
https://bitbucket.org/Dannephoto/mlv-app-danne/downloads/Mlv_App_compiler.app.zip

Double click to run it. If you run it for the first time press ctrl and right click to bypass gatekeeper.

If useful and if anyone get ideas I might put in a menu and more functions etc...
Have fun compiling :)


Edit: Since Mlv App allows for executing shell scripts it would be possible to pull and compile the latest straight from Mlv App itself if one would want to  :P

50mm1200s

Quote from: escho on May 14, 2018, 09:05:28 PM
I for my part do not want to install mlvapp system-wide. I want it locally in my home-folder ( /home/myusername/ ). So my way for building mlvapp is:

- download the static version from ffmpeg for linux from the ffmpeg-website
- copy ffmpeg to ~/bin
- cloning mlvapp from git
- making the buildfile with qmake-qt5
- compiling with make


Couldn't it use the package manager, instead of copying manually? It could have a script that gets the system name and then assign the correct expression to the package manager. If I remember correctly it could use:


$ uname -a | grep -E 'Debian|Arch|OpenSUSE|Ubuntu'


Depending on the output, it could automatically call the package manager. For example, Arch would use "pacman", debian will use "apt-get install". This would make it more reliable, since if you 'hardwrite' the link in the core, and the link on ffmpeg site changes, the code will not work. Also, there's some security considerations on copying something to /bin...

escho

@50mm1200s
Quote
Couldn't it use the package manager, instead of copying manually?

Sure, you can use a paketmanager for installing ffmpeg, if you wan´t. I described the way for openSUSE in my guides:

German: https://sternenkarten.com/fotos/ml/
English: https://sternenkarten.com/tutorial-englisch/

Search for ffmpeg...

But remember. ffmpeg shipped with the big distributions is not compiled with all codecs, mlvapp needs. The community provided unofficiell package-repositories, which contain a fully featured ffmpeg. You first must add these repositories to your package-manager to get the correct ffmpeg-version.


QuoteAlso, there's some security considerations on copying something to /bin...

I don´t copy anything to /bin... , so no security considerations ;)
https://sternenkarten.com/
600D, 6D, openSUSE Tumbleweed

50mm1200s

Quote from: escho on May 15, 2018, 03:40:20 PM
I don´t copy anything to /bin... , so no security considerations ;)

Oh, that's right. Just saw you're using home with a directory named /bin. Sorry.

escho

openSUSE:

Quote from: escho on May 14, 2018, 09:05:28 PM

Did I tell you, that I´m sometimes a bit lazy. So I wrote some lines into the MLVAPP.pro-file. Now qmake-qt5 and make are doing the job for me. Now I have the mlvapp-starter in the multimedia-part of the KDE-Quickstart-menue. And I appended it to my desktop.


target.path = $$(HOME)/bin
desktop.path = $$(HOME)/.local/share/applications
desktop.files += mlvapp.desktop
icon512.path = $$(HOME)/.local/share/icons/hicolor/512x512/apps
icon512.files += RetinaIMG/MLVAPP.png

INSTALLS += target desktop icon512


The way to install mlvapp and a desktop-file is now:

qmake-qt5
make
make install


Note, that is only valid for Linux-openSUSE with KDE. It should run on Kubuntu as well. Ubuntu with gnome or Ubuntumate could b different. I cannot test Gnome, but I have ubuntumate. I will give ubuntumate a try next days

Tried this with kubuntu 18.04 LTS.

Works for the desktop-file
Compiling need qmake instead of qmake-qt5:

qmake
make
make install
https://sternenkarten.com/
600D, 6D, openSUSE Tumbleweed

escho

ffmpeg-linux-static-builds

There are no more linux-static-builds of actual ffmpeg-versions available for some time. For more info, please have a look at the ffmpeg-website.
https://sternenkarten.com/
600D, 6D, openSUSE Tumbleweed

york824

Hi everyone I'm very new to raw video shooting and I have some questions which after some searching I still can't find answers to.

When using MLV App to export MLV files to CinemaDNG, I always get half-resolution DNG files. I shoot in 1736*976 (streched from 1736*586) but only get 868*488 files. If I choose to "Export Actual Frame" then I get the full resolution DNG. Is it normal? Right now I can only make some adjustments in MLV App and export to Prores but I want to use Lightroom to do some more editing or using Rawtherapee to completely remove all the pink dots. How do I get the full-resolution DNG files?

masc

@escho: thx for all your research and all the information you gave! Maybe that helps me - will have a closer look when I am back at home.
The paths I wrote in the .pro file were paths inside the app package. In the Qt bin directory must be a linuxdeployqt executable. This one builds the app package for linux. And this package has a special directory tree, has the desktop file, has the icon,... on OSX that nearly works out of the box...  :P

Should we add the ffmpeg static executable for linux to the repos as well? For Win & OSX we did it... If you mean it would be good, can you upload your ffmpeg version somewhere for me?

@Danne: for your compiler script: do you also have a svn checkout and update function? For each commit only some bytes are changing, so loading all 65MB makes no sense at all.
5D3.113 | EOSM.202

masc

Quote from: york824 on May 17, 2018, 05:58:15 PM
Hi everyone I'm very new to raw video shooting and I have some questions which after some searching I still can't find answers to.

When using MLV App to export MLV files to CinemaDNG, I always get half-resolution DNG files. I shoot in 1736*976 (streched from 1736*586) but only get 868*488 files. If I choose to "Export Actual Frame" then I get the full resolution DNG. Is it normal? Right now I can only make some adjustments in MLV App and export to Prores but I want to use Lightroom to do some more editing or using Rawtherapee to completely remove all the pink dots. How do I get the full-resolution DNG files?
Could you please upload such a mlv file for debugging for us? I've never seen this... When I remember right CDNG out resolution is the same as the MLV resolution, no matter what you set up in the app.
5D3.113 | EOSM.202

Danne

Quote from: masc on May 18, 2018, 01:46:18 PM
@Danne: for your compiler script: do you also have a svn checkout and update function? For each commit only some bytes are changing, so loading all 65MB makes no sense at all.

svn checkout, never heard of it  :P

My workflow here is I compile the Mlv App every time the automator app is started. Before compiling it will update repository to see if there´s any news going on.

So if I understand correctly you ask for a function which only compile if any updates occured and only fo the files updated in question?

Here´s the script atm so shouldn´t be hard to see whats going on:
#!/usr/bin/env bash

#start in user directory
cd ~

if ! [ -d /Library/Developer/CommandLineTools ]
then
xcode-select --install
fi

#check for dependencies
if ! [ -f /usr/local/bin/brew ]
then
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi

#check for qt versions
if ! [ -d /usr/local/Cellar/qt/5.1* ]
then
brew install qt5
brew upgrade qt5
fi

if ! [ -d ~/MLV-App-master ]
then
curl -L https://github.com/ilia3101/MLV-App/archive/master.zip -o mlvapp_master.zip && \
unzip mlvapp_master.zip -d ~/
rm ~/mlvapp_master.zip
else
echo "updating MLV-App-master source"
cd ~/MLV-App-master
git pull https://github.com/ilia3101/MLV-App
fi
if ! [ -f ~/MLV-App-master/platform/qt/FFmpeg/ffmpeg ]
then
unzip ~/MLV-App-master/platform/qt/FFmpeg/ffmpegOSX.zip -d ~/MLV-App-master/platform/qt/FFmpeg/
fi
cd ~/MLV-App-master/platform && \
rm -r MLVAPP
mkdir -p MLVAPP && \
cd MLVAPP && \
$(ls /usr/local/Cellar/qt/5* | head -1 | tr -d ':')/bin/qmake ~/MLV-App-master/platform/qt/MLVApp.pro -spec macx-clang CONFIG+=x86_64 CONFIG+=release && /usr/bin/make -j4 && $(ls /usr/local/Cellar/qt/5* | head -1 | tr -d ':')/bin/macdeployqt ~/MLV-App-master/platform/MLVAPP/MLV\ App.app && \
make clean && \
open ~/MLV-App-master/platform/MLVAPP/

escho

@masc
Thanks for the explanation.

Yes, I think it would make sense to add the ffmpeg-static for linux to the repo. Would make thinghs easier. Unfortunately I have deleated my ffmpeg version, so I cannot upload it. But It looks like the static version will be back soon on the ffmpeg-site.
https://sternenkarten.com/
600D, 6D, openSUSE Tumbleweed

qqqavi

Has anyone noticed any difference between .dng uncompressed and lossless? 


masc

Quote from: qqqavi on May 18, 2018, 05:00:18 PM
Has anyone noticed any difference between .dng uncompressed and lossless?
Sure: uncompressed is uncompressed and lossless is lossless (compressed).

Quote from: Danne on May 18, 2018, 02:02:45 PM
svn checkout, never heard of it  :P
Try out (OSX & Linux):

svn co https://github.com/ilia3101/MLV-App.git/trunk <folderOnYourDisk>

This checks out the whole repos. After this is done you'll never have to load all again! Now do just:

svn up

This only loads the few changed bits and bytes from your last svn update/checkout to the actual revision...
5D3.113 | EOSM.202

qqqavi

TEST:

Two .dng sequences 14bits lossless, same raw settings.
.dng from MLVRaw Viewer 1.4.3 and .dng from MLVApp Alpha



 
In order to see the difference, I mixed the two waveforms. The red one represents the .dng from MLVRawViewer.  There is a slight visual difference between both. Doesn't seem like a big deal, however the MLVApp .dng visually has more red and blue.

In Premiere Pro CC the .dng from MLVApp needs a while to play and it's slower however .dng from MLVRaw Viewer plays smoothly.


50mm1200s

So, I did a entire production with MLV and processed with MLVApp.
Here's some usability stuff I missed and would be really helpful if implemented:

1- Do not pop ffmpeg terminal (hide it). I myself work using workspaces with tiling windows. Everytime I export clips on MLVApp the ffmpeg terminal pops while I'm doing other stuff.
2- Present export options after choosing the folder for the selected clips or do a qeue panel. For example, DNxHR will not export without having the correct FPS, so I would find it better to have the export settings pop after the selected folder...
3- Fast kill (abort) export. Always I want to abort the rendering I have to wait like 1-2 minutes. Could be faster this, don't? Idk about windows, but Mac and Linux have the "kill -9" command that kill right away the process.
4- I think MLVapp is caching all MLV when loaded. Maybe it would be better to cache just the first frame, for fast loading, since (in my case) I did all the corrections using the first frame only.
5- The paused preview could be in AMaZe automatically, instead of bilinear. Save bilinear only for playback (?)
6- Copy parameters of the selected MLV to all files in session. I think it's a small change, but would save time from selecting all images manually.
7- WB Pipe for matching gray cards (I had to export a dng and check on rawtherapee to do this). I think @bouncyball already proposed this, but I'm confirming this would be very helpful (maybe when Ilia finish the new WB branch?)
8- OpenCL is in use? Could be a checkbox on the "About" panel, just to confirm it's working or not...
9- There's no resize options for DNxHR? I missed it :(

Kharak

6. You can use ctrl+c - ctrl+a - ctrl+v to apply changes to all clips.
once you go raw you never go back

bouncyball

@50mm1200s

1 - Console windows are hidden for any OS, but unfortunately this does not work for Windows. If someone will come up with the solution we're gonna really appreciate this.

2, 9 - Avid codecs are implemented with those restrictions in ffmpeg (I guess this is Avid spec restrictions).

3 - This should be related to stopping running ffmpeg process (however I never experienced this. How about @Ilia, @Masc, anyone?).

4 - On loading (parsing) the clip "MLV App" only caches some information derived from the MLV, like all absolutly needed block header metadata and video and audio frame offsets for fast and random frame access. The only case when actual video frames are cached if "Menu/Playback/Debayer for Preview/AMaZE Cached" is set (checked). In this case proggie tries to cache as many Amaze debayered frames as possible according to available memory.

5 - Yeah, I think this could be done and useful.

6 - Kharak already answered that. This functionality is implemented long time ago.

7 - Simple WB color picker is on schedule, needs WhiteBalance branch to be settled.

8 - OpenCL is not used right now. Only some experiments were done by me and Ilia.

Regards
bb

50mm1200s

Quote from: Kharak on May 20, 2018, 09:44:06 AM
6. You can use ctrl+c - ctrl+a - ctrl+v to apply changes to all clips.

Oh, that's cool. Thanks Kharak.

Quote from: bouncyball on May 20, 2018, 12:25:08 PM
@50mm1200s

1 - Console windows is hidden for any OS, but unfortunately this does not work for Windows. If someone will came up with the solution we're gonna really appreciate this.

I don't know how mlvapp is calling ffmpeg, but the command "start" seems to work for Windows scripts...

Quote
2,9 - Avid codecs are implemented with those restrictions in ffmpeg. (I guess this is Avid spec restrictions)

:/

Quote
4 - On loading (parsing) the clip "MLV App" only caches some information derived from the MLV, like all absolutly needed block header metadata and video and audio frame offsets for fast and random frame access. The only case when actual video frames are cached if "Menu/Playback/Debayer for Preview/AMaZE Cached" is set (checked). In this case proggie tries to cache as many Amaze debayered frames as possible according to available memory.

Ok. Well, while I try to select a new clip it has a big latency (~10s) until I'm finally able to change settings for this file. It was a bit annoying, because I had about 40 mlv files and, even though I copied the first clip settings to all the other 39, I had to adjust the exposure manually...

Quote
7 - Simple WB color picker is on schedule, needs WhiteBalance branch to be settled.

Nice!

Quote
8 - OpenCL is not used right now. Only some experiments were done by me and Ilia.

Yeah, my impression is that the prog behind opencl I kinda complicated.


Thanks bouncyball!

ilia3101

bouncyball summed it up perfectly, also 5 was always done in Cocoa app ;D, I don't remember exactly how it was implemented but it was quite simple.