Новый кодек av1: ускоряем загрузку видео в браузере

History

No review of the VP9 would be complete without looking at the historical roots of the gun.

The VP9 is a striker-fired, polymer-framed pistol. Certainly it is not the first plastic, striker-fired gun ever made. Nor is it the first one ever made by Heckler & Koch.

Beating the Glock 17 to market by more than a decade, the VP70 was the first striker-fired, polymer pistol to see commercial introduction. The guns sold in two versions: a semi-automatic pistol for civilians and a select-fire variant for military use. Versions of the gun were manufactured from 1970 through 1989.

The VP70 name had a meaning to it. VP stood for Volkspistole, or the “People’s Pistol.” Just like Volkswagen was a car for the masses, HK perhaps intended for the VP70 to be a quality handgun that everyone could afford. “70” referred to the year it was introduced.

Though the gun never achieved the same level of sales success that the Glock pistols did, the VP70 clearly blazed a new trail that would be followed by nearly every major gun maker by the early 21st Century.

Технические детали

VP9 имеет много улучшений по сравнению с VP8

VP9 будет поддерживать суперблоки размером 32×32 пикселя (что важно для работы с высоким разрешением) и разработчики обсуждают возможность поддержки суперблоков размером 64×64. Также будет использоваться кодирование суперблоков с помощью квадродеревьев

В настоящий момент в стандарте VP9 определено два профиля: profile 0 и profile 1. Профиль 0 поддерживает цветовую субдискретизацию 4:2:0. Профиль 1, являющийся необязательным для аппаратных реализаций, дополнительно поддерживает цветовую субдискретизацию 4:2:2 и , альфа-канал, и канал глубины (англ. depth channel, карта глубин для точек изображения).

Продолжается рассмотрение профиля, поддерживающего 10-битное кодирование цветов.

В VP9 поддерживаются цветовые пространства: Rec. 601, Rec. 709, SMPTE-170, SMPTE-240 и sRGB.

Part 1: What Is VP9?

VP9 is an open and royalty free video coding format developed by Google. VP9 can reduce the bit rate by 50% compared to its predecessor VP8 while having the same video quality. What’s more, it features better compression efficiency than HEVC (H.265). Thanks to its high efficient video compression capability, it is widely applied to YouTube. After encoding YouTube videos in VP9, people can stream HD and even 4K UHD high-quality video at half the bandwidth used by other codecs. Nowadays, VP9 already accounts for a large percentage of YouTube videos delivered. Additionally, Microsoft Edge browser, along with Chrome, Firefox and Opera, have added the support for popular WebM VP9 codec.

HDR видео

В ноябре 2016 появилась возможность загружать High Dynamic Range (HDR) видео. HDR означает, что в видео хранятся цвета с большей яркостью: обычное видео рассчитано на передачу яркости до 120 кандела/м2, более яркие цвета выбеляются; новый стандарт HDR хранит яркость до 10000 кандела/м2.
Не существует телевизоров, имеющих яркость 10 тыс
кандела/м2, но у имеющихся в продаже телевизоров яркость составляет от 300-500 кандела/м2 у бытовых до 800-1000 у топовых UHD HDR, что в разы больше чем хранится в обычном видео. Если взять обычное видео и HDR телевизор, то, конечно, белый цвет будет показан на таком экране как белый с максимальной яркостью, но те цвета (синий, красный и т.д.), которые в реальности были яркими, в видео будут хранится как или темные, или выбеленые, хотя телевизор мог бы их показать. Причем информация о цвете потеряна и невозможно её восстановить. Вот для решения этой проблемы и придуман HDR.
Если у вас есть такой телевизор, а так же камера, способная снимать в HDR или RAW, то вы можете снимать, обрабатывать, загружать на ютуб и смотреть видео с широким динамическим диапазоном (HDR).
Для обработки youtube рекомендует DaVinci Resolve 12.5.2 или  YouTube HDR metadata tool. Поддерживаются Rec. 2020 с HLG (BT.2100) или PQ (SMPTE ST 2084), DCI P3 не поддерживается. Файловые форматы: H.264 10 bit, ProRes 422, ProRes 4444, DNxHR HQX, VP9 profile 2, в контейнерах mp4/mov/mkv. Разрешение загружаемого видео должно быть 720p и выше.
На обычных телевизорах и мониторах HDR будет показано преобразованным в обычный диапазон, т.е. будет выглядеть как обычное видео. Есть особенность: для поддержки HDR youtube использует кодек VP9 второй версии, и старые телевизоры, в которых нет возможности обновить кодеки, не смогут его показать.

