Description
Function cannot take effect after call
Expected behavior
The font set can be used successfully
Current behaviorif let resourcePath = Bundle.main.resourcePath{ // 只有注册了的字体才能在字幕中使用 MobileFFmpegConfig.setFontDirectory(resourcePath, with: [FontName.Doppio_One.name : FontName.Doppio_One.value]) MobileFFmpegConfig.setFontDirectory(resourcePath, with: nil) }
.ass file content
Screenshots
Logs
2021-02-22 16:00:07.703230+0800 Expressionmanual[9058:646450] INFO:
Fontconfig warning: "/private/var/mobile/Containers/Data/Application/EF82C7E5-3083-4A68-888C-0CFD150E82E3/tmp/.mobileffmpeg/fonts.conf", line 4: Use of ambiguous path in
element. please add prefix="cwd" if current behavior is desired.
2021-02-22 16:00:07.724270+0800 Expressionmanual[9058:646450] INFO: Using font provider fontconfig
2021-02-22 16:00:07.724536+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.724572+0800 Expressionmanual[9058:646450] INFO: Added subtitle file: '/private/var/mobile/Containers/Data/Application/EF82C7E5-3083-4A68-888C-0CFD150E82E3/tmp/1613980807.ass' (2 styles, 4 events)
2021-02-22 16:00:07.724602+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.725712+0800 Expressionmanual[9058:646450] WARNING: deprecated pixel format used, make sure you did set range correctly
2021-02-22 16:00:07.732823+0800 Expressionmanual[9058:646450] INFO: Output #0, mp4, to '/private/var/mobile/Containers/Data/Application/EF82C7E5-3083-4A68-888C-0CFD150E82E3/tmp/woquanyao.mp4':
2021-02-22 16:00:07.732862+0800 Expressionmanual[9058:646450] INFO: Metadata:
2021-02-22 16:00:07.732879+0800 Expressionmanual[9058:646450] INFO: major_brand :
2021-02-22 16:00:07.732905+0800 Expressionmanual[9058:646450] INFO: qt
2021-02-22 16:00:07.732926+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.732944+0800 Expressionmanual[9058:646450] INFO: minor_version :
2021-02-22 16:00:07.732972+0800 Expressionmanual[9058:646450] INFO: 0
2021-02-22 16:00:07.733071+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.733234+0800 Expressionmanual[9058:646450] INFO: compatible_brands:
2021-02-22 16:00:07.733391+0800 Expressionmanual[9058:646450] INFO: qt
2021-02-22 16:00:07.733519+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.733683+0800 Expressionmanual[9058:646450] INFO: com.apple.quicktime.copyright:
2021-02-22 16:00:07.733833+0800 Expressionmanual[9058:646450] INFO: 7a3ea66fea970797b272ac21b66e7541
2021-02-22 16:00:07.734014+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.734124+0800 Expressionmanual[9058:646450] INFO: com.apple.quicktime.artwork:
2021-02-22 16:00:07.734262+0800 Expressionmanual[9058:646450] INFO: {
2021-02-22 16:00:07.734380+0800 Expressionmanual[9058:646450] INFO:
:
2021-02-22 16:00:07.734495+0800 Expressionmanual[9058:646450] INFO: "source_type" : "douyin_beauty_me",
2021-02-22 16:00:07.734624+0800 Expressionmanual[9058:646450] INFO:
:
2021-02-22 16:00:07.734719+0800 Expressionmanual[9058:646450] INFO: "data" : {
2021-02-22 16:00:07.734835+0800 Expressionmanual[9058:646450] INFO:
:
2021-02-22 16:00:07.734957+0800 Expressionmanual[9058:646450] INFO: "videoEffectId" : "",
2021-02-22 16:00:07.735067+0800 Expressionmanual[9058:646450] INFO:
:
2021-02-22 16:00:07.735177+0800 Expressionmanual[9058:646450] INFO: "os" : "mac",
2021-02-22 16:00:07.735292+0800 Expressionmanual[9058:646450] INFO:
:
2021-02-22 16:00:07.735405+0800 Expressionmanual[9058:646450] INFO: "stickerId" : "",
2021-02-22 16:00:07.735556+0800 Expressionmanual[9058:646450] INFO:
:
2021-02-22 16:00:07.735728+0800 Expressionmanual[9058:646450] INFO: "infoStickerId" : "",
2021-02-22 16:00:07.735867+0800 Expressionmanual[9058:646450] INFO:
:
2021-02-22 16:00:07.735980+0800 Expressionmanual[9058:646450] INFO: "editType" : "edit",
2021-02-22 16:00:07.736116+0800 Expressionmanual[9058:646450] INFO:
:
2021-02-22 16:00:07.736276+0800 Expressionmanual[9058:646450] INFO: "musicId" : "",
2021-02-22 16:00:07.736422+0800 Expressionmanual[9058:646450] INFO:
:
2021-02-22 16:00:07.736608+0800 Expressionmanual[9058:646450] INFO: "product" : "lv",
2021-02-22 16:00:07.736801+0800 Expressionmanual[9058:646450] INFO:
:
2021-02-22 16:00:07.736908+0800 Expressionmanual[9058:646450] INFO: "videoId" : "87D47B94-16E9-436B-9E65-BC52F9E73C64"
2021-02-22 16:00:07.737059+0800 Expressionmanual[9058:646450] INFO:
:
2021-02-22 16:00:07.737180+0800 Expressionmanual[9058:646450] INFO: }
2021-02-22 16:00:07.737279+0800 Expressionmanual[9058:646450] INFO:
:
2021-02-22 16:00:07.738856+0800 Expressionmanual[9058:646450] INFO: }
2021-02-22 16:00:07.738937+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.738985+0800 Expressionmanual[9058:646450] INFO: com.apple.quicktime.software:
2021-02-22 16:00:07.739061+0800 Expressionmanual[9058:646450] INFO: {"TEEditor":"0"},{"isFastImport":"1"},{"transType":"2"},{"source":"5"}
2021-02-22 16:00:07.739233+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.739444+0800 Expressionmanual[9058:646450] INFO: encoder :
2021-02-22 16:00:07.739550+0800 Expressionmanual[9058:646450] INFO: Lavf58.33.100
2021-02-22 16:00:07.739758+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.739903+0800 Expressionmanual[9058:646450] INFO: Stream #0:0
2021-02-22 16:00:07.740007+0800 Expressionmanual[9058:646450] INFO: (und)
2021-02-22 16:00:07.740114+0800 Expressionmanual[9058:646450] INFO: : Video: mpeg4 (mp4v / 0x7634706D), yuv420p, 854x480 [SAR 1:1 DAR 427:240], q=2-31, 200 kb/s
2021-02-22 16:00:07.740238+0800 Expressionmanual[9058:646450] INFO: ,
2021-02-22 16:00:07.740339+0800 Expressionmanual[9058:646450] INFO: 30 fps,
2021-02-22 16:00:07.740453+0800 Expressionmanual[9058:646450] INFO: 15360 tbn,
2021-02-22 16:00:07.740571+0800 Expressionmanual[9058:646450] INFO: 30 tbc
2021-02-22 16:00:07.740669+0800 Expressionmanual[9058:646450] INFO: (default)
2021-02-22 16:00:07.740790+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.740896+0800 Expressionmanual[9058:646450] INFO: Metadata:
2021-02-22 16:00:07.741238+0800 Expressionmanual[9058:646450] INFO: creation_time :
2021-02-22 16:00:07.741425+0800 Expressionmanual[9058:646450] INFO: 2021-02-21T10:57:18.000000Z
2021-02-22 16:00:07.741750+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.741915+0800 Expressionmanual[9058:646450] INFO: handler_name :
2021-02-22 16:00:07.742043+0800 Expressionmanual[9058:646450] INFO: Core Media Video
2021-02-22 16:00:07.742221+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.742346+0800 Expressionmanual[9058:646450] INFO: encoder :
2021-02-22 16:00:07.742480+0800 Expressionmanual[9058:646450] INFO: Lavc58.59.102 mpeg4
2021-02-22 16:00:07.742609+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.742690+0800 Expressionmanual[9058:646450] INFO: Side data:
2021-02-22 16:00:07.742864+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.742983+0800 Expressionmanual[9058:646450] INFO: cpb:
2021-02-22 16:00:07.743093+0800 Expressionmanual[9058:646450] INFO: bitrate max/min/avg: 0/0/200000 buffer size: 0
2021-02-22 16:00:07.743229+0800 Expressionmanual[9058:646450] INFO: vbv_delay: N/A
2021-02-22 16:00:07.743376+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.743493+0800 Expressionmanual[9058:646450] INFO: Stream #0:1
2021-02-22 16:00:07.743611+0800 Expressionmanual[9058:646450] INFO: (und)
2021-02-22 16:00:07.743720+0800 Expressionmanual[9058:646450] INFO: : Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s
2021-02-22 16:00:07.743836+0800 Expressionmanual[9058:646450] INFO: (default)
2021-02-22 16:00:07.744008+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.744233+0800 Expressionmanual[9058:646450] INFO: Metadata:
2021-02-22 16:00:07.744351+0800 Expressionmanual[9058:646450] INFO: creation_time :
2021-02-22 16:00:07.744422+0800 Expressionmanual[9058:646450] INFO: 2021-02-21T10:57:18.000000Z
2021-02-22 16:00:07.744535+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.744633+0800 Expressionmanual[9058:646450] INFO: handler_name :
2021-02-22 16:00:07.744747+0800 Expressionmanual[9058:646450] INFO: Core Media Audio
2021-02-22 16:00:07.744876+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.745003+0800 Expressionmanual[9058:646450] INFO: encoder :
2021-02-22 16:00:07.745141+0800 Expressionmanual[9058:646450] INFO: Lavc58.59.102 aac
2021-02-22 16:00:07.745275+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.794530+0800 Expressionmanual[9058:646450] INFO: fontselect: (Doppio_One, 400, 0) -> /private/var/containers/Bundle/Application/12529959-F2B8-40EA-B997-0963AD75C0A4/Expressionmanual.app/doppioone_regular.ttf, 0, DoppioOne-Regular
2021-02-22 16:00:07.794676+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.794785+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.794932+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.799344+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.799418+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.805717+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.805797+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.811492+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.811574+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.817241+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.817342+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.823118+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.823170+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.828249+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.828335+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.835795+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.835892+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.841096+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.841166+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.846225+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.846287+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.851787+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.851869+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.855675+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.855731+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.862530+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.862599+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.867685+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.867771+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.872188+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.872236+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.877776+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.877829+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.883272+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.883352+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.889412+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.889466+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.894294+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.894384+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.898908+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.898986+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.904389+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.904464+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.907803+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.907851+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.914716+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.914809+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.919234+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.919315+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.924136+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.924197+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.928873+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.928926+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.934078+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.934172+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.940588+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.940666+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.945507+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.945571+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.950208+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.950283+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.955480+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.955535+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.959332+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.959383+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.966586+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.966680+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.971010+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.971082+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.976394+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.976472+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.981865+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.981939+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.986618+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.986697+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.993719+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.993806+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:07.998700+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:07.998773+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:08.003292+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:08.003371+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:08.008960+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:08.009040+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:08.013105+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
2021-02-22 16:00:08.013150+0800 Expressionmanual[9058:646450] INFO:
2021-02-22 16:00:08.019197+0800 Expressionmanual[9058:646450] INFO: Glyph 0x5C0F not found, selecting one more font for (Doppio_One, 400, 0)
Environment
Platform:IOS
Architecture: arm64
Version (if applicable) [e.g. v1.2]
Source branch (if applicable) master
Xcode version (if applicable) xcode12.3
Cocoapods version (if applicable) [e.g. 1.2.1]
Android Studio version (if applicable) [e.g. 3.1]
Android NDK version (if applicable) [e.g. 16b, 17c]
Description Function cannot take effect after call
Expected behavior The font set can be used successfully
Current behavior
if let resourcePath = Bundle.main.resourcePath{ // 只有注册了的字体才能在字幕中使用 MobileFFmpegConfig.setFontDirectory(resourcePath, with: [FontName.Doppio_One.name : FontName.Doppio_One.value]) MobileFFmpegConfig.setFontDirectory(resourcePath, with: nil) }
.ass file content
Screenshots
Logs 2021-02-22 16:00:07.703230+0800 Expressionmanual[9058:646450] INFO: Fontconfig warning: "/private/var/mobile/Containers/Data/Application/EF82C7E5-3083-4A68-888C-0CFD150E82E3/tmp/.mobileffmpeg/fonts.conf", line 4: Use of ambiguous path in
Environment
Other The subtitle displays garbled code