org.mmbase.streams.transcoders
Class FFMpegTranscoder

java.lang.Object
  extended by org.mmbase.streams.transcoders.AbstractTranscoder
      extended by org.mmbase.streams.transcoders.CommandTranscoder
          extended by org.mmbase.streams.transcoders.FFMpegTranscoder
All Implemented Interfaces:
Serializable, Cloneable, Transcoder, PublicCloneable<Transcoder>

public class FFMpegTranscoder
extends CommandTranscoder

Transcoder that uses ffmpeg to transcode media. Possible parameters to be set in 'createcaches.xml' are: format, forceFormat (-f), acodec (-acodec), vcodec (-vcodec), vpre (-vpre), aq (-aq), ab (-ab), bitrate or b (-b), async (-async), framesPerSecond or r (-r), audioChannels or ac (-ac), width and height (combined to -s). Others can be added as extra parameters but will be at the end of the commands parameters. See the documentation for FFmpeg for more information.

Version:
$Id: FFMpegTranscoder.java 42423 2010-06-07 19:58:33Z andre $
Author:
Michiel Meeuwissen
See Also:
Serialized Form

Field Summary
(package private)  String ab
           
(package private)  String ac
           
(package private)  String acodec
           
(package private)  String aq
           
(package private)  String async
           
(package private)  String b
           
(package private)  String forceFormat
           
(package private)  Integer height
           
(package private)  String r
           
(package private)  String vcodec
           
(package private)  String vpre
           
(package private)  Integer width
           
 
Fields inherited from class org.mmbase.streams.transcoders.AbstractTranscoder
clone, codec, format, in, mimeType, out, PACKAGE
 
Constructor Summary
FFMpegTranscoder()
           
 
Method Summary
 FFMpegTranscoder clone()
           
protected  String[] getArguments()
           
 Codec getCodec()
           
protected  String getCommand()
           
protected  LoggerWriter getErrorWriter(Logger log)
           
protected  LoggerWriter getOutputWriter(Logger log)
           
 void init(Node dest)
          Init the transcoder and destination node with appropiate values.
 void setAb(String a)
           
 void setAbitrate(String a)
           
 void setAc(String a)
           
 void setAcodec(String a)
           
 void setAq(String a)
           
 void setAsync(String a)
           
 void setAudioChannels(String a)
           
 void setB(String b)
           
 void setBitrate(String b)
           
 void setForceFormat(String f)
           
 void setFramesPerSecond(String r)
           
 void setHeight(int y)
           
 void setR(String r)
           
 void setVcodec(String v)
           
 void setVpre(String vp)
           
 void setWidth(int x)
           
 
Methods inherited from class org.mmbase.streams.transcoders.CommandTranscoder
getEnvironment, getKey, setMethod, setPath, setProperty, transcode
 
Methods inherited from class org.mmbase.streams.transcoders.AbstractTranscoder
getFormat, getIn, getInstance, getMimeType, getOut, setCodec, setFormat, setMimeType, toString, transcode
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

forceFormat

String forceFormat

acodec

String acodec

vcodec

String vcodec

vpre

String vpre

ab

String ab

aq

String aq

b

String b

async

String async

r

String r

ac

String ac

width

Integer width

height

Integer height
Constructor Detail

FFMpegTranscoder

public FFMpegTranscoder()
Method Detail

setForceFormat

public void setForceFormat(String f)

setAcodec

public void setAcodec(String a)

setVcodec

public void setVcodec(String v)

getCodec

public Codec getCodec()
Specified by:
getCodec in interface Transcoder
Overrides:
getCodec in class AbstractTranscoder

setVpre

public void setVpre(String vp)

setAb

public void setAb(String a)

setAbitrate

public void setAbitrate(String a)

setAq

public void setAq(String a)

setB

public void setB(String b)

setBitrate

public void setBitrate(String b)

setAsync

public void setAsync(String a)

setR

public void setR(String r)

setFramesPerSecond

public void setFramesPerSecond(String r)

setAc

public void setAc(String a)

setAudioChannels

public void setAudioChannels(String a)

setHeight

public void setHeight(int y)

setWidth

public void setWidth(int x)

getErrorWriter

protected LoggerWriter getErrorWriter(Logger log)
Overrides:
getErrorWriter in class CommandTranscoder

init

public void init(Node dest)
Description copied from interface: Transcoder
Init the transcoder and destination node with appropiate values.

Specified by:
init in interface Transcoder
Overrides:
init in class AbstractTranscoder
Parameters:
dest - stream destination Node

getCommand

protected String getCommand()
Specified by:
getCommand in class CommandTranscoder

getArguments

protected String[] getArguments()
Specified by:
getArguments in class CommandTranscoder

getOutputWriter

protected LoggerWriter getOutputWriter(Logger log)
Overrides:
getOutputWriter in class CommandTranscoder

clone

public FFMpegTranscoder clone()
Specified by:
clone in interface PublicCloneable<Transcoder>
Overrides:
clone in class CommandTranscoder


MMBase 2.0-SNAPSHOT - null