If I remember correctly, the line:
:resolution_and_padding_no_cropping =>
self.ffmpeg_resolution_and_padding_no_cropping
had to be added manually but the method already existed in the code.
If you don't see it I can post it when I get back on my AMI, just let
me know.
def recipe_options(input_file, output_file)
{
:input_file => input_file,
:output_file => output_file,
:container => self.container,
:video_codec => self.video_codec,
:video_bitrate_in_bits => self.video_bitrate_in_bits.to_s,
:fps => self.fps,
:audio_codec => self.audio_codec.to_s,
:audio_bitrate => self.audio_bitrate.to_s,
:audio_bitrate_in_bits => self.audio_bitrate_in_bits.to_s,
:audio_sample_rate => self.audio_sample_rate.to_s,
:resolution => self.resolution,
:resolution_and_padding => self.ffmpeg_resolution_and_padding,
:resolution_and_padding_no_cropping =>
self.ffmpeg_resolution_and_padding_no_cropping
}
end
def encode_iphone
Merb.logger.info "Encoding with encode_iphone"
transcoder = RVideo::Transcoder.new
recipe = "ffmpeg -threads 4 -y -i $input_file$ -r 29.97 -vcodec
libx264 $resolution_and_padding_no_cropping$ -flags +loop -cmp +chroma
-deblockalpha 0 -deblockbeta 0 -crf 24 -bt 256k -refs 1 -coder 0 -me
umh -me_range 16 -subq 5 -partitions +parti4x4+parti8x8+partp8x8 -g
250 -keyint_min 25 -level 30 -qmin 10 -qmax 51 -trellis 2 -
sc_threshold 40 -i_qfactor 0.71 -acodec libmp3lame -ab 128k -ar 48000 -
ac 2 $output_file$"
transcoder.execute(recipe, self.recipe_options
(self.parent_video.tmp_filepath, self.tmp_filepath))
end
>
butch.wes...@gmail.com