0

Hi i am working on a project that will get metadata from an mp3 file and then stream the file with text displaying the Artist Name and Song Title from the metadata.

In order to get around a bug I concatenated the audio files into one larger file and got the meta data from each track before the concatenation.

While streaming I want to display the artist name and song title while the track is playing.

The current text script for just the text looks like this:

drawtext=text='Artist: ARTISTNAME:fontfile=PATH/TO/FONT/FILE:fontsize=(w * 0.03333333333333333):bordercolor=#000000:borderw=1:fontcolor=#FFFFFF:y=(h * 0.15):x=(w * 0.02),drawtext=text='Song: NAME’OFSONG:fontfile=PATH/TO/FONT/FILE:fontsize=(w * 0.03333333333333333):bordercolor=#000000:borderw=1:fontcolor=#FFFFFF:y=(h * 0.25):x=(w * 0.02)"

How can I add time duration element to the FFMEG script?

Thanks!

  • 1
    Not exactly sure what you're asking. If you want the drawtext instance to show for a certain time see the [`enable` option](https://ffmpeg.org/ffmpeg-filters.html#Timeline-editing). Although an easier method would be to use a typical subtitles file with the subtitles filter. If you require drawtext usage then another method is to control timing with the addition of the sendcmd filter. Or use `textfile` and `reload=1` and atomically update the text file whenever you want to change the text. – llogan Apr 18 '20 at 18:41
  • HEYYOO! the enable option is exactly what I needed. Thanks! – bleepbloopbleep Apr 18 '20 at 19:49

0 Answers0