Giter Site home page Giter Site logo

archiving-composer's People

Contributors

davemun avatar franciscocano avatar jcague avatar jeffswartz avatar

Stargazers

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

Watchers

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

archiving-composer's Issues

Command Failed Error

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.

Filter handling sometimes leaves hanging quotation marks.

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.

unzip-0.1.11.tgz: 1 vulnerabilities (highest severity is: 7.5)

Vulnerable Library - unzip-0.1.11.tgz

Path to dependency file: /package.json

Path to vulnerable library: /node_modules/fstream/package.json

Found in HEAD commit: 5fd84a030407b5efc15193993fd0bcd4b3a289af

Vulnerabilities

CVE Severity CVSS Dependency Type Fixed in Remediation Available
CVE-2019-13173 High 7.5 fstream-0.1.31.tgz Transitive N/A โŒ

Details

CVE-2019-13173

Vulnerable Library - fstream-0.1.31.tgz

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:

  • unzip-0.1.11.tgz (Root Library)
    • โŒ fstream-0.1.31.tgz (Vulnerable Library)

Found in HEAD commit: 5fd84a030407b5efc15193993fd0bcd4b3a289af

Found in base branch: master

Vulnerability Details

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

CVSS 3 Score Details (7.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: None
    • Integrity Impact: High
    • Availability Impact: None

For more information on CVSS3 Scores, click here.

Suggested Fix

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

Empty connectionData field in archive .zip JSON file causes ffmpeg argument error.

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: ''

Please add setup documentation

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

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.