FFmpeg::Codec - A media stream (co)mpression / (dec)ompression algorithm
$codec = FFmpeg->codec('msmpeg4'); #or perhaps $ff = FFmpeg->new(); #... $sg = $ff->create_streamgroup(); #see FFmpeg::StreamGroup $st = ($sg->streams()); #see FFmpeg::Stream $codec = $st->codec
Instances of this class represent a compression/decompression algorithm, or codec, that is supported by FFmpeg-C. Audio and video streams use separate codecs. If a codec exists, it means that FFmpeg-C can use it to do at least one of:
Call "can_read()" and "can_write()" to see what functionality is supported for a given codec. Call "is_video()" and "is_audio()" to determine if a codec is capable of encoding/decoding audio or video.
See "FEEDBACK" in FFmpeg for details.
Allen Day <firstname.lastname@example.org>
Copyright (c) 2003-2004 Allen Day
This library is released under GPL, the Gnu Public License
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a '_'. Methods are in alphabetical order for the most part.
my $obj = new FFmpeg::Codec();
Builds a new FFmpeg::Codec object
an instance of FFmpeg::Codec
All optional, refer to the documentation of "new()" in FFmpeg, this constructor operates in the same way.
Internal method to initialize a new FFmpeg::Codec object
true on success
Arguments passed to new
$obj->can_read(); #get existing value
FFmpeg-C can decode this codec?
$obj->can_write(); #get existing value
FFmpeg-C can encode this codec?
$obj->id(); #get existing value
FFmpeg-C's internal ID for this codec
value of id (a scalar)
$obj->is_audio(); #get existing value
does this codec encode/decode audio streams?
$obj->is_video(); #get existing value
does this codec encode/decode video streams?