mrv2: "Save Movie Error - Invalid Argument" (+Compiling MRV2 in Windows)

Here’s what I get in the output log when attempting to save a movie of a 16-bit EXR image sequence (Windows 10 | mrv2 v1.0.5 pre-compiled installer):

[save] Image info: 2048x858 RGBA_F16
[save] Output info: 2048x858 RGB_U8
ERROR: [save] E:/MyVideoFile.mp4: avcodec_open2 - Invalid argument

Am I just missing something here? Saving/Exporting movies isn’t covered anywhere in the documentation. I have FFMPEG (full) installed at C:\FFMPEG\, but mrv2 seems to be using it’s own ffmpeg libraries as updating FFMPEG today didn’t make any difference here.

The ProRes profiles seem to work fine, as does choosing None for profile, but None gives me an H.263 video, which isn’t supported as embeddable on most comms platforms (Slack, Discord etc). As ProRes also isn’t an embeddable codec on these platforms, I currently have no way to use mrv2 to process render dailies (which I would love to be able to do instead of using Adobe Media Encoder.

Side Note: Where are the FFMPEG profiles saved? Can I edit/add to that list myself using the pre-compiled install of mrv2 or do I need to build from src?

About this issue

  • Original URL
  • State: closed
  • Created 5 months ago
  • Comments: 34 (20 by maintainers)

Most upvoted comments

Side Note: Where are the FFMPEG profiles saved? Can I edit/add to that list myself using the pre-compiled install of mrv2 or do I need to build from src?

I have added FFmpeg presets to mrv2 v1.0.5 (currently in beta). The current beta lives in www.sourceforge.net/projecs/mrv2/files/beta.

You can either donwload it to try it, or compile it again yourself with:

cd mrv2_dir
git switch main
git pull
./runme.sh

I also improved the performance of compiling and removed the potential for network errors when updating Msys64 (it is now updated only once).

The msys2 errors are network errors. You might need to start the build with runme.sh again if you get them if some Msys package does not sync.

The byte compiling error is a typo the pyFLTK guys missed. You can ignore it.

El mar, 13 de feb. de 2024 17:05, Olympusmonsgames @.***> escribió:

Ok, got a new set of errors I haven’t seen before (starting ~Line 94 of compile.log:

:: Synchronizing package databases… clangarm64 downloading… mingw32 downloading… mingw64 downloading… ucrt64 downloading… clang32 downloading… clang64 downloading… msys downloading…error: failed retrieving file ‘ucrt64.db’ from mirror.msys2.org : SSL connection timeouterror: failed retrieving file ‘clang32.db’ from mirror.msys2.org : SSL connection timeouterror: failed retrieving file ‘clang64.db’ from mirror.msys2.org : SSL connection timeoutwarning: too many errors from mirror.msys2.org, skipping for the remainder of this transactionerror: failed retrieving file ‘msys.db’ from mirror.msys2.org : SSL connection timeoutresolving dependencies…looking for conflicting packages…

Also got two errors late in the build (~Lines 17702 and 17777 respectively)having to do with exceptions.py:

byte-compiling build\bdist.win-amd64\egg\fltk14\test\exceptions.py to exceptions.cpython-310.pycSorry: IndentationError: unexpected indent (exceptions.py, line 47)…Extracting pyFltk1.4-1.4.0rc1-py3.10-win-amd64.egg to c:\mrv2\build-msys-amd64\release\install\bin\lib\site-packagesSorry: IndentationError: unexpected indent (exceptions.py, line 47)Adding pyFltk1.4 1.4.0rc1 to easy-install.pth file

— Reply to this email directly, view it on GitHub https://github.com/ggarra13/mrv2/issues/183#issuecomment-1942345275, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOKUC44A2PH4RX3YAT32GTYTPBQNAVCNFSM6AAAAABCJ2Q2MSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBSGM2DKMRXGU . You are receiving this because you commented.Message ID: @.***>

Make sure to check the new build requirements, as you now need to install “meson” too on Windows (ie. the meson .msi installer) for the dav1d (AV1 decoder). Also, the AV1 encoder currently works in software only, so it is still somewhat slower than H264. I will be adding hardware encoding at some point, but the build scripts are hard to deal with as you need CUDA installled, which cannot be automated as you need to sign the NVidia EULA.

I have re-worked the ffmpeg and lcms2 compile scripts in the repository and I also added support for VP9 encoding and AV1 decoding and encoding, which are supported by Discord and are free of patents and license issues (and offer better quality than H264 on top).

cd /dir/of/mrv2/
git switch main
git pull
./runme.sh -gpl

It’s a bit unclear to me how to compile mrv2 on Windows.

I’ll try to make the instructions clearer.

Do I run the bat file? Or the runme.sh file (if so, do I run that in msys2)? I like the idea of compiling the NSIS installer, as I’d like to distribute the build to multiple of my machines. How do I incorporate that into the build? I’ve already downloaded fresh copies of msys2, NSIS, and CMake

First, you need to run the .bat file from its installed location (or make it as I do a shortcut in the Desktop). The .bat file should open a new MSYS2 terminal after saying a quick welcome message from the MSVC compiler. From then on, you run all MSYS2 commands. From the MSYS2 terminal it opens, you can verify that you can see the MSVC compiler if you do:

$ which cl.exe
/C/Program Files/MSVC2019/etc.../bin/cl.exe

If you cannot see the compiler, you modified the .bat file incorrectly (check the paths to it).

If you can see it, then you can proceed to:

$ cd /root/dir/of/mrv2
$ ./runme.sh -gpl   # -gpl to have it compile with H264 of FFmpeg.

That should compile mrv2 with its default settings (it will print out the number of CPUs and the CMake version). If you have a modern machine with 16 cores, it should take about 45-60 mins for the compilation to finish.

Assuming the compilation works, it will place the mrv2.exe in: /root/dir/of/mrv2/BUILD-Msys-amd64/Release/install/bin/mrv2.exe

If the compilation fails, you can always check the log to see what went wrong at: /root/dir/of/mrv2/BUILD-Msys-amd64/Release/compile.log

Look for “FAILED:”, “Error:”, “CMake Error”, etc.

If something went wrong, you can try compiling with one CPU core to make the compiled messages clearer like: ./runme.sh -j 1

Anyway, that should get you started. If you run into issues, feel free to ask again here, and make sure to attach the compile.log file.

Finally, if the compilation worked and you can run mrv2.exe from the installed location (ie. BUILD-MSys-amd64/Release/install/bin), you can proceed to packaging it with:


$ cd /root/dir/of/mrv2
$ ./runmeq.sh -t package

That will place the .exe and .zip files in:

/root/dir/of/mrv2/packages

Sorry if these are newbie questions, I have experience compiling/debugging C++ & Python scripts, but no experience packaging windows applications/installers.

Never mind the newbie questions. We’ve all had them.

Am I just missing something here? Saving/Exporting movies isn’t covered anywhere in the documentation.

Sadly, you are not missing anything. I’ll make sure to add a section to the documentation.

The ProRes profiles seem to work fine, as does choosing None for profile

The H264 codec is, unfortunately, only supported if you build mrv2 as GPL, as, otherwise, it requires a license from VideoLan. mrv2 is, by default, a BSD application, not a GPL one. If you want to build your own version of mrv2 as GPL, look for how to do it in the main page of https://github.com/ggarra13/mrv2.

Side Note: Where are the FFMPEG profiles saved? Can I edit/add to that list myself using the pre-compiled install of mrv2 or do I need to build from src?

They are stored in the mrv2 and tlRender source code. You cannot edit them easily.