kosua20 / MIDIVisualizer

A small MIDI visualizer tool, using OpenGL
MIT License
1.05k stars 137 forks source link

Add transparency support to video export, too #94

Closed csillag closed 3 years ago

csillag commented 3 years ago

It would be great to get alpha transparency to work for video output too.

Currently it works great for PNG export, but my main use case is video, and as far as I can tell, with the current version (6.2), the alpha channel is lost when generating an MP4 file.

These links might be relevant:

Thanks.

csillag commented 3 years ago

I can confirm the using the series of generated PNG files as input for FFMPEG works as intended... just slow and cumbersome. (Direct video export would be much faster.)

csillag commented 3 years ago

When implementing video export, my preference would be speed and image quality. I don't care about output file size; it can even be uncompressed, because this is only an intermediary start; it's the input of another round of ffmpeg processing, and I will apply proper compression then and there.

(Hence, doing video compression during the midi visualization phase is just a waste of time for me.)

csillag commented 3 years ago

@kosua20 here is a recent example, generated using the transparent PNG export method:

https://vimeo.com/520439875/189232a7be

kosua20 commented 3 years ago

Hello, thank you for your interest in MIDIVisualizer and for this detailed issue! I'm planning on adding support for the ProRes format as FFMPEG supports it well, would this be convenient for your process? Or did you have another specific format in mind?

csillag commented 3 years ago

If it works with FFMPEG, then it's good enough for me, too. (I will use it as input for FFMPEG.)

My considerations are

Within ProRes, I would go for 4444 XQ, 1920 × 1080, 50p, 16 bit alpha.... .... and set parameters for best speed, as described here.

Thanks.

kosua20 commented 3 years ago

Hello again, thank you once again for these details! From what I understood from the FFMPEG documentation, the fast ProRes codec is picked by default and the "best parameters" suggested in the list are for the fallback, slower codec. I've still used the suggested settings in MIDIVisualizer, in case this fallback happens on some platforms. The latest 6.3 release now support ProRes export.

csillag commented 3 years ago

Thank you for the new feature! I have made some testing with the performance, with a 70 seconds long track.

.. so basically, it's twice as fast now, which is obviously great.

Here is my latest export, using transparent background in ProRes format:

https://vimeo.com/426953775/edf6e71efa

So as far as I am concerned, this issue can be closed now.

sxjeru commented 2 years ago

Excuse me, although I successfully exported the mov file with alpha channel, it doesn't seem to be supported by Adobe premiere, i.e. the background is still black. And no alpha channel was recognized.

MIDIVisualizer 6.5