
The duration doesn't really matter: it just needs to be longer than the audio file duration. This example sets the duration to 10 hours. Using the color filter for the background and the subtitles filter for the text.įirst, create SRT (SubRip) file. Method 3: Line break in command ffmpeg -f lavfi -i color=c=green:s=320x240:d=0.5 -vf "drawtext=fontfile=/path/to/font.ttf:fontsize=30:fontcolor=white:x=(w-text_w)/2:y=(h-text_h)/2:text='Stack

The ffmpeg command: ffmpeg -f lavfi -i color=c=green:s=320x240:d=0.5 -vf "drawtext=fontfile=/path/to/font.ttf:fontsize=30:fontcolor=white:x=(w-text_w)/2:y=(h-text_h)/2:textfile=text.txt" output.mp4 The contents of the text file, text.txt, looks like this: Stack Method 1: Multiple drawtext instances ffmpeg -f lavfi -i color=c=green:s=320x240:d=10 -vf "drawtext=fontfile=/path/to/font.ttf:fontsize=30:fontcolor=white:x=(w-text_w)/2:y=(h-text_h-text_h)/2:text='Stack',drawtext=fontfile=/path/to/font.ttf:fontsize=30:fontcolor=white:x=(w-text_w)/2:y=(h+text_h)/2:text='Overflow'" output.mp4 This filter will automatically wrap long text. You can chain together two drawtext filters, or reference an external text file with the textfile option, or add the line break in the command.Īlternatively, see the example below using the subtitles filter. Right image is from the external file and line break examples. It's easier to center the two lines with multiple drawtext instances (left image). Same as above, but video will automatically match audio duration by removing duration=10 and adding -shortest: ffmpeg -f lavfi -i color=size=320x240:rate=25:color=blue -i audio.m4a -vf "drawtext=fontfile=/path/to/font.ttf:fontsize=30:fontcolor=white:x=(w-text_w)/2:y=(h-text_h)/2:text='Stack Overflow'" -c:a copy -shortest output.mp4Īnother example with a white box behind the text at 25% opacity with 5 pixel padding:įfmpeg -f lavfi -i color=c=red:s=320x240:d=10 -vf Overflow'" output.mp4
#Aegisub manual how to#
#Aegisub manual manual#
Karaoke Builder Studio and Power Karaoke CD+G Creator are both softwares, which can sync and export a file that works in Singa without any manual work. srt file that looks like this:Īs you can see in the example, we want The song continues like this to be on the same line.

Note! Insert this line break directly after the text without spaces! You must add \n where you want to divide lines. Regardless of the lines, the words will appear in the karaoke text on the same line until \n changes lines. This file needs to be modified for the format to be supported by Singa. The result of both looks like this and both can be edited with a text editor: Once you've synced your song, export it out in the correct format.

However, the file format they provide requires a bit of manual editing to make it work in Singa.
#Aegisub manual free#
Aegisub and Subtitle Edit are both free softwares to sync your karaoke text.
