New features: custom output paths & iOS update
Today we have deployed some very interesting improvements on our platform. Let’s review them all.
Custom output filename paths (store your files in subdirectories!)
Many of you have requested a way to store video inside folders instead of having everything in the root of your bucket. We think we found a nice solution to solve this problem.
When you upload a video there is now a new optional attribute called path_format. It enables you to specify destination and name of a video and it’s encodings.
The path_format variable is a string representing the complete video path without the extension name. It can be constructed using some provided keywords.
The better way to explain this is with a few examples (the following examples use the Panda Rubygem version 1.1.0)
Panda::Video.create(:file => ..., :path_format => "my-example/:id")
This will save the output files inside the folder “my-example/” and the ID will be used as part of the filename. Here is the example of the generated files after having encoded the video.
http://yourbucket.s3.amazonaws.com/my-example/_video_id.flv
http://yourbucket.s3.amazonaws.com/my-example/_video_id_1.jpg
http://yourbucket.s3.amazonaws.com/my-example/_encoding_id.mp4
http://yourbucket.s3.amazonaws.com/my-example/_encoding_id_1.jpg
…
http://yourbucket.s3.amazonaws.com/my-example/_encoding_id_7.jpg
Panda::Video.create(:file => ..., :path_format => "my-example/:id/my_file_name")
This will save the output files inside the folder “my-example/id/” and the text my_file_name will be used as part of the filename.
http://yourbucket.s3.amazonaws.com/my-example/_video_id/my_file_name.flv
http://yourbucket.s3.amazonaws.com/my-example/_video_id/my_file_name_1.jpg
http://yourbucket.s3.amazonaws.com/my-example/_encoding_id/my_file_name.mp4
http://yourbucket.s3.amazonaws.com/my-example/_encoding_id/my_file_name_1.jpg
…
http://yourbucket.s3.amazonaws.com/my-example/_encoding_id/my_file_name_7.jpg
The API provides some other keywords.
:id => The id of the video or the encoding.
:video_id => The id of the video.
:original => The original filename of the uploaded video
:date => The date the video was uploaded. ('2009-10-09')
:profile => The profile name used by the encoding ('original' is used when the file is the original video)
:type => The video type, 'original' or 'encodings'
:resolution => The resolution of the video or the encoding. ('480x340')
How should I construct the path_format?
You should take care with the way you construct the path_format. It allows you to save your videos in a very simple a flexible way but it’s up to you ensure uniqueness of the filenames inside your bucket.
If you create a video with :path_format => "my-panda-video" all videos will be called my-panda-video with a different extension (my-panda-video.flv, panda-panda-video.mp4). But this should not be done, because if your original file has the same extension as your encoding profile, the encoding output will override the original video.
Some tips
The presence of :id always ensures uniqueness.
Using :video_id does not ensure uniqueness.
e.g. “folder/:video/:type/my-video” works if you don’t have two profiles generating two different encoding having the same extension name. Otherwise one is overwritten.
Using :video_id and :profile together does ensure the uniqueness if you add profile name to all your profiles.
e.g. “folder/:video_id/:profile/my-video”
All other keywords are not unique.
How do I download my encodings now?
The API returns a new variable when asking for the properties of a video or encoding called “path”
GET /encodings/12323.json
{
"id":"1234567890"
"extname": ".mp4"
"path": "1234567890"
}
You can now construct the complete path this way (this example is in Ruby):
encoding = get('/encodings/12323.json')
encoding_url = encoding['path'] + encoding['extname']
screenshot_url = encoding['path'] + "_4.jpg"
If your are Using the Panda Rubygem version 1.1.0 or above, you will be able to get your encodings as before.
encoding = Panda::Encoding.find '12323'
encoding.url
encoding.screenshots[3]
New iOS (iPhone and iPad) preset
The iOS preset has been re-worked and improved to make it easier to use. There are two main changes.
- We will no longer upload the non-segmented .ts files in your bucket.
- The
extnameof your encodings is now correctly set to .m3u8 instead of .ts. This means that from now on the Panda Gem and other client libraries will return the correct url for this profile.
Identify profiles by name instead of ID
We have found it very convenient to be able to specify which encoding to use when sending a video. Now you can do it even more easily by specifying the profile name instead of its ID.
For example:
Panda::Video.create(:file => ..., :profiles => 'h264,my-custom-name')
video.encodings.create(:profile_name => 'ogg')
We hope you find these features useful, and look forward to showing you what else we’ve got in development shortly.
We’re a 2010 European Readers’ Choice Awards nominee

Head over to the site and vote for your favourite transcoding solution (Panda, of course!). Go on, make some Pandas happy!
A new uploader powered by HTML5 technology