Полезные ссылки
https://youtube.googleblog.com/
https://developers.google.com/youtube/player_parameters
https://support.google.com/youtube/answer/1722171?hl=ru официальные рекомендации Google о параметрах кодирования видео
https://www.youtube.com/html5 проверка браузера и возможности переключения плеера html5-flash
http://www.ibm.com/developerworks/ru/library/wa-html5video/ — введение в видео HTML5
http://audiophilesoft.ru/publ/my/youtube_audio_quality/11-1-0-285 — как Google кодирует аудио для YouTube

https://code.google.com/p/chromium/issues/detail?id=333619 — баг трекер хромиума
https://msdn.microsoft.com/en-us/library/windows/desktop/cc307964(v=vs.85).aspx
https://www.youtube.com/yt/creators
https://www.facebook.com/business/ads-guide/video-views/instagram-video-views

Conclusions

I’ve never taken to a pistol as fast as I have the VP9. There are a lot of guns I really like out there, but this HK handgun is the first that has so readily captured my attention.

There are a lot of things to like about this pistol. Heckler & Koch, though sometimes lampooned on the internet for their decisions on which guns to sell to private citizens, is universally acknowledged as a quality gun maker. The company’s traditionally high standards for manufacturing have applied equally to this new gun.

When you consider a street price of less than $650 for this combat-ready 9mm pistol (~$725 with night sights,) it is clear that this is more than just a great gun, it is also a great value.

Where to buy a VP9

The VP9 should be available at most local gun shops. If you are looking for the best price, I’d suggest using my affiliate link to Palmetto State Armory. PSA offers good pricing on these. I’ve always had good service from them.

Disclosure

The sad reality is there are many “sponsored” reviews on the internet that are bought and paid for by the manufacturer. This does a disservice to the buying public who needs good information on products before laying down their hard-earned money. So, let me fully disclose all relevant information here.

First, this gun was provided to me as a loaner pistol by HK for the specific purpose of reviewing it. It arrived to me brand new and appears to be a low serial numbered production gun. No monies or other benefits were paid, offered or provided by HK to do this review. If I decide to keep this gun, I will have to pay for it, though it would be at a discounted price since it it is now a used gun.

Second, I also reviewed the gun for Combat Handguns and Guns & Weapons for Law Enforcement magazines. I was paid to do those reviews, but I was not instructed, told or otherwise encouraged to do a positive review of the pistol. This review is completely original work, though my conclusions are the same as what I reported in the other outlets.

Lastly, HK is not an advertiser (at least at the time of this writing,) nor am I in any talks with them to be one.

GunsHolstersAndGear.com is a for-profit website. I do not charge readers a dime to access the information I provide.

Some of the links on this page and site are affiliate links to companies like Amazon and Palmetto State Armory. These links take you to the products mentioned in the article. Should you decide to purchase something from one of those companies, I make a small commission.

The links do not change your purchase price. I do not get to see what any individual purchases.

Summary

Review Date
2014-09-17
Reviewed Item
HK VP9 Pistol

Author Rating
5

Variable Bitrate (VBR)

Average Bitrate (ABR)

libvpx-vp9 offers a simple variable bitrate (VBR) mode by default. This is also sometimes called «Average Bitrate» or «Target Bitrate». In this mode, it will simply try to reach the specified bit rate on average, e.g. 2 MBit/s.

It is not usually recommended to use this mode, as the output may not be compression-efficient, or lead to quality variations. Instead, use or encoding.

ffmpeg -i input.mp4 -c:v libvpx-vp9 -b:v 2M output.webm

Choose a higher bit rate if you want better quality. Note that you shouldn’t leave out the -b:v option as the default settings will produce mediocre quality output.

Two-Pass

Two-pass is the recommended encoding method for libvpx-vp9 as some quality-enhancing encoder features are only available in 2-pass mode.

There are two different 2-pass encoding methods available in libvpx-vp9: a conventional mode for targeting an average bitrate, and a two-pass constant quality mode that uses the more contemporary CRF-style approach for the final pass to achieve a certain perceptual quality level while still gaining the aforementioned compression benefits by also doing a first pass.

