Re: [Mlt-devel] Issue with new consumer scaling feature
On Fri, Jan 17, 2020 at 12:59 AM jb wrote: > Hi Dan, all, > > First, thanks a lot for implementing the much anticipated consumer scaling > feature! Nice way to do it! While testing it, I noticed a problem with > transitions. > > It seems like the "consumer_scale" property is not always properly > propagated > to the frames. Because of this, transitions sometimes produce a "full > size" > image instead of a correctly scaled result. > > Issue is reproducible at least with the "composite", "affine" and > "qtblend" > transitions. It seems like the "consumer_scale" value is correct on the > a_frame but not on the b_frame. > > Changing this line (in the mentionned transition code) : > double resolution_scale = mlt_frame_resolution_scale(b_frame); > > to: > double resolution_scale = mlt_frame_resolution_scale(a_frame); > > fixes the issue. You are correct. I fixed it in qtblend and affine. However, composite has not been updated to use mlt_frame_resolution_scale(). When I looked into that today, I noticed it that it is already working by simply taking a ratio of the get_image() width and height arguments over the profile width and height. This rule was also in transition affine as`(double) *width / normalised_width;`. Thus, I am thinking about removing mlt_frame_resolution_scale(), the consumer scale property, and simply applying this technique everywhere. Moreover, this can be done separately for width and height to make it slightly more accurate when one dimensions needs to change slightly more or less than the other in order to enforce a multiple of 2 or more. What do you think? Is there a situation where this is not desirable and an explicit scale is necessary? Dan ___ Mlt-devel mailing list Mlt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mlt-devel
[Mlt-devel] Disabling audio/video + audio mix + combining a video and audio playlist
Hello, I am turning to this mailing list hoping for help because i could not figure out by myself how to do this. My situation is : I have 3 video, only 2 of them have audio. Video 1 starts with it's video and audio. Video track 2 and 3 are added after Video 1 and mixed together with multiple luma transitions. Audio from video 2 is added after Video 1 I figured out how to create the video track with everything. I thought about creating the following system to handle the audio. - multitrack - video (track 0) playlist of video 1, 2 and 3 with all transitions. - audio (track 1) playlist of audio 1 and 2 (2 sec mixing between the 2) Now first i would like to know if it make senses? Secondly i have been unable to perform a very simple things, loading only the video or audio track in a producer. I've tried using video_index/audio_index to -1 but it leaves an empty video or audio track. For example : mlt_profile profile = mlt_profile_init(NULL); /// AUDIO TRACK mlt_playlist playlist_a = mlt_playlist_init(); // Load the base introduction AUDIO mlt_producer producer_intro_a = mlt_factory_producer( profile, NULL, "../proj/intro-core.m4a" ); mlt_playlist_append( playlist_a, producer_intro_a ); mlt_producer_close(producer_intro_a); // Load the main body AUDIO mlt_producer producer_body_a = mlt_factory_producer( profile, NULL, "../proj/truncated.m4a" ); mlt_playlist_append( playlist_a, producer_body_a ); mlt_producer_close( producer_body_a ); mlt_consumer consumer = mlt_factory_consumer( profile, "avformat", "../medias/merged.m4a" ); mlt_consumer_connect( consumer, mlt_playlist_service(playlist_a)); This will create a file with my audio combined (ok) BUT there is a video track with only white :/ I just want to combine the 2 audio track. (i left off the 2 sec mixing, don't really know how to do it either) This is my first time using MLT and there is almost no example of many object and concepts so i have struggling a lot. Thanks a lot for your help. ___ Mlt-devel mailing list Mlt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mlt-devel