Understanding/controlling MLT melt slideshow?

后端 未结 1 628
后悔当初
后悔当初 2021-01-21 04:06

Consider the following bash script (on Ubuntu 18.04, melt 6.6.0), which uses melt to make a slideshow and play it locally in a window (SDL consumer), m

相关标签:
1条回答
  • 2021-01-21 04:16

    Ok, so, I spent some time looking into the commands for melt and turns out there is actually a pretty effective way of altering a bunch of images (if the number of arguments is too long or there are too many characters for your terminal to handle).

    What you want to do is to use -serialise <name of file>.melt which will store your commands (you can also create this file manually). Then to execute that file, use melt <name of file>.melt along with any other options you have for your video file.

    Example Format:

    melt <images and what to do to them> -serialise <name of file>.melt


    Example


    Create the melt file (with Melt CLI)

    melt image1.png out=50 image2.png out=75 -mix 25 -mixer luma image3.png out=75 -mix 25 -mixer luma image3.png out=75 -mix 25 -mixer luma image4.png out=75 -mix 25 -mixer luma <...> -serialise test.melt


    .melt file format

    test.melt

    image1.png out=50 image2.png out=75 -mix 25 -mixer luma image3.png out=75 -mix 25 -mixer luma image3.png out=75 -mix 25 -mixer luma image4.png out=75 -mix 25 -mixer luma <...>


    Run

    melt test.melt -profile atsc_1080p_60 -consumer avformat:output.mp4 vcodec=libx264 an=1


    Additional Notes

    There should be an extra return character at the end of the melt file. If there isn't, Exceeded maximum line length (2048) while reading a melt file. will be outputted

    Notice that -serialise <name of file>.melt will not be in the .melt file

    Melt will actually take some time to load the melt file before the encoding process begins

    0 讨论(0)
提交回复
热议问题