Re: [Mlt-devel] MELT: adding 2 new tracks (video) from a same starting point
Brought to you by:
ddennedy,
lilo_booter
From: Dan D. <da...@de...> - 2010-04-16 02:54:29
|
On Sat, Apr 10, 2010 at 11:40 AM, Brice Vercoustre <br...@ve...> wrote: > Hi all, > > I'm trying to find the proper command line that would help me insert 2 new tracks (A & B) starting both from the first frame at the same moment (in=0) of a "color:black" background video (640x360, 16:9). > > Track "A" should contain a first_video.wmv (640x480, 4:3) with a geometry attribute that would place it on top left bottom as a 160x120 thumbnail (0%,0%:25%x33.33%). It is going to contain the video of a human's performance. > > Track "B" should contain a second_video.wmv (640x480, 4:3), also with a geometry attribute that would place it on right in 480x360 - full height (25%,0%:75%x100%) as the principal video. It is going to contain the VGA output recording of the speaker's PC that displayed a powerpoint presentation. > > If the shema above is displayed properly, it should illustrate what kind of result I'm seeking: > > +------------------------------------+ > |+-------+ +-----------------------+| > || A | | || > |+-------+ | B || > | | || > | | || > | +-----------------------+| > +------------------------------------+ > > > > Here is the command line I tried : > > melt color:black length=250 out=250 > > -track avformat:first_video.wmv in=0 out=250 length=250 -transition composite always_active=1 geometry="0%,0%:25%x33.33%" distort=1 -filter channelcopy to=0 from=1 > > -track avformat:second_video.wmv in=0 out=250 length=250 -transition composite always_active=1 geometry="25%,0%:75%x100%" distort=1 > > -consumer avformat:result.mp4 f=mp4 acodec=libfaac ab=92k ac=2 pix_fmt=yuv420p vcodec=libx264 vpre=fastfirstpass minrate=0 b=1000k threads=0 b_strategy=1 subcmp=2 cmp=2 coder=1 flags=+loop flags2=dct8x8 qmax=51 subq=7 qmin=10 qcomp=0.6 qdiff=4 trellis=1 aspect=1.7777 s=640x360 > > > > The result is the B track that takes all the video resolution (the geometry attribute is not respected). If I try the command line with only one of the two track, neither A or B, the result is perfect: I get either the thumbnail in top left corner, or the main video on right. > > Please do you know how I can get both track A & B working together? Or must I try something else to get my result? > > Thank you so much for your help ;-) > A few things need to be done. 1.) Put all transitions after the tracks. 2.) Set track_a and track_b properties on the transitions. 3.) Set a duration on the transitions by setting the out points. A few remarks: 1.) You do not need to set the length property on anything in the above. 2.) I discourage usage of the distort property on the composite transition. 3.) I encourage usage of the progressive=1 property on the composite transition. 4.) You do not need to explicitly set the producer to use on the video files. melt color:black out=250 \ -track first_video.wmv out=250 channelcopy to=0 from=1 \ -track second_video.wmv out=250 \ -transition composite geometry="0%,0%:25%x33.33%" out=250 a_track=0 b_track=1 progressive=1 \ -transition composite geometry="25%,0%:75%x100%" a_track=0 b_track=2 out=250 progressive=1 -- +-DRD-+ |