Coder Social home page Coder Social logo

j3mifier's Introduction

j3mifier

j3m parser

Overview

j3mifier is a command line utility that extracts and unpacks j3m metadata from the host media file. The host media file is then converted to a set of internet ready formats and dimensions.

Building and running

run: mvn clean install
to skip tests, run mvn clean install -Dmaven.test.skip=true

Use j3mifier is called from command line: sudo java -cp .:/opt/j3m/framework/:/opt/j3m/jars/*:/opt/j3m/conf/ framework.MediaProcessor <input_file> <output_folder>

The j3mfier process the <input_file> and places the following files in the <output_folder>:

  • original media sans metadata attachment
  • small resolution version of original media, denoted by the "low" file name prefix
  • medium resolution version of original media, denoted by the "med" file name prefix
  • high resolution version of original media, denoted by the "high" file name prefix
  • a still image, if the original media was a video file.
  • a thumbnail image, denoted by the "thumb" file prefix
  • a json file containing the j3m metadata that was attached to the media.
  • a json file containing keywords extracted from the j3m metadata, denoted by the "keywords" file name prefix.

Mandatory Parameters: <input_file> - the full path to the media file to be processed

<output_folder> - the full path to the folder where all created files should be placed

Optional Parameters: these may be added to the command line AFTER the mandatory <input_file> and <output_folder> parameters.

-d : debug mode - leaves the file trail generated by the metadata unpacking process

-v : verbose mode turned on. Causes more messages to be written to stdout, this is also a property in the conf file. It is suggested it be set to 'false' in the conf file, and turned on via command line for testing

-l : lenient mode turned on. Causes errors and exceptions during j3m unpacking and verification to be ignored. This is a property that can be set via the conf file.

Advanced Configuration A lot of the j3mifier behaviour is dictated by the conf file: <j3mifier_install_folder>/conf/conf.properties

The following settings are availabe:

  • Recognised file extension to identify image and video files.
  • Video and image resolutions for the small,med,large output files
  • The json path to the keyword locations in the j3m
  • Words to be excluded from key words
  • The json path the the pgp signature, and metadata it was applied to.
  • The json path to the media hashes locations in the j3m
  • The text warning to display in case of hash mismatch
  • command line calls to utilities used by the j3mifier, such as ffpmpeg, gpg, and the j3mparser

Unpacking process

When j3m metadata is attached to the host media file it is packaged in a number of steps including signing, compression, encryption and base64 encoding. During the unpacking process, the j3mifier performs the following steps:

  1. Base64 decode
  2. GPG decrypt, if the PGP header is present in file
  3. Ungzip the file.
  4. If a PGP signature is included (as per the path defined in the properties), it is extracted into a separate file and used to verify the metadata.
  5. keywords are extracted and written to a file.

The -d flag ensures that all the files generated by steps 1-4 are not deleted, and are available for inspection/debugging.

j3mifier's People

Contributors

schirkova avatar

Watchers

Harlo Holmes/LvH avatar  avatar

j3mifier's Issues

Readme / Basic documentation

Please create basic readme for this project so that we can all understand how to start working with it. Thanks!

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.