LINUX.ORG.RU

Тормозит видео 720p (60fps) в Firefox

 ,


0

1

Добрый день.

Ноутбук с DualCore Intel Celeron N3050, 2166 MHz (Intel Braswell, встроенная графика), 2 ГБ RAM. Сейчас установлен MX Linux 18.3, но проблема и в других дистрибутивах (Ubuntu, Debian).

При попытке посмотреть youtube-видео в качестве 720p (60fps) в Firefox (последней версии) происходит потеря кадров. То есть, звук идет, а изображение надолго замирает. При качестве ниже, например 480p, проблемы нет. На Windows 7 в тех же самых условиях проблемы нет (при воспроизведении видео кодек один и тот же). Потребление ресурсов в момент просмотра видео и в Linux, и в Windows примерно одинаковое. В Linux загрузка процессора около 80% и есть свободная память.

Нашел, как проблему можно не решить, а обойти, если поставить расширение h264ify, которое отключает кодек VP9.

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

Спасибо за помощь.

UPD. В теме предполагали, что Firefox не нагружает процессор и предложили поставить Opera (может там будет больше нагрузка и видео будет идти плавнее).

Проверил. Действительно, Opera загружает процессор больше 90% и потеря кадров намного меньше (и загрузка, и потеря кадров еще меньше, если включить полноэкранный режим). Если в Firefox было невозможно смотреть видео, то в Opera - вполне терпимо.

Думаю, можно заключить, что Opera использует возможности моего оборудования эффективнее, чем Firefox.



Последнее исправление: newbl (всего исправлений: 3)
Ответ на: комментарий от abbcto

Как раз в mpv самая лучшая поддержка всяких аппаратных декодеров, шейдеров, выводов в вулкан и libdrm, и прочего.

anonymous
()
Ответ на: комментарий от abbcto

Стримеры часто юзают софтварный энкодинг, потому что аппаратный энкодер не дает выкрутить качество (хотя говорят у нвидии на последних поколениях это неактуально и качество и так ок, а у амд...а что у амд?).

А вот про про «софтварный декодинг лучше» впервые слышу.

Midael ★★★★★
()
Ответ на: комментарий от Midael

Некоторые так считают. Недавно, читал в мпв вики

Quality reduction with hardware decoding

In theory, hardware decoding does not reduce video quality (at least for the codecs h264 and HEVC). However, due to restrictions in video output APIs, as well as bugs in the actual hardware decoders, there can be some loss, or even blatantly incorrect results.

In some cases, RGB conversion is forced, which means the RGB conversion is performed by the hardware decoding API, instead of the shaders used by --vo=gpu. This means certain colorspaces may not display correctly, and certain filtering (such as debanding) cannot be applied in an ideal way. This will also usually force the use of low quality chroma scalers instead of the one specified by --cscale. In other cases, hardware decoding can also reduce the bit depth of the decoded image, which can introduce banding or precision loss for 10-bit files.

vdpau is usually safe. If deinterlacing enabled (or the vdpaupp video filter is active in general), it forces RGB conversion. The latter currently does not treat certain colorspaces like BT.2020 correctly (which is mostly a mpv-specific restriction). The vdpauprb video filter retrieves image data without RGB conversion and is safe (but precludes use of vdpau postprocessing).

vaapi is safe if the vaapi-egl backend is indicated in the logs. If vaapi-glx is indicated, and the video colorspace is either BT.601 or BT.709, a forced, low-quality but correct RGB conversion is performed. Otherwise, the result will be totally incorrect.

d3d11va is safe when used with the d3d11 backend. If used with angle is it usually safe, except that 10 bit input (HEVC main 10 profiles) will be rounded down to 8 bits, which will result in reduced quality. Also note that with very old ANGLE builds (without EGL_KHR_stream path,) all input will be converted to RGB.

dxva2 is not safe. It appears to always use BT.601 for forced RGB conversion, but actual behavior depends on the GPU drivers. Some drivers appear to convert to limited range RGB, which gives a faded appearance. In addition to driver-specific behavior, global system settings might affect this additionally. This can give incorrect results even with completely ordinary video sources.

rpi always uses the hardware overlay renderer, even with --vo=gpu.

cuda should be safe, but it has been reported to corrupt the timestamps causing glitched, flashing frames on some files. It can also sometimes cause massive framedrops for unknown reasons. Caution is advised.

crystalhd is not safe. It always converts to 4:2:2 YUV, which may be lossy, depending on how chroma sub-sampling is done during conversion. It also discards the top left pixel of each frame for some reason.

All other methods, in particular the copy-back methods (like dxva2-copy etc.) should hopefully be safe, although they can still cause random decoding issues. At the very least, they shouldn't affect the colors of the image.

In particular, auto-copy will only select «safe» modes (although potentially slower than other methods), but there's still no guarantee the chosen hardware decoder will actually work correctly.

In general, it's very strongly advised to avoid hardware decoding unless absolutely necessary, i.e. if your CPU is insufficient to decode the file in questions. If you run into any weird decoding issues, frame glitches or discoloration, and you have --hwdec turned on, the first thing you should try is disabling it.

abbcto
()
Ответ на: комментарий от abbcto

АМД VP9

На вендах его выпилилвали 🙂 АМД же. Как сейчас - не знаю.

fornlr ★★★★★
()
Ответ на: комментарий от anonymous

In general, it's very strongly advised to avoid hardware decoding unless absolutely necessary, i.e. if your CPU is insufficient to decode the file in questions. If you run into any weird decoding issues, frame glitches or discoloration, and you have --hwdec turned on, the first thing you should try is disabling it.

abbcto
()
Ответ на: комментарий от abbcto

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

anonymous
()
9 февраля 2021 г.

Тоже самое. Только на Windows 10. Сайты летают. Даже загружаются быстрее, чем в хромовых браузерах. А вот с видео такая хрень. Даже если мышкой поводить идет небольшое прерывание видео. А вот в хромовых с видео все нормально. Когда-то давно говорили, что гугл перешел на vp, чтобы была монополия на видео онлайн. Ну и на движок хромиум.

Smart_ass
()
Ответ на: комментарий от Smart_ass

Smart_ass

Дата регистрации: 09.02.21

anonymous
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.