For two-pass, you need to run ffmpeg twice, with almost the same settings, except for:

  • In pass 1 and 2, use the -pass 1 and -pass 2 options, respectively.
  • In pass 1, output to a null file descriptor, not an actual file. (This will generate a logfile that ffmpeg needs for the second pass.)
  • In pass 1, you can leave audio out by specifying -an.

For two-pass targeting an average bitrate, the target bitrate is specified with the -b:v switch:

ffmpeg -i input.mp4 -c:v libvpx-vp9 -b:v 2M -pass 1 -an -f null /dev/null && \
ffmpeg -i input.mp4 -c:v libvpx-vp9 -b:v 2M -pass 2 -c:a libopus output.webm

Constant quality 2-pass is invoked by setting -b:v to zero and specifiying a quality level using the -crf switch:

ffmpeg -i input.mp4 -c:v libvpx-vp9 -b:v 0 -crf 30 -pass 1 -an -f null /dev/null && \
ffmpeg -i input.mp4 -c:v libvpx-vp9 -b:v 0 -crf 30 -pass 2 -c:a libopus output.webm

Note: Windows users should use NUL instead of /dev/null and ^ instead of \.

For libvpx-vp9, the traditional wisdom of speeding up the first pass by using a faster encoding speed setting does not apply; -speed values from 0 to 4 result in the same speed for the first pass and yield the exact same results in the final encode, whereas any speed setting above 4 results in the first pass utilising only a single core, slowing things down significantly. Therefore the -speed switch can be entirely omitted from the first pass, since the default value of 1 will result in fast speed.

If you want to constrain the bitrate, for example when streaming your video, use the options given in the section.

Constant Quality

In addition to the «default» two-pass modes, there’s a constant quality (CQ) mode (similar to CRF in the x264 encoder) that targets a certain perceptual quality level while only using a single pass. While using this single-pass mode will result in less efficient compression due to libvpx’s preference for 2-pass encoding, this mode may still be useful if the extra time required for the first pass and the additional CPU cycles used for better compression in 2-pass mode aren’t worth it for your use case.

To trigger this mode, you must use a combination of -crf and -b:v 0. Note that -b:v MUST be 0. Setting it to anything higher or omitting it entirely will instead invoke the .

ffmpeg -i input.mp4 -c:v libvpx-vp9 -crf 30 -b:v 0 output.webm

The CRF value can be from 0–63. Lower values mean better quality. Recommended values range from 15–35, with 31 being recommended for 1080p HD video. See ​this guide for more info.

Constrained Quality

libvpx-vp9 also has a constrained quality (CQ) mode that will ensure that a constant (perceptual) quality is reached while keeping the bitrate below a specified upper bound or within a certain bound. While the caveats of single-pass encoding mentioned above stil apply, this method can still be useful for bulk encoding videos in a generally consistent fashion.

ffmpeg -i input.mp4 -c:v libvpx-vp9 -crf 30 -b:v 2000k output.webm

The quality is determined by the -crf, and the bitrate limit by the -b:v where the bitrate MUST be non-zero. Note: for videos that are «easy» to encode this mode behaves exactly like the mode and actual bitrate may be lower than specified bitrate while for videos that are «hard» to encode the quality will be bounded by the maximum bitrate and will behave like the mode.

You can also specify a minimum and maximum bitrate instead of a quality target:

ffmpeg -i input.mp4 -c:v libvpx-vp9 -minrate 500k -b:v 2000k -maxrate 2500k output.webm

Добро пожаловать на all4shooters.com — международный веб-сайт для охотников и спортивных стрелков со множеством обзоров продуктов и тестов огнестрельного оружия, боеприпасов, оптики и аксессуаров!


БУДЬ СТРЕЛКОМ!


Оружие, боеприпасы, оптика и страсть: это четыре ключевых элемента, которые объединяют поклонников оружия по всему миру. all4shooters.com является международной платформой, которая станет вашим окном в этот мир — на четырех языках. 


Девиз all4shooters.com и all4hunters.com — прост:


Мы существуем для всех тех, кто испытывает страсть к 

охоте
 и 

стрельбе
, как в стрелковом спорте, так и в качестве хобби — или для тех, кто просто является любителем оружия, 

