B

Responsive Business Theme

You can change this text in Slider One settings tab of theme options page. Write something awesome to make your website ridiculously fabulous.

Continue Reading

Introducing stacks for advanced profiles

Friday we realeased a feature that we called Stacks. A stack is an encoding environment including a set of encoding tools and commands. This feature will provide us a way to upgrade ffmpeg without breaking your encoding commands.

The current stack, called 'corepack-1' is still the one used by default. The new stack we are introducing is called 'corepack-2' and brings speed plus lots of new formats and codecs.

If you are using some advanced profiles, you should consider:

  • using a Preset. They are easier to maintain and we provided lots of encoding options directly using either the web dashboard or the api.
    You can find the full documentation on our website
  • upgrading to the new stack. Your current encoding command might be incompatible with the new stack but it should be fairly easy to update it.
    You can find the full documentation on our website

Here is an example on how to migrate your profile to the new stack using Ruby.

$ rails c
profile = Panda::Profile.find '12345'

profile.command 
> "ffmpeg06 -i $input_file$ -vcodec libx264 -acodec libfaac -vb $video_bitrate$k -ab $audio_bitrate$k -y $output_file$"

profile.command = "ffmpeg -i $input_file$ -threads 0 -c:v libx264 -c:a libfaac $audio_sample_rate$ $video_quality$ $audio_bitrate$ $fps$ -y $output_file$"
profile.audio_sample_rate = 44100
profile.stack = 'corepack-2'

profile.save!
> true

Instructions when upgrading to the new stack:

  • $audio_bitrate$ and $video_bitrate$ return the ffmpeg encoding option instead of the value of the bitrate.
  • Make sure you set ‘-threads 0’ in your commands. We run custom ffmpeg binaries on our ec2 instances so no need to put -threads 16, our system is setting the number of threads automatically.
  • FFmpeg version is currently 0.10
  • ffmpeg06 doesn’t exist anymore.
  • We hightly recommand to add the $audio_sample_rate$ and $fps$ variables in your command. ffmpeg can become quite slow or fail on some videos if those variables are not set (no need if you are setting them manually: -ar 44100 -r 25)
  • If you have any issues upgrading, remember that a logfile (encoding.path + ‘.log’) is beeing uploaded to your bucket when an encoding job fails.

In about a month 'corepack-2' will become the default stack for the newly created profiles. Make sure you specify the stack name if you consider running on the old stack.

POST /profiles.json, {..., 'stack': 'corepack-1'}

Stack on presets cannot be set as they run on their own private stack constantly updated.

 

Leave a Reply

Your email address will not be published. Required fields are marked *