Skip to content

Instantly share code, notes, and snippets.

@pyrat
Created September 25, 2009 11:53
Show Gist options
  • Save pyrat/193499 to your computer and use it in GitHub Desktop.
Save pyrat/193499 to your computer and use it in GitHub Desktop.
def encode_flv_flash
Merb.logger.info "Encoding with encode_flv_flash"
transcoder = RVideo::Transcoder.new
recipe = "ffmpeg -i $input_file$ -ar 22050 -ab $audio_bitrate$k -f flv -b $video_bitrate_in_bits$ -r 24 $resolution_and_padding$ -y $output_file$"
recipe += "\nflvtool2 -U $output_file$"
transcoder.execute(recipe, self.recipe_options(self.parent_video.tmp_filepath, self.tmp_filepath))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment