Monday, April 13, 2015

WebM for Premiere Pro

After well over a year in public beta, today we're calling the free WebM plug-in for Premiere Pro officially released. In that time the plug-in has evolved greatly based on feedback from users and from Google itself. And it will continue to evolve, especially as Google continues to develop their libvpx encoder.

One thing that has been interesting to watch is how the VP9 codec has come along. When I posted the first beta, VP9 was experimental, had hardly any application support, and was incredibly slow to encode. Today you can play VP9 in Firefox, Chrome, VLC, and other standards-compliant software. And VP9 encoding…well, let's just say it's a lot faster than it used to be, thanks to multithreading and countless other optimizations.

Here's a test I ran: encode the same clip in the different codecs using some masochistic bit rate so you can really see the artifacts. In this case it's a 1080p clip encoded at 500 kb/s (0.5 Mb/s). I made an H.264 using Premiere's encoder and VP8 and VP9 clips using the plug-in. Here's a close-up screenshot of the results:

You can see VP9 has the best palm tree detail, for the same file size. VP9 is a next-generation codec, and it's available and supported right now. The big downside: encoding VP9 took three times longer to encode than VP8 and eighteen times longer than H.264. But what's one long encode when it means potentially thousands of people who view the clip get much higher quality?

Don't take my word for it. Try it yourself and post your results in the comments.

I see on the download page CS6 is required, I thought maybe it was exaggerated and that it might still work with CS5. Since I can't seem to get this plugin to work I must assume the listed requirement is correct. Are there any plans to add CS5 compatibility?

Disregard my previous comment/question. It appears the installer copies the plugin to the wrong folder. Go to "C:\Program Files\Adobe\Common\Plug-ins\" and move the plugin from the "7.0" folder to the "CS5" folder.

The WebM plug-in seems not able to encode 5.1 surround sound content - only Dolby encoded, so it's not playable e.g. on VLC Desktop Media Player or within an HTML5 website. Also the encoding aborts while encoding a video with 96 kHz audio. What to do? Any solution possible?

Further the installation fails when CS6 and CC are installed parallel. The plug-in file WebM.prm has to be copied from C:\Program Files\Adobe\Common\Plug-ins\CS6\MediaCore into the directory of CC at C:\Program Files\Adobe\Common\Plug-ins\7.0\MediaCore manually in this case - also the complete folder 564C4144_666C7620 with the presets have to be copied from C:\Program Files\Adobe\Adobe Premiere Pro CS6\MediaIO\systempresets\564C4144_666C7620 to C:\Program Files\Adobe\Adobe Premiere Pro CC 2014\MediaIO\systempresets\564C4144_666C7620...

The audio option "Dolby 5.1" doesn't actually mean the audio is Dolby encoded, just that it's using that configuration of surround channels from Premiere. The audio is encoded using the open source Opus or Vorbis codecs as usual. Try reading the resulting file in Premiere. If it works there, then the problem is most likely your player.

Encoding 5.1 at 96000 kHz works for me. (Of course, you have to switch to the Vorbis codec to do that because Opus is locked at 48000.) Perhaps you can email me more details about your settings?

Yes, perhaps the Windows installer needs to be revisited. (Did I mention this is an open source project?)

Thank you! Please compare it with the H.264 video. In the rear speakers the front left and right channels are played - not the rear channels of the audio file, which contain only reverberation and early reflections. Also Firefox is generally unable to play 5.1 content, it plays only the stereo channels. At my installations the Premiere Pro WDM Sound driver is not able to address the surround speakers. I encoded it with 48 kHz because the encoding aborts at 96 kHz.

PS: We talk about an active surround sound system directly plugged in into the mini jacks of the computer's multichannel sound card - not about a surround sound system connected over a receiver, which decodes Dolby Digital encoded audio! Only in the last case Firefox would be able to play 5.1 content!

I think I'm doing surround sound properly. I started a discussion here and posted some test files.

A WebM file should not hold Dolby Digital encoded audio because that is a patented codec and WebM uses only the patent-free codecs Vorbis and Opus. Vorbis and Opus can do surround, however, and it's up to the player+user to output the 6 channels, possibly by converting it to Dolby Digital.

Your test files are working fine, also on the VCL Desktop Player! Seems you recorded the Windows test sound out of your sound card? Anyway - did you compare my WebM video with the H.264 video? I encoded the WebM video again out of an AVI master - and got the same result: The surround sound channels haven't been encoded! Shell I reproduce the error of the WebM plug-in in encoding 5.1 content within a test file? The original audio was mastered in Adobe Audition and exported as 24 bit multichannel wav.

