I am trying to add text on image using the code below
RNFFmpeg
.execute(`-y -i ${input} -vf "drawtext=text='Hello World':fontcolor=white:fontsize=75:x=0:y=0" ${output}`);
I am not using any custom font but still get this error.
Error:
[Parsed_drawtext_0 # 0x7f87a1ce40] Cannot find a valid font for the family Sans
index.js:115 [AVFilterGraph # 0x7f6765e760] Error initializing filter 'drawtext'
index.js:115 [AVFilterGraph # 0x7f6765e760] with args 'text=Hello World:fontcolor=white:fontsize=75:x=0:y=0'
index.js:115 [AVFilterGraph # 0x7f6765e760]
index.js:115 Error reinitializing filters!
index.js:115 Failed to inject frame into filter network: No such file or directory
index.js:115 Error while processing the decoded data for stream #0:0
Note:
I also tried using a custom font but not able to do it.
When I use RNFFmpegConfig.setFontDirectory('../../assets/fonts') function and with it the following code to add text on image
RNFFmpeg
.execute(`-y -i ${input} -vf "drawtext=text='Hello World':fontfile='../../assets/fonts/MyFont.ttf':fontcolor=white:fontsize=75:x=0:y=0" ${output}`);
It gives me the same error.
How can I fix this issue.
according to this
https://github.com/tanersener/ffmpeg-kit/wiki/Tips
you should registering the fonts under a directory using the FFmpegKitConfig.setFontDirectory methods or by specifying your own fontconfig configuration using FFmpegKitConfig.setFontconfigConfigurationPath
System fonts on Android are stored under the /system/fonts folder
and on iOS are stored under the /System/Library/Fonts
Related
I installed devstack and ceilometer by adding the following lines in the local.conf file:
enable_plugin ceilometer https://opendev.org/openstack/ceilometer.git
CEILOMETER_BACKEND=gnocchi
Devstack works correctly (I am able to create images, instances, etc.). The problem is that I cannot visualize the metrics and resources using "gnocchi metric list" and "gnocchi resource list". No errors but the body response is empty.
"ceilometer-upgrade" gives the following error:
DEBUG ceilometer.cmd.storage Upgrade Gnocchi resource types upgrade /opt/stack/ceilometer/ceilometer/cmd/storage.py:42
While "ceilometer-polling" prints "The resource could not be found".
How can I resolve this issue? Thanks!
I am working with a library called ReNative to deploy a React Native application to multiple platforms.
I am doing the tests on a Tizen and Android Tv emulators.
Creating an app with the basic blank template works with no problems.
But after installing the react-native-video plugin (using rnv plugin add) and using the Video component I get the following error when lauching the application with rnv run -p tizen (or androidtv):
ERROR in ./node_modules/react-native-video/Video.js
Module not found: Error: Can't resolve 'react-native/Libraries/Image/resolveAssetSource' in 'C:\dev\ReactNativeVideoReNative\node_modules\react-native-video'
# ./node_modules/react-native-video/Video.js 4:47-105
# ./src/app.js
# ./index.tizen.js
# multi (webpack)-dev-server/client?http://0.0.0.0:8087 (webpack)/hot/dev-server.js ./index.tizen.js
ERROR in ./src/assets/BigBuckBunny.mp4 1:0
Module parse failed: Unexpected character ' ' (1:0)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)
# ./src/app.js 7:41-77
# ./index.tizen.js
# multi (webpack)-dev-server/client?http://0.0.0.0:8087 (webpack)/hot/dev-server.js ./index.tizen.js
Or if you want to see a screenshot:
https://prnt.sc/rg3c1f
Here is an screenshot of the code: https://prnt.sc/rg3gm9
I literally have zero experience with this tool. So, if there is any information that is missing or that you need, tell me.
In RStudio (Windows 10) using bookdown, I am unable to compile a PDF version of my book. I get an error message "mathspec.sty" file not found. I installed it on my MikTex folder, but the error persists. How to solve this?
Then, I tried to compile to pdfdocument. Now, I got errors from Latex because bookdown is unable to link to my preamble.tex file. How to make preamble.tex visible?
I changed the latex _engine to pdflatex in the output.yml configuration file. This solved the problem for me, although I would still like to know how to use xelatex (i.e. where to include the mathspec.sty file).
Trying to deploy CAM chart version 2101 from ICP 2101. Deploy fails with the error:
Failed to pull image
“mycluster.icp:8500/default/orpheus-iaas:2.1.0.1_121317”: rpc error:
code = Unknown desc = Error response from daemon: Get
https://mycluster.icp:8500/v2/default/orpheus-iaas/manifests/2.1.0.1_121317:
unauthorized: authentication required
As Scott mentioned, updating the image scope to global is the correct answer. This can be accomplished with a single command:
root#icp-master-1:~# kubectl get image -n=<namespace> -o yaml | sed 's/scope: namespace/scope: global/g' | kubectl replace -f -
image "cam-broker" replaced
image "cam-busybox" replaced
image "cam-mongo" replaced
image "cam-orchestration" replaced
image "cam-portal-api" replaced
image "cam-portal-ui" replaced
image "cam-redis" replaced
image "cam-service-composer-api" replaced
image "cam-service-composer-ui" replaced
image "orpheus-iaas" replaced
image "orpheus-proxy" replaced
image "orpheus-tenant-mgmt" replaced
image "orpheus-ui-basic" replaced
image "orpheus-ui-connections" replaced
image "orpheus-ui-instances" replaced
image "orpheus-ui-templates" replaced
image "provider-terraform-local" replaced
When loading the CAM PPA package into ICP, I did not include the --namespace services as indicated in the CAM installation topic: https://www.ibm.com/support/knowledgecenter/SS2L37/cam_installing_cam.html
I was able to use the workaround of changing all of the CAM images scope to global:
https://www.ibm.com/support/knowledgecenter/en/SSBS6K_2.1.0/manage_images/change_scope.html
I deleted the existing CAM deploy and then attempted the deploy again successfully.
11:01:29: Failed building JavaScript bundle
11:01:29: Unable to resolve ./app/img/grangologo.png" from ".//App.js: could not resolve/home/gokul/React/Grango/app/img/grangologo.png' as a file nor as a folder","name":"UnableToResolveError","type":"UnableToResolveError","errors":[{}]},"type":"bundling_error"}"
you'r path to the image is wrong, try to use some console.log's to check yourself if the image was imported.
(p.s you could avoid all of it by using proper editor)