File uploads have traditionally had very bad usability on the web. The standard solution was uploading files as part of a form, leaving the user to just wait until the process was done. We could offer barely any feedback of what was going on.
Several options appeared to make the process more bearable for the user. Some alternatives were client-based, such as using some Flash-powered element like SWFUpload. Other alternatives laid more on the side of the server with a pinch of Ajax. However, there was still the question of why there was no solution that avoided proprietary technology, required minimal hassle OR was free of far-fetched hacks.
Our current Panda jQuery upload plugin makes use of SWFUpload to allow seamless integration with your existing site and provide a progress bar. As keen advocates of HTML5 video, this hasn’t always been the ideal solution.
We’re on the brink of a HTML5 revolution, and with some ingenuity we’ve managed to develop a HTML5 powered Ajax uploader with progress. In a similar fashion to new HTML5 video players, there is a seamless fallback to Flash if the user’s browser doesn’t support the necessary HTML5 features.
We think the end result is a great improvement. Please head over to the Github page to download the source of the beta version. We’d love to hear your feedback!
If you’d like to learn more about the new HTML5 File API and XMLHttpRequest Level 2. Head over to the New Bamboo blog to read the in depth technical breakdown.
Beta version of new Panda gem
We’ve just released a beta version of the new gem for Panda. The gem has an improved interface for accessing the Panda API and makes it much easier to find the right encodings for embedding.
To find the url of an encoding it’s now as simple as this:
video = Panda::Video.find("1234")
mp4_encoding = video.encodings.find_by_profile_name("h264")
mp4_encoding.url
=> "http://s3.amazonaws.com/my_panda_bucket/4567.mp4"
Read the docs and download the branch from Github and let us know what you think!
Once it’s out of beta we will make this the default version (the old Panda style of using API urls still works) and also update the Rails docs.
Panda mention by AWS CTO
Yesterday we were chuffed to hear that in his talk at Gigaom’s conference Werner Vogels, Amazon’s CTO gave a shout out to us as an example of an innovative service hosted in the cloud. Checkout the full video over at Gigaom.com (our mention is around 25:30).
Panda goes public today!
Over the past few months during our private beta we have had some incredibly useful feedback from you all. We’ve all been working hard to incorporate your feedback and polish the service to perfection.
The service has been successfully processing many thousands of videos a month and several of you have even launched publicly in this time!
Today we’re pleased to announce we are opening up the beta to the public.
If you haven’t yet tried it out, there’s no better time than now. We have several easy guides, client libraries and sample application for Rails, PHP and Django: http://pandastream.com/docs
That’s not all though!
HTML5 Video
There has been a lot of talk about HTML5 video over the past few months. Browsers have been embracing support for the video tag, and although there’s isn’t yet a consensus on the codec of choice, we are now at a stage where HTML5 video can be reliably delivered with a Flash fallback for older browsers. This year we are going to be seeing a lot more in this area and we have several great new things in the pipeline.
The great news today is that right now you can use Panda to encode video to serve up to your users via HTML5, Flash and iPhone/iPad devices. We’ve written a tutorial which is available here: http://pandastream.com/docs
Python library and Django example app
We’ve also released a Python library and Django example application: http://github.com/newbamboo/panda_client_python and http://github.com/newbamboo/panda_example_django
If you’ve written a client lib or example app yourself we’d love to hear about it.
Codecs
We’ve been paying close attention to the types of video that Panda has been processing and have identified several codecs and FFMpeg options which we will be adding in and deploying next week.
Private content
Amazon has recently released support for private content on CloudFront. Many of you have asked in the past how you can restrict content to certain users. We recently added a permission option to Encoding Clouds, which controls whether the files Panda saves to your S3 bucket are publicly readable or not. If you wish to use this new CloudFront feature, you should set your bucket to private, and then follow the instructions in the Amazon Documention to setup CloudFront correctly.
… and finally, thanks!
We’d like to thank all users part of the private beta for helping shape this superb product. We’ve got lots more to get on with now and will look forward to keeping you up to date with new features and updates.
Cheers, Damien and the whole Panda team.
PS: Don’t forget to checkout Pusherapp a new hosted realtime web service we launched into beta a few weeks ago.
New hosted Panda service begins testing
Although things have been quiet for some time here, rest assured we have been working hard! We’re currently at the final stages testing the new managed Panda service internally. This service will allow people to make use of Panda without the fuss of managing the software installation and EC2 instances manually. The new version includes an improved API, with more control of the encoding options, and the managed service also allows you to instantly scale the number of encoding workers operating at any time.
At present the new API will only be available to a selection of beta users using the new managed service. However we are committed to the continuing the open source development of Panda, and next quarter we hope to have the new open source version of the codebase ready to release. This will be most useful for people who wish to use Panda on their own infrastructure.
If you are interested in being part of the beta, you can sign up for an invite on the homepage. We plan to send out the first invites this week.
