opentok / archiving-composer Goto Github PK
View Code? Open in Web Editor NEWSample apps for using OpenTok archiving building blocks API and ffmpeg to generate composed files from individual archives
Sample apps for using OpenTok archiving building blocks API and ffmpeg to generate composed files from individual archives
How to install the required dependencies for ffmpeg on ubuntu?
Hi, I'm using this for the first time. I've followed the instructions in the readme, but I'm getting the following error when running the command like this...
./archiving-composer/composer.js -i archive.zip -f mp4
ffmpeg -y -threads 4 -loglevel quiet -ss 0 -t 8.277 -i archive/607a66e6-3323-44f2-abb8-25f14c8c8c2f.webm -filter_complex "[0]scale=640:-1[b];[b]drawtext=fontsize=30:fontcolor=white:fontfile=/Library/Fonts/Tahoma.ttf:text='{"user_hash": "GyB", "user_id": 47, "match_hash": "wQd9", "match_id": 2064}':x=w/2-text_w/2:y=h-line_h-5" -shortest temp-0-8277.mp4
child_process.js:644
throw err;
^
Error: Command failed: ffmpeg -y -threads 4 -loglevel quiet -ss 0 -t 8.277 -i archive/607a66e6-3323-44f2-abb8-25f14c8c8c2f.webm -filter_complex "[0]scale=640:-1[b];[b]drawtext=fontsize=30:fontcolor=white:fontfile=/Library/Fonts/Tahoma.ttf:text='{"user_hash": "GyB", "user_id": 47, "match_hash": "wQd9", "match_id": 2064}':x=w/2-text_w/2:y=h-line_h-5" -shortest temp-0-8277.mp4
at checkExecSyncError (child_process.js:601:13)
at execSync (child_process.js:641:13)
at Extract.<anonymous> (/Users/adambyer/01ab/development/test/opentok-archive-composer/archiving-composer/composer.js:202:13)
at emitNone (events.js:106:13)
at Extract.emit (events.js:208:7)
at DirWriter.<anonymous> (/Users/adambyer/01ab/development/test/opentok-archive-composer/archiving-composer/node_modules/unzip/lib/extract.js:38:10)
at emitNone (events.js:111:20)
at DirWriter.emit (events.js:208:7)
at end (/Users/adambyer/01ab/development/test/opentok-archive-composer/archiving-composer/node_modules/fstream/lib/writer.js:323:12)
at /Users/adambyer/01ab/development/test/opentok-archive-composer/archiving-composer/node_modules/fstream/lib/writer.js:313:32
Any idea what I'm doing wrong?
Thanks.
After creating the combined file, The sound id missing from one video. How to fix it?
Not seeing that logic
Sample output of ffmpeg error:
ffmpeg -y -threads 4 -loglevel quiet -ss 191.896 -t 16.349 -i video37/some-stream-id.webm -filter_complex "[0]scale=640:-1[b];[b]drawtext=fontsize=30:fontcolor=white:fontfile=/Library/Fonts/Tahoma.ttf:text='usertype=host':x=w/2-text_w/2:y=h-line_h-5" -shortest temp-206776-208245.mp4
ffmpeg -y -threads 4 -loglevel quiet " -shortest temp-208245-219984.mp4
/bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
/bin/sh: -c: line 1: syntax error: unexpected end of file
child_process.js:1389
throw err;
^
Error: Command failed: ffmpeg -y -threads 4 -loglevel quiet " -shortest temp-208245-219984.mp4
/bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
/bin/sh: -c: line 1: syntax error: unexpected end of file
at checkExecSyncError (child_process.js:1346:13)
at execSync (child_process.js:1386:13)
at Extract.<anonymous> (/sites/archiving-composer/composer.js:200:13)
at Extract.emit (events.js:129:20)
at DirWriter.<anonymous> (/sites/archiving-composer/node_modules/unzip/lib/extract.js:38:10)
at DirWriter.emit (events.js:129:20)
at end (/sites/archiving-composer/node_modules/unzip/node_modules/fstream/lib/writer.js:323:12)
at /sites/archiving-composer/node_modules/unzip/node_modules/fstream/lib/writer.js:313:32
at endUtimes (/sites/archiving-composer/node_modules/unzip/node_modules/fstream/lib/writer.js:239:48)
at setProps (/sites/archiving-composer/node_modules/unzip/node_modules/fstream/lib/writer.js:296:5)
The " (which is supposed to terminate a filter argument) between loglevel quiet
and -shortest some-file-name.mp4
gets appended to the command whether a filter actually gets appended or not. Cases that don't return a filter create a syntax error.
Path to dependency file: /package.json
Path to vulnerable library: /node_modules/fstream/package.json
Found in HEAD commit: 5fd84a030407b5efc15193993fd0bcd4b3a289af
CVE | Severity | CVSS | Dependency | Type | Fixed in | Remediation Available |
---|---|---|---|---|---|---|
CVE-2019-13173 | High | 7.5 | fstream-0.1.31.tgz | Transitive | N/A | โ |
Advanced file system stream things
Library home page: https://registry.npmjs.org/fstream/-/fstream-0.1.31.tgz
Path to dependency file: /package.json
Path to vulnerable library: /node_modules/fstream/package.json
Dependency Hierarchy:
Found in HEAD commit: 5fd84a030407b5efc15193993fd0bcd4b3a289af
Found in base branch: master
fstream before 1.0.12 is vulnerable to Arbitrary File Overwrite. Extracting tarballs containing a hardlink to a file that already exists in the system, and a file that matches the hardlink, will overwrite the system's file with the contents of the extracted file. The fstream.DirWriter() function is vulnerable.
Publish Date: 2019-07-02
URL: CVE-2019-13173
Base Score Metrics:
Type: Upgrade version
Origin: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-13173
Release Date: 2020-08-24
Fix Resolution: 1.0.12
Only the audio from the first input file is present in the end result. Can this be updated to mix audio in from all input files?
Sample entry in JSON:
{
"connectionData" : "",
"filename" : "5263bf96-381d-4d78-9ead-41cf363592a9.webm",
"size" : 824777,
"startTimeOffset" : 2059,
"stopTimeOffset" : 14643,
"streamId" : "5263bf96-381d-4d78-9ead-41cf363592a9"
}
Calls to drawText(fileWithNoConnectionDataField, filterArgs) return "".
Commas are added to the filter by default, but no actual filter is appended if connectionData is empty.
This causes ffmpeg to throw an error as it expects to receive a filter and gets none.
e.g.
[AVFilterGraph @ #############] No such filter: ''
Trying to use it on ubuntu 14.04 lts.
Had to figure out the right version of node.js not causing crashes, and tried several ffmpeg flavours looking for one not causing segfaults. Up now, the node version has been found, but I still have to find out what ffmpeg version can be used. Even recompiling from sources doesn't seem to help.
Please, provide a little bit more documentation about the requirements, so that it's possible to figure out how to run the code without using brew
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.