оптики
 и 

аксессуаров
 к ним. На all4hunters.com мы ориентированы на

охотничье оружие
,

охотничьи боеприпасы
и соответствующую

оптику
и

снаряжение
. Мы также предоставляем последние новости со всего мира, а также все, что нужно знать о новых продуктах и ​​событиях, связанных с конкретным хобби. Мы предоставляем важную информацию о каждом соответствующем рынке — на четырех разных языках. В глубоком понимании каждого отдельного рынка лежит наша сила — наряду с нашей способностью обеспечить распространение информации по всему миру через Интернет. 

all4shooters.com / all4hunters.com является увлекательным, многогранным, информативным и в то же время объяснительным веб-сайтом. 

Наша основная философия заключается в том, чтобы сообщать в сбалансированной, беспристрастной и журналистски нейтральной манере
, чтобы наши пользователи и партнеры из этой отрасли могли своевременно отслеживать текущие изменения и лучше понимать их последствия.


Наши Услуги:


Вы можете использовать наш список магазинов, чтобы найти более 8000 предприятий розничной торговли из разных стран. Наши страницы Facebook достигли активной и ответственной международной миллионной аудитории, и сейчас мы набираем новых поклонников среди молодых людей.


Что отличает нас от других?


С одной стороны, это журналистское и редакционное содержание, которое мы предоставляем, а также услуги с добавленной стоимостью, которые мы предлагаем. Независимо от того, заинтересованы ли вы в презентации новейших продуктов с 

крупных международных выставок 
— или ищете увлекательные видео ролики на YouTube, мы сделаем это. 


Связь через более эффективные каналы:


В печатных средствах массовой информации, как правило, информация предоставляется только одним способом. С другой стороны, наш веб-сайт обеспечивает  двустороннюю связь — что облегчает взаимодействие пользователей с поставщиками. Печатные СМИ, веб-сайты, социальные медиа, YouTube — все это координируется на международном уровне и из одного источника. Что бы вы ни искали, скорее всего, вы найдете это на нашем сайте или с помощью поиска Google на all4shooters.com / all4hunters.com.

Мы надеемся, что вам понравится  путешествовать по нашему международному веб-сайту, нашим страницам Facebook и нашим международным каналам YouTube.

Кодек AVC1

Например, при воспроизведении одного из моих видео используется кодек AVC1. Видео имеет формат Full HD (1920×1080), частоту кадров 30, опубликовано 3 недели назад, набрало 190 просмотров, 14 лайков и 1 дизлайк.

Этот кодек чаще всего используется для воспроизведения видео на каналах, где мало подписчиков или видео не набрало и не набирает большое количество просмотров.

Вероятно, оценивается, в том числе, динамика прироста просмотров. Если она высока, то может использоваться кодек VP09. Также старые видео, которые перестали набирать просмотры, и ушли в историю, могут воспроизводиться с использованием этого кодека.

Если изменяется небольшая часть изображения в кадре, например, камера установлена на штативе, качество изображения получается хорошее. Если в камере или редакторе применяется стабилизация видео, то изображение в кадре также изменяется меньше. Если же камеру установить, например, на шлем, и не использовать стабилизацию, то изменяется всё изображение в кадре и кодек ухудшает изображение.

Всё дело в том, что при изменении всего кадра поток данных увеличивается, а при изменении лишь части кадра поток данных увеличивается незначительно. Так можно регулировать нагрузку на сервер, снижая её до определённого уровня.

Неправильная контрастность

