Google Flix Engine Linux Reference Manual User Manual
Page 382
376
Flix Engine Linux Page Documentation
## A port may be specified by giving rpchost in the form ’server:port’
## to avoid making a connection to portmap before contacting flixd.
## This is only useful if flixd is being run with the --port option.
## If timeout_s is 0 rpc’s default timeout will be used (typically 25s)
my $sc = Flix2_CreateEx($flixptr, $rpchost, $timeout_s);
#recover the actual handle value to be used in remaining flixengine calls
$flix = flix2handlep_value($flixptr);
checksc(’Flix2_CreateEx’,$sc);
print "Input File
: $ARGV[0]\n";
print "WARNING: path to input file is not absolute\n"
unless File::Spec::Functions::file_name_is_absolute($ARGV[0]);
$sc = Flix2_SetInputFile($flix, $ARGV[0]);
checksc(’Flix2_SetInputFile’, $sc);
##input file information
my ($srcduration,$srcw,$srch);
($sc,$srcduration)= Flix2_GetSourceDuration($flix);
checksc(’Flix2_GetSourceDuration’, $sc);
($sc,$srcw)= video_options_GetSourceWidth($flix);
checksc(’video_options_GetSourceWidth’, $sc);
($sc,$srch)= video_options_GetSourceHeight($flix);
checksc(’video_options_GetSourceHeight’, $sc);
print < Width: $srcw Height: $srch Duration: ${srcduration}ms EOT print "Output File : $ARGV[1]\n"; print "WARNING: path to output file is not absolute\n" unless File::Spec::Functions::file_name_is_absolute($ARGV[1]); $sc = Flix2_SetOutputFile($flix, $ARGV[1]); checksc(’Flix2_SetOutputFile’, $sc); ## ## Options may be set and codecs/filters/muxers may be added prior to Flix2_Encode() ## ##Add the scale filter ##create a storage location for the filter handle #my $filterptr= new_flix2plgnhandlep(); #$sc = Flix2_AddFilter($filterptr,$flix,$FE2_FILTER_SCALE); # checksc(’Flix2_AddFilter($FE2_FILTER_SCALE)’,$sc); # ##retrieve the value of the handle for use in the remaining filter functions #my $filter= flix2plgnhandlep_value($filterptr); #$sc = Flix2_FilterSetParam($filter,$FE2_SCALE_WIDTH,240); # checksc(’Flix2_FilterSetParam($FE2_SCALE_WIDTH,240)’,$sc); #$sc = Flix2_FilterSetParam($filter,$FE2_SCALE_HEIGHT,160); # checksc(’Flix2_FilterSetParam($FE2_SCALE_HEIGHT,160)’,$sc); # ##cleanup #delete_flix2plgnhandlep($filterptr); $filterptr= undef; # ##Add the vp6 codec. Though it is the default, you must add it in order ##to modify its settings #my $codecptr= new_flix2plgnhandlep(); #$sc = Flix2_AddCodec($codecptr,$flix,$FE2_CODEC_VP6); # checksc(’Flix2_AddCodec($FE2_CODEC_VP6)’,$sc); # ##retrieve the value of the handle for use in the remaining codec functions #my $codec= flix2plgnhandlep_value($codecptr); # #$sc = Flix2_CodecSetParam($codec,$FE2_VP6_RC_MODE,$VBR_1PASSControl); Generated on Tue Jul 20 17:39:03 2010 for Flix Engine Linux by Doxygen