0110.be logo

Articles Tagged 'LaTeX'

~ TarsosTranscoder

Tarsos Transcoder is a library to transcode audio with JAVA.

Downloads and more info on https://tarsos.0110.be/tag/TarsosTranscoder

It uses (platform dependent) FFmpeg binaries in the background. It is a fork of JAVE (Java Audio and Video Encoder) by Carlo Pelliccia (www.sauronsoftware.it).

Tarsos Transcoder focuses only on audio and it is compatible with more, and more recent FFmpeg binaries and it less dependent on text output of the different binaries. The interface is also simplified. It falls back to use the ffmpeg binary in the system path, if one is present, therefore it supports platforms for which no binary is provided within the release.

Getting Started

If you have Apache Ant and git installed on your system the following commands get you started quickly:

git clone https://[email protected]/JorenSix/TarsosTranscoder.git
cd TarsosTranscoder/build
ant #Compiles and builds the core TarsosTranscoder library
ant javadoc #Creates the javadoc documentation in TarsosTranscoder/doc
java -jar tarsos_transcoder-1.0.jar ../audio/input/tone/tone_10s.wav test.flac FLAC_MONO_44KHZ #Test wav to flac transcoding

If you want to use the transcoder from within Java you need to call Transcoder. It is as simple as:

Transcoder.transcode("foo.mp3","foo.wav",DefaultAttributes.WAV_PCM_S16LE_STEREO_44KHZ);

FFmpeg can encode to a lot of audio formats and can decode even more.

Inner workings

Tarsos Transcoder tries to find an FFmpeg binary in the path of the system. If it does not find one it tries to copy a binary for the current platform. Tarsos Transcoder contains three binaries: one for MAC OS X, one for Linux (x86) and one for windows. Tarsos Transcoder has been tested on:

It will probably work most of the time.

Alternative Binaries

If the TarsosTranscoder does not include binaries for you platform, install ffmpeg and add the ffmpeg executable to your system path. It will be found and used by TarsosTranscoder automatically.

Alternatively, providing binaries for your (unsupported) platform can be done by implementing FFMPEGLocator. The PickMe method should yield true on your platform and copy e.g. an FFmpeg binary to a temporary directory.

Lisence

This software is licensed under GPL, TarsosTranscoder is based on JAVE (GPL).

Credits

JAVE (Java Audio and Video Encoder) by Carlo Pelliccia – www.sauronsoftware.it

FFmpeg: this uses libraries from the FFmpeg project under the LGPLv2.1

This product includes software developed by The Apache Software Foundation. It uses the Apache Commons Exec library, licensed under the Apache License Version 2.0

TarsosTranscoder is used by Tarsos, Tarsos is developed at University College Ghent, Faculty of Music