Opened 3 years ago

Closed 17 months ago

#7948 closed defect (fixed)

drawtext don't use last line from text file

Reported by: jb_alvarado Owned by:
Priority: normal Component: avfilter
Version: git-master Keywords: drawtext
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


Summary of the bug:
Editors like nano, Atom or other put automatically a line at the end of an text file.

When drawtext now drawing a box behind the text the box is bigger then the text, because of this empty line in the text file at the end.

It would be nice if the filter would ignore the very last empty line.

Change History (4)

comment:1 by Carl Eugen Hoyos, 2 years ago

Keywords: newline removed
Priority: normalwish

comment:2 by Marc Hohenleitner, 19 months ago

Priority: wishnormal
Type: enhancementdefect

Hi, we have the same problem with CentOS 8, nano and cURL generated text files. There is always an additional line at the end of those files. This extra line is not visible in the editors itself and not deleteable. Unfortunately ffmpeg/drawtext reads this as a regular line and draws the box one line bigger.

With RaspberryPi OS this phenomenon does not appear. It seems the extra line is distribution relatable.

Therefore, an option how ffmpeg treats the last line in a text file would be much appreciated! In other words, the box function is not useable combinded with a textfile, affected by the "extra line problem".


comment:4 by Balling, 17 months ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.