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.

50 comments:

  1. Thank you for your pluggin. I think it is a shame that Adobe does not provide WebM support out of the box.

    ReplyDelete
  2. 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?

    ReplyDelete
  3. 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.

    ReplyDelete
  4. RIght, Mike. The plug-in is actually built with the CS5 SDK, but the installers are only made for CS6 and above. As you found, copying the plug-in to CS5's directory works.

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete
  6. 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...

    ReplyDelete
  7. 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?)

    ReplyDelete
  8. This comment has been removed by the author.

    ReplyDelete
  9. This comment has been removed by the author.

    ReplyDelete
  10. I downloaded the video and the audio played for me, both in Firefox and in Premiere on Mac. There is 5.1 surround sound, although only at 48 kHz, not 96.

    ReplyDelete
  11. 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.

    ReplyDelete
  12. 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!

    ReplyDelete
  13. 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.

    ReplyDelete
  14. 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.

    ReplyDelete
  15. 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.

    ReplyDelete
  16. This comment has been removed by the author.

    ReplyDelete
  17. I downloaded your file and it looks like Premiere is interpreting it as 6 Mono channels instead of one 5.1 channel. You can fix this in Clip > Modify > Audio Channels, as shown in this video.

    ReplyDelete
  18. 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.

    ReplyDelete
  19. This is really not the right forum for solving this problem. I suggest you start a thread on forums.adobe.com and we continue the discussion there.

    ReplyDelete
  20. This comment has been removed by the author.

    ReplyDelete
  21. 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

    ReplyDelete
  22. Hmmm, it works for me in AME CC 2015, on Windows 7 at least (should work everywhere else too). Should even load the same copy of the plug-in if it's in the shared MediaCore plug-ins directory.

    ReplyDelete
  23. 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.

    ReplyDelete
  24. Great plugin, very helpful, something I'm sure everyone is aware of but an improvement would be more reliable estimated file sizes, this would be wonderful.

    ReplyDelete
  25. Doesn't seem to be working for me - it lets me load .webm files, but in CC2015 (as of 12/10/15) it doesn't let me play the video, even though it appears to load it okay.

    Thoughts?

    ReplyDelete
  26. 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.

    ReplyDelete
  27. 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.

    ReplyDelete
  28. The plug-in is slow because Google's encoder is slow. But there are some things you can do to speed it up, mostly at the cost of encoding efficiency (i.e. picture quality for a given data rate).

    First, you can switch to the VP8 codec. This is a more fair comparison with H.264 anyway.

    Second, you can experiment with different encoder arguments. Try putting "--cpu-used=4" in the custom args field.

    Third, switch off 2-pass encoding. It's the first pass that uses little CPU power, the second does multi-threading better.

    ReplyDelete
  29. 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.


    ReplyDelete
  30. Brendan: why are you not using the FFmpeg encoder instead of the google encoder. I read that that one is way faster then the one from Google.

    ReplyDelete
  31. 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.

    ReplyDelete
  32. what about having a plugin for after effects?

    ReplyDelete
  33. An AE plug-in would be a possibility, but actually a little harder than you might think. Just hoping to save a step?

    You can render an AE comp to WebM out via Adobe Media Encoder right now.

    ReplyDelete
  34. Is your site down? It will not load and I can't find the download for the actual plugin anywhere besides the links that you have, which all do not work?

    ReplyDelete
  35. 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?

    Thanks!

    ReplyDelete
  36. Hi, i'm using your pluigin for premiere and the quality of the video is great ... but y don't can put these videos in the web steaming... fail ...
    You can correct this problem?
    Thank you very much

    ReplyDelete
  37. 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.

    ReplyDelete
  38. 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. :)

    ReplyDelete
  39. plugin does seem to work - thanks! However, has anyone been able to successfully encode with alpha? No matter what settings I choose it doesnt seem to work. any help is greatly appreciated. Thanks!

    ReplyDelete
  40. Note that the plug-in can not currently read the alpha back into Premiere. You'll need some other way to view it. It should be saving alpha if the box is checked though.

    ReplyDelete
  41. Yeah, can't get alpha saving to work.

    Current Premiere Pro CC 2017 and it just seems to save a solid alpha channel.

    Not sure what I'm doing wrong. Any suggestions?

    ReplyDelete
  42. 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.

    ReplyDelete
  43. Thanks alot. Changing the directory from 7.0 to cs6 helped a bunch!

    ReplyDelete
  44. This plug in doesnt work for me at all. Latest CC, i9, 64 gig ram. It barely runs.

    ReplyDelete
  45. Thank you for making this! You really helped this animation student out!

    ReplyDelete
  46. - Encoding Time: 00:00:22
    11/12/2019 09:18:27 AM : Encoding Failed
    ------------------------------------------------------------
    Export Error
    Error compiling movie.

    Accelerated Renderer Error

    Unable to produce frame.

    Writing with exporter: H.264
    Writing to file: \\?\L:\Video.mp4
    Writing file type: H264
    Around timecode: 00;00;04;01
    Rendering at offset: 0.083 seconds
    Component: H.264 of type Exporter
    Selector: 9
    Error code: -1609629695

    ReplyDelete
  47. Still falling back on fnord's software with AE 2020 Beta. Still no WebM+Alpha support in AME, Premier Pro, or AE. Still no transparency support for .MOV in AME at all afaik.

    Hope you keep making software!

    ReplyDelete
  48. I managed to export a webm with transparency (originally it was mov). At first it did not export the alpha channel, but then I changed the sampling to 4.2.0 and now the alpha works.

    ReplyDelete