Уровень белого (черного) в одном и том же видео может отличаться от белого (черного) на экране компьютера.
Причина может быть в неправильной обработке уровней яркостей по телевизионному и компьютерному стандартам. Яркость указывается числом, меньше числовое значение — миньше яркость. Диапазон чисел от 0 до 255. В телевизионном стандарте белому соответствует значение яркости 235 (для всех чисел больше 235 белый будет ровно таким-же белым как при 235), чёрному — 16 (для всех чисел от 0 до 16 черный будет одинаково черным). Для компьютерного монитора белый равен 255, черный 0. Видеофайл может быть закодирован как в том, так и в другом стандарте. Видео с подавляющего большинства видеокамер, и видео экспортированное из Premiere в h264/mp4, кодируется в телевизионном стандарте. При проигрывании на компьютере яркость из 16-235 должна быть растянута плеером в значения 0-255, а чтобы видеофайлы с полным диапазоном яркостей 0-255 при этом не приобрели излишний контраст, плеер должен это определить и не делать преобразования яркости. Мнение Microsoft по этому поводу (https://msdn.microsoft.com/en-us/library/windows/desktop/dd206750(v=vs.85).aspx) простое: …Studio video RGB is the preferred RGB definition for video in Windows, while computer RGB is the preferred RGB definition for non-video applications…
Если всё же такая проблема возникнет, то можно или попробовать изменить настройки видеокарты или включить/отключить апаратное ускорение в настройках браузера. На примере браузера Chrome, при проигрывании h.264 (включен flash плейер) со включенным в настройках браузера аппаратным ускорением, уровень белого и черного будет зависить от настроек видеокарты NVidia. Уровни 16-235 заметны как общее падение контраста.

HK VP9 Comparison

A comparison of the VP9 to other similarly sized striker-fired pistols from Glock and Smith & Wesson.

  Heckler & Koch VP9 Glock 19 Gen4 Smith & Wesson M&P9
caliber 9mm 9mm 9mm
magazine capacity 15 rounds 15 rounds 17 rounds
operating system recoil operated, striker fired recoil operated, striker fired recoil operated, striker fired
barrel length 4.09″ 4.01″ 4.25″
overall length 7.34″ 7.28″ 7.63″
width 1.32″ 1.18″ 1.2″
weight 23.28 oz (unloaded, no magazine) 23.65 oz (unloaded, unknown if with magazine) 24.0 oz (unloaded, no magazine)
height 5.41″ 4.99″ 5.5″
sights three dot luminous (tritium optional as accessories) three dot (tritium optional) three dot (tritium optional)
sight radius 6.38″ 6.02″ 6.4″
warranty limited lifetime limited one year limited lifetime
MSRP $719.00 $649.00 $569.00

There is no perfect apples-to-apples comparison since every gun company has a different approach to the development of firearms. One company’s “full size” is another company’s “compact.” However, the VP9 compares favorably in size to the Glock 19 and Smith & Wesson M&P 9 pistols.

Although the Glock 19 is a “compact” pistol, it is still large enough to be carried as a primary sidearm in law enforcement or military service. I carried my Gen 2 Glock 19 as a reserve deputy with the Fulton County Sheriff’s Office in Atlanta, GA. I never felt under-armed with the pistol then and would happily carry it again as a duty weapon.

The one criticism I have seen on the internet regarding this comparison is that the HK’s height is closer to that of the Glock 17, and that Glock managed to squeeze two additional rounds into the magazine with that additional distance. This is true, but it seems to me that 15 vs. 17 rounds is not as significant an issue as other things might be. However, if the round count is your primary concern in buying a pistol, the Springfield Armory XD(M) pistol might be the best choice (19 rounds per magazine.)

История

Разработка VP9 началась в третьем квартале 2011 года. Одной из задач разработки VP9 было уменьшение битрейта на 50 % по сравнению с VP8 при сохранении качества видео. Другая задача — добиться лучшей эффективности сжатия, чем у стандарта H.265 (High Efficiency Video Coding).

13 декабря 2012 года декодер VP9 был добавлен в браузер Chromium.

21 февраля 2013 года была выпущена стабильная версия браузера Google Chrome (номер версии 25) с поддержкой декодера VP9.

8 мая 2013 года корпорация Google объявила, что разработка стандарта VP9 будет завершена 17 июня 2013 года.
Модуль декодирования VP9 включен по умолчанию в браузере Google Chrome начиная с версии 29.

11 июня 2013 года была закончена разработка профиля 0 («VP9 profile 0»). На следующий день, 12 июня, поддержка VP9 была включена в браузере Chromium.

В январе 2014 года Google объявила об официальной поддержке VP9 в YouTube и огласила список партнёров, включающий ARM, Intel, NVIDIA, Panasonic, Sony, Qualcomm и несколько других компаний, которые реализуют аппаратную поддержку декодирования VP9 в своих последующих продуктах.

C сентября 2014 года на YouTube VP9 используется для некоторых видео, в случае поддержки формата браузером.
Версия кодека VP9.2 поддерживает HDR.

Возможно ли загружать видео в формате VP9

Да это возможно. Сразу после того как такой файл загрузится на youtube, тот всё равно начнет перекодировать видео в форматы внутреннего хранения. Первым из которых будет WebM 360 (контейнер в котором хранится собственно vp9 и vp8), и далее mp4, 3GP со всеми соответствующими размерами кадра. Это связано с тем, что для разных устройств, разных размеров окна, разных плейеров (flash или html5), youtube проигрывает свой файл. Кроме того, после загрузки видео индексируется, для того чтобы работала функция перемотки.

Резюме: загружать VP9 можно, но практического выигрыша это не даст, кодирование в VP9 работает медленне чем в h.264 при сопоставимых настройках.

Controlling Speed and Quality

libvpx-vp9 has two main control knobs for speed and quality:

Deadline / Quality

-deadline can be set to realtime, good, or best. For legacy reasons, the option is also accessible with -quality in ffmpeg.

  • good is the default and recommended for most applications.
  • best is recommended if you have lots of time and want the best compression efficiency.
  • realtime is recommended for live / fast encoding.

CPU Utilization / Speed

-cpu-used sets how efficient the compression will be. For legacy reasons, the option is also accessible with -speed in ffmpeg.

When the deadline/quality parameter is good or best, values for -cpu-used can be set between 0 and 5. The default is 0. Using 1 or 2 will increase encoding speed at the expense of having some impact on quality and rate control accuracy. 4 or 5 will turn off rate distortion optimization, having even more of an impact on quality.

When the deadline/quality is set to realtime, the encoder will try to hit a particular CPU utilization target, and encoding quality will depend on CPU speed and the complexity of the clip that you are encoding. See ​the vpx documentation for more info. In this case, the valid values for -cpu-used are between 0 and 15, where the CPU utilization target (in per cent) is calculated as (100*(16-cpu-used)/16)%.

Row based multithreading

With version 1.7.0, libvpx added support for row based multithreading which greatly enhances the number of threads the encoder can utilise. This improves encoding speed significantly on systems that are otherwise underutilised when encoding VP9. Since the amount of additional threads depends on the number of tiles, which itself depends on the video resolution, encoding higher resolution videos will see a larger performance improvement.

FFmpeg added support for row based multithreading in version 3.4, released on January 25th, 2018. As of libvpx version 1.7.0 this multithreading enhancement is not enabled by default and needs be manually activated with the -row-mt 1 switch.

Part 3: VP9 Decoder/Converter — Convert WebM VP9 Video to MP4, AVI, WMV, MOV and More

We need VP9 encoder, and sometimes we also need VP9 decoder that can decode/convert VP9 video to MP4, AVI, WMV, MOV or other format for special use. With regards to VP9 converter, WinX HD Video Converter Deluxe is a good option. With this tool, you can decode/convert VP9 video in 720p/1080p/4K 2160p on Windows 10, 8.1, 7, XP and lower. And its Mac version allows VP9 decoding on Mac OS X 10.6 or later including macOS Catalina. In three simple steps only (load VP9 video -> specify output profile -> begin converting), you can:

Decode/convert VP9 to video audio formats, like MKV, HEVC, MP4, AVI, WMV, 3GP, FLV, MOV, WebM VP8, VOB, MP3, AAC, etc;Decode/convert VP9 to device, such as, iPhone 11/XR/Xs, iPad Pro/mini 4/Air 2, Apple TV/4, Samsung Galaxy S10, Surface, Amazon Kindle Fire HD, Chromecast, PS4, PSP, etc;Decode/convert VP9 to web sites, for example, YouTube, Viemo and Facebook;Decode/convert VP9 to video editing software, like iMovie, Final Cut Pro and iDVD.

Transcode VP9

Optionally, it also enables you to edit VP9 video by cropping, expanding, trimming and adding extra subtitles, and modify video audio parameters like bit rate, frame rate, sample rate, etc.

Tip: WinX HD Video Converter Deluxe will soon add VP9 output profile, offering users an easy-to-use VP9 encoder.

Apart from converting VP9 videos, WinX HD Video Converter Deluxe/for Mac can free download VP9 codec videos from YouTube or other video-sharing sites with the built-in online video downloader.

Free Download for Win 7 or later

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

Adblock
detector