On Mon, Jul 24, 2023, at 20:33, Dan Dennedy wrote:
> "transparent" is not a valid color name: See
> https://mltframework.org/plugins/ProducerColor/
> It just so happens to work though since it tries to convert the string to an
> int resulting in 0, which is equivalent.
Ah, I see, thanks for the clarification.
> The higher order track gets priority when using multitrack, and there is no
> automatic blending or mixing of audio.
> But the workaround does not need to be so heavy as to require blending with
> transparent. Why does Flowblade, Shotcut, and Kdenlive not suffer from this
> problem? I am quite certain this used to work in melt without multiple tracks
> - probably before the audio pipeline became more powerful and flexible. These
> apps automatically add track mixers and include a hidden, silent, black track:
> melt -track color out=75 -track color:red in=0 out=25 -blank 25 color:blue
> in=0 out=25 -transition mix -consumer avformat:test.mp4
I can see how using blanks mixed with a silent black track would also work fine.
> Now, how can it work without that? The default sample format in MLT is signed
> 16-bit (as produced in mlt_frame_get_audio() for frames with dummy audio).
> However, avformat consumer tries to render using the selected codec's default
> sample format (at some point it did not). The implied codec of test.mp4 is
> aac, which is float (mlt_audio_f32le). If we instead change the audio codec
> to pcm_s16le and the filename extension to .mov (pcm is not supported in MP4
> by standards and ffmpeg), then it succeeds:
> melt color:red in=0 out=25 -blank 25 color:blue in=0 out=25 -consumer
> avformat:test.mov acodec=pcm_s16le
>
> In any case, if you play this back you see white frames in between the colors
> red and blue. That brings up another point: is that what you expect in
> "blank?" In MLT the dummy image for frames is solid white. This was chosen to
> facilitate troubleshooting because it should be generally avoided, and black
> is too easily overlooked. That is why most MLT apps are mixing with a silent
> black track - to explicitly give users black when they expect it.
Yeah, mixing with a black track seems to be preferred.
> I found you are working on your own new video editor
> <https://rickardlindberg.me/writing/writing-my-own-video-editor/>. You are
> free to do whatever you want, but I do encourage you to work with one of the
> existing projects. I do not want to speak for Brian, but he and I make
> Shotcut.
Good to know. Right now I'm also working on my own project because I think it
is fun. It might not end up being something usable, and then I will probably
still use Kdenlive for my video projects. We'll see.
/Rickard
_______________________________________________
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel