Comments (13)
While investigating support for use in a Google Chromecast Receiver application, I think that this issue might be applicable. When running the library in conjunction with video playback, the application quickly comes to a halt, and soon after crashes the device. Looking more into the issue, I was not able to capture a memory heap snapshot while on device because the device gets locked up before the snapshot is completed. However, when running in a desktop chrome browser, I am seeing an average heap snapshot of 140MB with it's majority allocation seemingly placed on the buffer.
While not sure if this is potentially a use case for the changes to cache size, and making it configurable, but thought it might be worth mentioning. If the cache size could be made configurable on initialization, it might be worth investigating, as I believe it's ideal to keep total memory usage on a Chromecast device well below 150MB total (which includes running the video player and handlers which is roughly 95MB on it's own).
from javascriptsubtitlesoctopus.
I also tested this using only asm.js, and the results appear to be roughly the same. Would reducing the default cache size, also result in allowing us to configure a mix cache buffer size? If so, how might this affect rendering performance?
from javascriptsubtitlesoctopus.
Reducing cache limit via ass_set_cache_limits (source) should result in lower memory usage.
You could try it by adding call like ass_set_cache_limits(ass_renderer, 0, 64);
in build/subtitles-octopus/subtitles-octopus-worker.c:41
(this example will leave cached glyphs limit as default and will set cache limit to 64MB overall)
You can experiment with cache size (and maybe add pull request with setting for it π).
If so, how might this affect rendering performance?
I'm not sure, maybe it could affect complex karaoke performance or something like this. But I think performance would be same for ordinary substitles.
Also, don't forget to change TOTAL_MEMORY
in Makefile. It's 128MB right now. We use ALLOW_MEMORY_GROWTH
so it'll work even with very low value but it's better to select something adequate.
from javascriptsubtitlesoctopus.
I am trying to run the library locally to make these updates, but run into the following error upon initial running on the repo as is:
I installed emscripten and it's dependencies, also ran source ./emsdk_env.sh
in the terminal I was working in before navigating to this repo's folder. Is this expected?
from javascriptsubtitlesoctopus.
Try to update submodules.
You can do it using command:
git submodule update --init --recursive
from javascriptsubtitlesoctopus.
Ran the commend to update submodules, but had no affect as I just did a fresh clone with:
git clone --recursive -j8 [email protected]:Dador/JavascriptSubtitlesOctopus.git
Ran make
again, and still same message.
from javascriptsubtitlesoctopus.
Does files from patches exists? If not, you should look for the reasons of it, because they are indeed in git repo.
from javascriptsubtitlesoctopus.
I've confirmed that the patch files do exist, but it looks like the error is occurring when running the fribidi-fixclang.patch
file. It somehow seems that while running this patch file it is not able to properly locate lib/common.h
?
I ran this same procedure on another computer to make sure it was not something wrong with my setup, and got the same results. Are you not seeing the same thing on your end when doing a fresh copy of the repo running git clone --recursive -j8 [email protected]:Dador/JavascriptSubtitlesOctopus.git
, cd JavascriptSubtitleOctopus
, make
?
Update: I was able to run make
once, apply the fribidi-fixclang.patch
manually, remove
git reset --hard && \
patch -p1 < ../fribidi-make.patch && \
patch -p1 < ../fribidi-fixclang.patch && \
from the top level Makefile
, and the script gets past the previous section, however now it seems to have the following error:
checking the archiver (/Users/.../emsdk-portable/emscripten/1.37.28/emar) interface... ar
./configure: line 4222: syntax error near unexpected token `2.2'
./configure: line 4222: `LT_PREREQ(2.2)'
ERROR:root:Configure step failed with non-zero return code 2! Command line: ['./configure', 'CFLAGS=-O3', 'NM=llvm-nm', '--prefix=/Users/.../JavascriptSubtitlesOctopus/build/fribidi/dist', '--host=x86-none-linux', '--build=x86_64', '--disable-dependency-tracking', '--disable-debug', '--without-glib', '--disable-pthreads'] at /Users/.../JavascriptSubtitlesOctopus/build/fribidi
Does it matter what version of emscripten is used to compile this project?
from javascriptsubtitlesoctopus.
@nickfujita I think you forgot to install LLVM and clang, use the latest version of Emscripten
from javascriptsubtitlesoctopus.
@TFSThiagoBR98 Thanks for the tip, I check to make sure I have LLVM and clang installed
gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin17.4.0
Thread model: posix
And updated to the latest version of Emscripten, emscripten-1.37.36
.
However I am still back to getting the same error during patching:
make
cd build/fribidi && \
git reset --hard && \
patch -p1 < ../0001-Fix-Fribidi-Build.patch && \
patch -p1 < ../fribidi-fixclang.patch && \
NOCONFIGURE=1 ./autogen.sh
HEAD is now at 0cecb9e Version 2018.02.1
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/Makefile.am b/Makefile.am
|index 4767d69..3dba0d8 100644
|--- a/Makefile.am
|+++ b/Makefile.am
--------------------------
File to patch:
After pressing return to skip, it just errors out in the same way:
File to patch:
Skip this patch? [y]
Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 18
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/gen.tab/Makefile.am b/gen.tab/Makefile.am
|index d178fc9..a8d4dc5 100644
|--- a/gen.tab/Makefile.am
|+++ b/gen.tab/Makefile.am
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
1 out of 1 hunk ignored
make: *** [build/fribidi/configure] Error 1
from javascriptsubtitlesoctopus.
HEAD is now at 0cecb9e Version 2018.02.1
@nickfujita Did you checkout submodules? This is not Fribidi Git Commit Hash.
- If Yes, check if a .git file exist in fribidi directory.
from javascriptsubtitlesoctopus.
@TFSThiagoBR98 I cloned down with:
git clone --recursive -j8 [email protected]:Dador/JavascriptSubtitlesOctopus.git
There is a .git
file in the bribidi
directory, it's contents are:
gitdir: ../../.git/modules/build/fribidi
This top level git directory also exists at that path, has several subdirectories files:
With the contents of the HEAD
file being:
0efbaa9052320a951823a6e776b30a580e3a2b4e
Is there a setup step that I may have missed?
from javascriptsubtitlesoctopus.
Not sure where to go from here. Would really like to help to contribute to this repo, but the patches appear to not be working correctly. :(
from javascriptsubtitlesoctopus.
Related Issues (20)
- Brotli: "Uncaught Corrupted reserve bit" HOT 6
- I wish you will make a online demo HOT 1
- Feature request: Support effect in subtitles ass file HOT 1
- Drop custom brotli decompression HOT 7
- JSO never performs VSFilter colour mangling HOT 14
- JSO doesnβt nor enables users to set storage size HOT 1
- Failure to build HarfBuzz 5.3.1 with emscripten >=3.1.25 (libharfbuzz_la-hb-ft.lo) HOT 1
- HTML5 Native player Multi Track
- Resize makes subtitle disappear HOT 1
- SubtitlesOctopus Nextjs Runtime Error HOT 4
- how to use directly with CDN? HOT 6
- Failed to construct 'Worker': Script at 'https://libass.github.io/JavascriptSubtitlesOctopus/assets/js/subtitles-octopus-worker.js' cannot be accessed from origin ''. HOT 11
- How to get the bounding box of the subtitle? HOT 2
- Unable to Set Caching Policy for Remote Fonts
- There is a problem with subtitles jumping when using Arabic HOT 2
- need custom wasm url config
- The onReady function was triggered before the font had finished loading.
- If the subtitle is empty or all spaces, the rendering fails
- Inconsistency in Font Size Between Chinese and English Characters in Mixed Subtitles
- Custom Fonts are not working. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from javascriptsubtitlesoctopus.