I suspect the problem is not with the WebM plug-in, but with how Premiere is set up. This video shows the key step of setting up your Premiere sequence to do 5.1. I created those test files using the same WebM plug-in you're using.

Yes, you're right - this appears while importing it as mp4. But I encoded it directly from the 5.1 wav file out of a 5.1 audio channel. So this is not the reason for the failed encoding into the WebM format.

Just checking to see if this plug in will be working on CC Media Encoder 2015. I had it working fine on CC ME 2014, but not able to get it on the new version. On CC 20014, works great, love it. 6/18/15

B,After messing around, It appeared in PP 2015 but still not in AME upon launch. I worked around by exporting the File via PP (Export->media), then creating a new user preset in AME from the incoming file's format (WebM). Seems to work. I'm not sure why it doesn't appear naturally. On a Mac Its in Library/Application Support/Adobe/Common/Plug-ins/7.0/MediaCore/WebM Premiere.bundle but it's not being picked up by AME 2015 on my system. Let me know if it should be somewhere else.

Anyway, thank you for all of your hard work. The final videos uploaded to YouTube look great.

Some videos may play very poorly, especially if they have very large GOPs. You see the same thing with some H.264 files. Both formats are more for delivery than editing. You can send me a file if you want me to take a look. This WebM should play pretty well.

Im am affraid to say it but this plugin is very slow in the Adobe media encoder. I wanted to encode a 50FPS h264 source into Webm with this plugin in Premiere CC 2015.2 and it said it was going to take 9 hours to encode a video of less than 15 minutes. That is not an amount of time I am willing to wait for my encoding. Encoding the same sequence in H264/mpeg4 takes about 23 minutes. I see that the media encoder is not taking more then 30% of CPU on my machine so it looks like it is not using all 8 threads to the maximum on my Core I7. I guess this plugin needs some work to optimize it.

I have been experimenting with the parameters that can be passed to the codec. However I think using "--cpu-used=4" = not a good comparison with H264. The help text for the webm codec says: about this:

Setting a value of 4 or 5 will turn off "rate distortion optimisation" which has a big impact on quality.

Instead I have used "--threads=8 --token-parts=3" and went to VP8 and that took the cpu usage up to being around 65% and the encoding time to around 50 minutes which is still a lot more the the 23 minutes the premiere pro H264 encoder takes. The standard Premiere pro HEVC/H265 encoder takes only 35 minutes which is still faster then the Webm VP8 encoding and encodes approximately at the same quality to bitrate ratio as Webmn VP9.

So I tested these same parameters on a VP9 encoding (same premiere sequence) and the CPU went down to an average of 53% and encoding time was just over 2 hours and 15 minutes. Much better then the original 9 hours but still way slower then the H265 encoding of 35 minutes.

I found another parameter that would directly influence cpu usage --rt=0 that would have to pump upo the cpu uasge to 100% according to its description. However that did not really do the job it was supposed to do. CPU averaged to 62% and encoding time went up to above 6 hours. It seemd to be more concerned with itself then with encoding when this parameter is used.

So for youtube movies I will still go for the H264 or H265 standard encoders in premiere pro considering the speeed of encoding and the fact that youtube compresses it further down the quality line then I deliver it anyway.

I believe FFmpeg uses libvpx for encoding just like I do. They wrote their own decoder, but decoding is OK in libvpx in my opinion. I recommend exploring the custom arguments like --cpu-used to speed things up. You can also turn off 2-pass encoding and switch to the VP8 codec.

Hey Brendan! At some point I installed an older version of your plugin back when it was in beta. Now I can't install the latest version though, as it keeps saying I have an older version installed. Unfortunately, I can't find the installation entry in my Apps/Programs uninstallation list in Control panel and can't uninstall it. Is it possible for you to set the next version so that it just overwrites the currently installed plugin instead of needing to uninstall the old version?

Barring that, how would I uninstall the old plugin manually so that I can install the latest version?

Thank you so much for this great work! Just a suggestion, can you put more arguments into the GUI, especially like the keyframe? Because I have to change the keyframe settings all the time. I believe some other users might need to frequently change some other settings as well. So I think maybe this will make it more friendly.

Hello, thank you very much for this plugin.I am wondering if you are able to provide marker support.By this I mean when exporting webm with markers & importing the webm, itself, you can see the markers as clip markers, like when exporting mp4.Thanks again. :)

I'm having the same issue. The "save alpha" option isn't present, and I cannot find another way to make this product encode with alpha channel. I know VP8 can save alpha, various online tools do it perfectly.