ehendrix23/tesla_dashcam

Missing fonts / locations on macOS Catalina beta

haakonstorm opened this issue · 7 comments

		Processing clip 8/11 from 08/19/19 19:46:47 and 59 seconds long.
			Error trying to create clip for /Volumes/TESLACAM/TeslaCam/SavedClips/2019-08-19_19-50-24/2019-08-19_19-46-46. RC: 1
			Command: ['/var/folders/h_/l765dwxx4_37_c2p4r6gl5th0000gn/T/_MEIdUnv8B/ffmpeg', '-i', '/Volumes/TESLACAM/TeslaCam/SavedClips/2019-08-19_19-50-24/2019-08-19_19-46-46-left_repeater.mp4', '-i', '/Volumes/TESLACAM/TeslaCam/SavedClips/2019-08-19_19-50-24/2019-08-19_19-46-46-front.mp4', '-i', '/Volumes/TESLACAM/TeslaCam/SavedClips/2019-08-19_19-50-24/2019-08-19_19-46-46-right_repeater.mp4', '-filter_complex', "color=duration=59.65:s=1280x960:c=black [base];[0:v] setpts=PTS-STARTPTS, scale=640x480 , hflip [left];[1:v] setpts=PTS-STARTPTS, scale=640x480  [front];[2:v] setpts=PTS-STARTPTS, scale=640x480 , hflip [right];[base][left] overlay=eof_action=pass:repeatlast=0:x=0:y=480 [left1];[left1][front] overlay=eof_action=pass:repeatlast=0:x=320:y=0 [front1];[front1][right] overlay=eof_action=pass:repeatlast=0:x=640:y=480[tmp0];[tmp0] drawtext=fontfile=/Library/Fonts/Arial.ttf:fontcolor=white:fontsize=16.0:borderw=2:bordercolor=black@1.0:x=(w/2-text_w/2):y=(h-(text_h*2)):text='%{pts\\:localtime\\:1566236807\\:%x %X}'", '-preset', 'medium', '-crf', '28', '-allow_sw', '1', '-b:v', '5000K', '-c:v', 'h264_videotoolbox', '-y', '/Users/storm/Movies/Tesla_Dashcam/2019-08-19_19-46-46.mp4']
			Error: b"ffmpeg version N-93225-g37e4c226c0-tessus  https://evermeet.cx/ffmpeg/  Copyright (c) 2000-2019 the FFmpeg developers\n  built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)\n  configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay\n  libavutil      56. 26.100 / 56. 26.100\n  libavcodec     58. 47.102 / 58. 47.102\n  libavformat    58. 26.101 / 58. 26.101\n  libavdevice    58.  6.101 / 58.  6.101\n  libavfilter     7. 48.100 /  7. 48.100\n  libswscale      5.  4.100 /  5.  4.100\n  libswresample   3.  4.100 /  3.  4.100\n  libpostproc    55.  4.100 / 55.  4.100\nInput #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Volumes/TESLACAM/TeslaCam/SavedClips/2019-08-19_19-50-24/2019-08-19_19-46-46-left_repeater.mp4':\n  Metadata:\n    major_brand     : mp42\n    minor_version   : 0\n    compatible_brands: mp42mp41isomiso2\n    creation_time   : 2019-08-19T17:46:47.000000Z\n  Duration: 00:00:58.98, start: 0.000000, bitrate: 3968 kb/s\n    Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x960, 3962 kb/s, SAR 1:1 DAR 4:3, 35.96 fps, 10k tbr, 10k tbn, 20k tbc (default)\n    Metadata:\n      creation_time   : 2019-08-19T17:46:47.000000Z\n      handler_name    : VideoHandler\nInput #1, mov,mp4,m4a,3gp,3g2,mj2, from '/Volumes/TESLACAM/TeslaCam/SavedClips/2019-08-19_19-50-24/2019-08-19_19-46-46-front.mp4':\n  Metadata:\n    major_brand     : mp42\n    minor_version   : 0\n    compatible_brands: mp42mp41isomiso2\n    creation_time   : 2019-08-19T17:46:47.000000Z\n  Duration: 00:00:59.65, start: 0.000000, bitrate: 4023 kb/s\n    Stream #1:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x960, 4017 kb/s, SAR 1:1 DAR 4:3, 36.03 fps, 10k tbr, 10k tbn, 20k tbc (default)\n    Metadata:\n      creation_time   : 2019-08-19T17:46:47.000000Z\n      handler_name    : VideoHandler\nInput #2, mov,mp4,m4a,3gp,3g2,mj2, from '/Volumes/TESLACAM/TeslaCam/SavedClips/2019-08-19_19-50-24/2019-08-19_19-46-46-right_repeater.mp4':\n  Metadata:\n    major_brand     : mp42\n    minor_version   : 0\n    compatible_brands: mp42mp41isomiso2\n    creation_time   : 2019-08-19T17:46:47.000000Z\n  Duration: 00:00:59.19, start: 0.000000, bitrate: 4002 kb/s\n    Stream #2:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x960, 3997 kb/s, SAR 1:1 DAR 4:3, 36.02 fps, 10k tbr, 10k tbn, 20k tbc (default)\n    Metadata:\n      creation_time   : 2019-08-19T17:46:47.000000Z\n      handler_name    : VideoHandler\nFontconfig error: Cannot load default config file\n[Parsed_drawtext_12 @ 0x7fbc20505740] Cannot find a valid font for the family Sans\n[AVFilterGraph @ 0x7fbc205028c0] Error initializing filter 'drawtext' with args 'fontfile=/Library/Fonts/Arial.ttf:fontcolor=white:fontsize=16.0:borderw=2:bordercolor=black@1.0:x=(w/2-text_w/2):y=(h-(text_h*2)):text=%{pts\\:localtime\\:1566236807\\:%x %X}'\nError initializing complex filters.\nNo such file or directory\n"

Work-around for now is either:

  1. Copy Arial.ttf from /System/Library/Fonts/Supplemental to /System/Library/Fonts/
  2. Use parameter --font to supply the full path to the font file (i.e. --font /System/Library/Fonts/Arial.ttf).

Going to wait to see if this is changed currently only with beta or if the final release will have this as well.

+1 same problem on beta, thanks for mitigation

Seeing this on the final release as well.

I needed a slightly different fix for this on macOS Catalina. The initial message I got was:

$ tesla_dashcam
Font file /Library/Fonts/Arial.ttf does not exist. Provide a valid font file using --font or disable timestamp using --no-timestamp

So, I just dealt with the issue by doing this:

sudo ln -s /Library/Fonts/Arial\ Unicode.ttf /Library/Fonts/Arial.ttf

Just to confirm, /Library/Fonts/Arial Unicode.ttf does exist on Catalina right?

My Catalina install was an upgrade, but since this is a system directory I am pretty sure that this should exist in all Catalina macOS systems.

Fixed in release 0.1.16