Giter Site home page Giter Site logo

waveform-node's People

Contributors

phding avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

waveform-node's Issues

svgs

do you know how one would go about to draw an svg from the peaks

Run out of memory every time

I've tried loading a 6min WAV and a 6min WebM for the same track, and while in the former case I suppose it could make sense that I'd run out of memory, I run out of memory with nothing else really going on in my script or running on my machine.

Here is my code:

		var options = {
			numOfSample: 500,
		};
		waveform.getWaveForm(
			fullSourceAudioPath,
			options,
			function(error, peaks) {
				if(error){
					console.error(error);
					return;
				}

				// TODO: Do something
			}
		);

Output:

<--- Last few GCs --->
at[50059:0x103801e00]    24374 ms: Mark-sweep 1395.0 (1413.2) -> 1395.0 (1413.2) MB, 1785.6 / 0.0 ms  (+ 0.0 ms in 4 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 1978 ms) (average mu = 0.162, current mu = 0.106) allocat[50059:0x103801e00]    26369 ms: Mark-sweep 1398.0 (1416.2) -> 1398.0 (1416.2) MB, 1780.5 / 0.0 ms  (+ 0.0 ms in 4 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 1987 ms) (average mu = 0.135, current mu = 0.108) allocat

<--- JS stacktrace --->

==== JS stack trace =========================================

    0: ExitFrame [pc: 0x9b6d44841bd]
    1: StubFrame [pc: 0x9b6d456b580]
Security context: 0x38208bc9e589 <JSObject>
    2: getPeak [0x3820882ae6c1] [<myProjectPath>/node_modules/waveform-node/waveform-node.js:146] [bytecode=0x3820a9b0f0c9 offset=100](this=0x38207f686519 <JSGlobal Object>,waveformType=0,samplesPerPeak=63536,samples=0x3820fa1198c9 <JSArray[31767680]>,streamInfo=0x3820dce83999 <Object map = 0x...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: node::Abort() [/usr/local/bin/node]
 2: node::OnFatalError(char const*, char const*) [/usr/local/bin/node]
 3: v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/local/bin/node]
 4: v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/usr/local/bin/node]
 5: v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/usr/local/bin/node]
 6: v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/local/bin/node]
 7: v8::internal::Heap::AllocateRawWithRetry(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [/usr/local/bin/node]
 8: v8::internal::Factory::NewRawOneByteString(int, v8::internal::PretenureFlag) [/usr/local/bin/node]
 9: v8::internal::Factory::NumberToString(v8::internal::Handle<v8::internal::Object>, bool) [/usr/local/bin/node]
10: v8::internal::(anonymous namespace)::ElementsAccessorBase<v8::internal::(anonymous namespace)::FastPackedDoubleElementsAccessor, v8::internal::(anonymous namespace)::ElementsKindTraits<(v8::internal::ElementsKind)4> >::PrependElementIndices(v8::internal::Handle<v8::internal::JSObject>, v8::internal::Handle<v8::internal::FixedArrayBase>, v8::internal::Handle<v8::internal::FixedArray>, v8::internal::GetKeysConversion, v8::internal::PropertyFilter) [/usr/local/bin/node]
11: v8::internal::FastKeyAccumulator::GetKeysFast(v8::internal::GetKeysConversion) [/usr/local/bin/node]
12: v8::internal::FastKeyAccumulator::GetKeys(v8::internal::GetKeysConversion) [/usr/local/bin/node]
13: v8::internal::Runtime_ForInEnumerate(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/local/bin/node]
14: 0x9b6d44841bd
.svscripts/bin/generate_media.sh: line 2: 50059 Abort trap: 6           "${BASH_SOURCE%/*}/../encoder/encode.js" "$@"

"file" argument must be a non-empty string

$ ./index.js
child_process.js:381
    throw new TypeError('"file" argument must be a non-empty string');
    ^

TypeError: "file" argument must be a non-empty string
    at normalizeSpawnArguments (child_process.js:381:11)
    at exports.spawn (child_process.js:494:38)
    at getDataFromFFMpeg (/tmp/1/node_modules/waveform-node/waveform-node.js:47:22)
    at Object.exports.getWaveForm (/tmp/1/node_modules/waveform-node/waveform-node.js:215:2)
    at Object.<anonymous> (/tmp/1/index.js:6:10)
    at Module._compile (module.js:649:30)
    at Object.Module._extensions..js (module.js:660:10)
    at Module.load (module.js:561:32)
    at tryModuleLoad (module.js:501:12)
    at Function.Module._load (module.js:493:3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.