Closed Captions… what, why and how?

Closed captions have become inseparable part of any video. Making it possible to watch Scandinavian independent cinema. Helping the hearing impaired  experience the Game of Thrones as good as it gets. We all benefit from them.

Most video players have option to load subtitles from file. However, that means that if you want to deliver video with subtitles to your client, you’d have to send not only media file, but subtitles files too. What if they get mixed up? Or how to be sure that we have sent all available subtitle files to client? Fortunately there are other ways.

The first option is to burn subtitles into every frame of video. Sometimes it is needed for devices which can’t transform frames by themselves. Old TVs are a good example here. But it doesn’t mean we should be limited by old technology? Of course not. The second option is to use closed captioning. It allows to put multiple subtitles into one video file. Each of them will be added as a separate subtitle track. Now anyone who downloads video with closed captions embedded will be able to select which one to use or if disable them if not needed.

Closed captions are must have these days and we didn’t want to be left behind. So, there’s new parameter in H.264 preset which enables closed captioning. At the moment it is accessible only through our API but we are working on adding it to our web application. The parameter name is ‘closed_captions’ and the value can be set to:

  • ‘burn’ – with this setting Panda will take the first subtitle file from list and add subtitles to every frame
  • ‘add’ – with this setting Panda will put every subtitles from the list into separate track

Here’s a snippet of code in Ruby with an example how to use it:

Panda::Profile.create(
    :preset_name => "h264",
    :name => "h264.closed_captions",
    :closed_captions => "add"
)

Panda::Video.create!(
    :source_url => "VIDEO_SOURCE_URL",
    :subtitle_files => ["SUBTITLE_1_SOURCE_URL", "SUBTITLE_2_SOURCE_URL",  "SUBTITLE_3_SOURCE_URL"],
    :profiles => "h264.closed_captions"
)

Panda supports all major subtitles formats like SRT, DVD, MicroDVD, DVB, WebVTT and many more.

Thank you!

Read More

Panda adds audio streams packing

Video files can contain more than just video, they usually have some kind of audio too, and sometimes subtitles or other data as well. Video processing is not an easy task, but one thing is certainly easier about it than about audio: there’s almost always just one video stream to worry about, but there can be multiple audio streams. Good, old stereo means having two audio streams, and nowadays we’ve gone much further than just two. We often have a small platoon of speakers around our couch, and each one of them might get its own audio stream.

A single container format (like MP4, MKV or AVI) can contain multiple audio streams. When transcoded, these streams can be left as they are, but sometimes you may need to map them to different speakers, merge or duplicate, even add muted streams. All these things have always been possible in Panda through raw FFmpeg commands, but recently we’ve decided to make it bit simpler.

Now you can decide if Panda should merge audio streams, with a single checkbox. The default behavior is to leave the streams mapping untouched. However, if you want to merge – Panda will intelligently pack them as audio channels into a single stream – 2 input streams will be packed as one stereo stream, 6 streams as one 5.1 surround streams, and so on.

Let us know if you have any questions.

Read More

How profiles pipelining makes your life easier

Have you ever wondered if there is an option to encode your video and then use an encoded version of it as an input to new encoding? So far it hasn’t been available off the shelf, but it has been possible to get it using our notification system. But why should our customers have to take care of it by themselves?

So, what is profiles pipelining?

Let’s say you want to send a video to Panda and encode it using 3 profiles: “h264.1”, “h264.2”, “h264.3”, and then you want a video created within profile “h264.2” to be encoded using profiles “h264.4” and “h264.5”. And you also want to create output using profile “h264.3” which needs to be encoded using profile “h264.6”. But it’s not the end. To make it harder you also want to encode video created with profile “h264.5” using “h264.7”. Uhh, it can be hard to imagine what is going on, so for simplicity below you can see an image showing what I mean.

 

Pipeline Example
Example pipeline

 

 

First we need to describe it using JSON:

{
  “h264.1”:{},
  “h264.2”:{
    “h264.4”:{},
    “h264.5”:{
      “h264.7”:{}
    }
  },
  “h264.3”:{
    “h264.6”:{}
  }
}

 

And now we can send our request to Panda. Below is example Ruby code:


pipeline = {
  “h264.1” => {},
  “h264.2” => {
    “h264.4” => {},
    “h264.5” => {
      “h264.7” => {}
    }
  },
  “h264.3” => {
    “h264.6” => {}
  }
}


Panda::Video.create!(
  :source_url => “SOURCE_URL_TO_FILE”,
  :pipeline => pipeline.to_json
)

Now, when encoding is done, Panda will look if there is anything more to do next in the pipeline. If, for example, encoding to “h264.2” is done, it will become a new input for  “h264.4” and “h264.5” profiles and so on. Encodings created using pipelines will have additional field parent_encoding_id which can be used to find out what was the input used to encode or to reproduce pipeline with encodings instead of profiles.

If you have any problems with this new feature don’t forget that we are always here to help you.

Take care!

Read More

Panda’s new clothes

The neglected child…

New user interface for our web application has been long overdue. We focused so hard on improving Panda core features that we neglected the UI. A bit. Today is the day to make it up to you. New, updated and better Panda UI has arrived.

You’re probably very well aware that old UI was okay-ish but far from perfect. We decided to take it easy and choose evolution instead of revolution. Changing users habits and workflows is always sensitive and tricky business. That’s why we think it makes more sense to introduce changes gradually.

 

Nt6DBzFkSwuNs63f9PFS
Video list view

 

 

Our main goal for first roll out was to deliver cleaner, simpler UI that makes a better use of screen space. Based on your feedback we added small changes for those of you that transcode large volumes. We’ve added simplified list view for videos and profiles to make it easier to browse them. We unified the application behavior, to make sure configuration of key Panda features is always done the same way.

 

Cm72WQ57RTyXQabAkR3P
Profiles list view

 

 

Front-end piece of the app is now based on well known and proven AngularJS framework.

What’s next?

Expect more changes in the coming weeks. We’re working on better, more detailed encoding analytics. That’s one of more requested improvements and we’re happy to oblige.

Current console will get overhaul as well to make it more useful. Brand new piece of Panda – Live Transcoding –  will be getting it’s own piece of UI (it’s in beta now). And of course, there’ll be a number of small tweaks improvements that at first may go unnoticed but will make your work with Panda both, easier and more fun.

We would love to hear what you think. What could have been done better? Did we miss something?

Stay tuned!

Read More