Opened 3 years ago

Last modified 3 years ago

#9227 new defect

Cannot use any fonts including system fonts

Reported by: Jefferson Villasan Josol Owned by:
Priority: normal Component: avfilter
Version: git-master Keywords: ass
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by Jefferson Villasan Josol)

This is the complete command line I've used

ffmpeg -y -i "/storage/0040-18A0/Music Videos on YouTube/TO be synced/ICSM dance.mkv" -c:s copy -q:s 0 -c:a copy -c:d copy -c:v mpeg2video -q:v 0 -map_metadata 0 -vf "scale=1920:-1,colorspace=all=bt2020,ass=/storage/0040-18A0/Music Videos on YouTube/TO be synced/ICSM dance.ass:fontsdir=/system/fonts/DroidSans.ttf" -bufsize 960M -maxrate 480M -r:v 30 -r:a 30 -t 30 -movflags +write_colr "/storage/0040-18A0/Music Videos on YouTube/TO be synced/30s samples.ts"

This is the input and output says...

Input #0, matroska,webm, from '/storage/0040-18A0/Music Videos on YouTube/TO be synced/ICSM dance.mkv':
  Metadata:
    COMPATIBLE_BRANDS: iso6mp41
    creation_time   : 2020-12-16T20:39:56.000000Z
    MAJOR_BRAND     : dash
    MINOR_VERSION   : 0
    ENCODER         : Lavf58.76.100
  Duration: 00:03:30.07, start: 0.000000, bitrate: 218 kb/s
  Stream #0:0(eng): Video: vp9 (Profile 0), yuv420p(tv, bt709), 256x144, SAR 1:1 DAR 16:9, 29.97 fps, 29.97 tbr, 1k tbn, 1k tbc (default)
    Metadata:
      DURATION        : 00:03:30.009000000
  Stream #0:1: Audio: aac (LC), 44100 Hz, stereo, fltp (default)
    Metadata:
      HANDLER_NAME    : ISO Media file produced by Google Inc.
      VENDOR_ID       : [0][0][0][0]
      DURATION        : 00:03:30.071000000
Stream mapping:
  Stream #0:0 -> #0:0 (vp9 (native) -> mpeg2video (native))
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[Parsed_ass_2 @ 0xa51dd240] libass API version: 0x1501000
[Parsed_ass_2 @ 0xa51dd240] libass source: tarball: 0.15.1
[Parsed_ass_2 @ 0xa51dd240] Shaper: FriBidi 1.0.10 (SIMPLE) HarfBuzz-ng 2.8.1 (COMPLEX)
[Parsed_ass_2 @ 0xa51dd240] Using font provider fontconfig
[Parsed_ass_2 @ 0xa51dd240] Added subtitle file: '/storage/0040-18A0/Music Videos on YouTube/TO be synced/ICSM dance.ass' (2 styles, 58 events)
[Parsed_ass_2 @ 0xa51dd240] Neither PlayResX nor PlayResY defined. Assuming 384x288
Output #0, mpegts, to '/storage/0040-18A0/Music Videos on YouTube/TO be synced/30s samples.ts':
  Metadata:
    COMPATIBLE_BRANDS: iso6mp41
    creation_time   : 2020-12-16T20:39:56.000000Z
    MAJOR_BRAND     : dash
    MINOR_VERSION   : 0
    encoder         : Lavf58.76.100
  Stream #0:0(eng): Video: mpeg2video (Main), yuv420p(tv, bt2020nc/bt2020/bt2020-10, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 30 fps, 90k tbn (default)
    Metadata:
      DURATION        : 00:03:30.009000000
      encoder         : Lavc58.134.100 mpeg2video
    Side data:
      cpb: bitrate max/min/avg: 480000000/0/200000 buffer size: 960000000 vbv_delay: N/A
  Stream #0:1: Audio: aac (LC), 44100 Hz, stereo, fltp (default)
    Metadata:
      HANDLER_NAME    : ISO Media file produced by Google Inc.
      VENDOR_ID       : [0][0][0][0]
      DURATION        : 00:03:30.071000000

Can anyone help me how to use system fonts on ffmpeg Termux? Whatever I try is only giving me DroidSansFallback. Here is another one that ffmpeg says....

[Parsed_ass_2 @ 0xa51dd240] fontselect: ("/system/fonts/DroidSans.ttf", 400, 0) -> /system/fonts/Lohit-Punjabi.ttf, 0, Lohit-Punjabi
[Parsed_ass_2 @ 0xa51dd240] fontselect: (DroidSansChinese, 400, 0) -> /system/fonts/Lohit-Punjabi.ttf, 0, Lohit-Punjabi
[Parsed_ass_2 @ 0xa51dd240] Glyph 0x41 not found, selecting one more font for (DroidSansChinese, 16, 400)
[Parsed_ass_2 @ 0xa51dd240] fontselect: (DroidSansChinese, 400, 0) -> /system/fonts/DroidSansFallback.ttf, 0, DroidSansFallback

This the last ffmpeg says...

frame=  899 fps=1.7 q=0.0 Lsize=   25350kB time=00:00:29.97 bitrate=6927.5kbits/s speed=0.0563x
video:24095kB audio:469kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 3.197927%

Thanks in advance for those who can help me!

Attachments (1)

DroidSansMono.ttf (116.6 KB ) - added by Jefferson Villasan Josol 3 years ago.
This is the font I'm trying to use

Download all attachments as: .zip

Change History (7)

comment:1 by Jefferson Villasan Josol, 3 years ago

Description: modified (diff)

comment:2 by Jefferson Villasan Josol, 3 years ago

Description: modified (diff)

comment:3 by Carl Eugen Hoyos, 3 years ago

Keywords: ass added; Incorrect fonts removed
Priority: importantnormal

Please provide the command line you tested together with the complete, uncut console output and provide an input file to make this a valid ticket.

in reply to:  3 comment:4 by Jefferson Villasan Josol, 3 years ago

Replying to Carl Eugen Hoyos:

Please provide the command line you tested together with the complete, uncut console output and provide an input file to make this a valid ticket.

The command line is on the top hehehehe😅 should I upload the input and the font file?

by Jefferson Villasan Josol, 3 years ago

Attachment: DroidSansMono.ttf added

This is the font I'm trying to use

comment:5 by Jefferson Villasan Josol, 3 years ago

Description: modified (diff)

comment:6 by Jefferson Villasan Josol, 3 years ago

The input file exceeds 2.5mb, I can't attach it here

Note: See TracTickets for help on using tickets.