Firefox doesn't pitch correct sped-up or slowed-down HTML5 video (e.g. on Youtube)
Categories
(Web Compatibility :: Site Reports, defect, P2)
Tracking
(Not tracked)
People
(Reporter: nimish, Assigned: chunmin)
References
Details
(Whiteboard: [platform-rel-youtube][media-audio])
Updated•8 years ago
|
Assignee | ||
Updated•8 years ago
|
Comment 6•7 years ago
|
||
Updated•7 years ago
|
Comment 9•7 years ago
|
||
Comment 10•6 years ago
|
||
Comment 11•6 years ago
|
||
Comment 12•6 years ago
|
||
Comment 13•6 years ago
|
||
Comment 14•6 years ago
|
||
Comment 15•6 years ago
|
||
Any workaroud? I want to switch back to Chrome because of this.
Comment 16•6 years ago
|
||
I really watch to switch to Firefox but this issue holds me back unfortunately. Please fix this bug :)
Assignee | ||
Comment 17•6 years ago
|
||
It seems like the soundtouch library isn't updated for a while. Maybe we could try updating it first.
Comment 18•5 years ago
|
||
Fwiw, I see this complaint in https://news.ycombinator.com/item?id=20850135 too:
@ilrwbwrkhv said:
The biggest problem for me is, I like to learn by watching videos at 3x speeds. Chrome's audio pitch correction works great whereas Firefox's pitch correction makes the audio unintelligible.
Assignee | ||
Comment 19•5 years ago
|
||
I've tried updating the libsoundtouch to see if the audio quality improves when changing the speed. Here is the samples between the current Firefox and the version with newer libsoundtouch.
The files starting with new means they are dumped from Firefox with updated libsoundtouch. The files starting with old means they are dumped from current Firefox Nightly. The files are based on the following two youtube video:
To be honest, I don't hear much difference in the talk show video.
nimish,
Do you have any specific video that has bad quality you mentioned? I could try a newer libsoundtouch with it to see if the quality could be improved.
Comment 20•5 years ago
|
||
When downloading the file, I cannot seem to extract the samples.zip archive. I have tried both the default windows extract, and 7-zip. Can you confirm the download link works?
Assignee | ||
Comment 21•5 years ago
•
|
||
(In reply to C.M.Chang[:chunmin] from comment #19)
(In reply to Jeremy Rumph from comment #20)
When downloading the file, I cannot seem to extract the samples.zip archive. I have tried both the default windows extract, and 7-zip. Can you confirm the download link works?
try this one:
https://d3kxowhw4s8amj.cloudfront.net/file/download/odrvlpn3u5cdjasqvg2y/PHID-FILE-pkgcfujd7zkvtazdhyti/samples.zip
The record audios are somehow broken. They could be played but they are not seekable. I couldn't do seek the files in iTunes but I can do seek in VLC.
Comment 22•5 years ago
|
||
(In reply to C.M.Chang[:chunmin] from comment #19)
Do you have any specific video that has bad quality you mentioned? I could try a newer libsoundtouch with it to see if the quality could be improved.
Try this on 2x speed:
https://www.youtube.com/watch?v=_bN4spt3744
Here is a recording from Firefox 72.0a1 (2019-11-08) and Chrome, you can clearly hear the difference right from the beginning.
https://mega.nz/#!2qAjiagY!qSToYnCYZjrgSoe77e24N1imtrInn9fGdB7jf3hFD0o
Comment 23•5 years ago
|
||
How can i help to get this bug fixed ?
Easiest way to reproduce this bug is just to go to any youtube video inspect than just type this in the console in both chrome and firefox
a=document.querySelector('video');a.playbackRate=4.1
The audio will stop in Firefox but not in chrome however if you just set the rate to 3 i think the distortion is noticeable enough
I really would like to help get this bug fixed since i'm also one of the poor souls stuck on chromium because of it what part of the code need to be fixed ?
Comment 24•5 years ago
|
||
can firefox use rubber band instead of libsoundtouch for pitch scaling ?
also please compare firefox and chrome directly as it appears that chromium offers the best high speed audio quality at the moment better than both vlc and mpv
after configuring mpv to use rubber band instead of the default(appears it did use soundtouch by default too) i did come close to chromium quality but still not exactly the same
however it is WAY better than the default for speed higher than x2 so i think firefox can benefit greatly as well by switching to rubber band
Comment 25•5 years ago
|
||
libsoundtouch is capable of producing similar results to Chrome with the right settings, please try out the comparison recordings in Bug 1427267 comment 28.
Comment 26•5 years ago
|
||
firefox-3x-1ms sound the best for me it also sound much better than what i'm getting with my version of firefox (v71.0 on ubuntu)
I recorded this on my system
https://gofile.io/?c=69q8nv
Comment 27•5 years ago
|
||
On the latest daily release this bug is no longer an issue.
I just updated to the latest daily build on ubuntu (firefox v73.0a1hg20191216r507108) and now the pitch is pretty much the same as in chromium I finally can ditch brave and go back to firefox big thanks to all the devs.
I just wanna add that the audio still cuts off after speed goes above 4.0 (in chromium audio continue working) but i doubt anyone watch videos at 4.x speed.
This bug has finally been fixed funny that all it needed was 3 lines of code again can't thank the devs enough.
Reporter | ||
Comment 28•5 years ago
|
||
(In reply to C.M.Chang[:chunmin] from comment #19)
I've tried updating the libsoundtouch to see if the audio quality improves when changing the speed. Here is the samples between the current Firefox and the version with newer libsoundtouch.
The files starting with new means they are dumped from Firefox with updated libsoundtouch. The files starting with old means they are dumped from current Firefox Nightly. The files are based on the following two youtube video:
To be honest, I don't hear much difference in the talk show video.
nimish,
Do you have any specific video that has bad quality you mentioned? I could try a newer libsoundtouch with it to see if the quality could be improved.
Hi, apologies for the delay, any lecture on youtube would work. The idea is that pitch-corrected voices at 2x speed should not sound higher-pitched, and should sound a little more natural.
Assignee | ||
Updated•4 years ago
|
Comment 29•4 years ago
|
||
(In reply to ayko2730 from comment #27)
On the latest daily release this bug is no longer an issue.
I just updated to the latest daily build on ubuntu (firefox v73.0a1hg20191216r507108) and now the pitch is pretty much the same as in chromium I finally can ditch brave and go back to firefox big thanks to all the devs.
I just wanna add that the audio still cuts off after speed goes above 4.0 (in chromium audio continue working) but i doubt anyone watch videos at 4.x speed.
This bug has finally been fixed funny that all it needed was 3 lines of code again can't thank the devs enough.
Has the 4x sound cut off issue been fixed? Is there a bug report for that specifically?
Comment 30•4 years ago
|
||
(In reply to ayko2730 from comment #27)
On the latest daily release this bug is no longer an issue.
I just updated to the latest daily build on ubuntu (firefox v73.0a1hg20191216r507108) and now the pitch is pretty much the same as in chromium I finally can ditch brave and go back to firefox big thanks to all the devs.
I just wanna add that the audio still cuts off after speed goes above 4.0 (in chromium audio continue working) but i doubt anyone watch videos at 4.x speed.
This bug has finally been fixed funny that all it needed was 3 lines of code again can't thank the devs enough.
Hello,
I'm using Firefox 80.0.1 (64 bit windows 10) and the problem still occurs. It is very annoying, especially when you listen to the movies with musical background, e.g. of this type: https://youtu.be/zVYqNyMzp_g?t=31 (please set playback rate to something above 1x). The other examples given in this thread do not capture the problem so well. I am asking for a solution.
Comment 31•4 years ago
|
||
Hi! I am currently using Firefox 81.0; 64 Bit on Windows 10. I have audio distortion issue too. To recreate the issue you'll have to watch this video https://www.youtube.com/watch?v=jkytV1w5IeI and set playback speed to 1.5x or 2.0. You'll heare strong sound cracking espesially in the begining.
Comment 32•4 years ago
|
||
I'm having this issue with all YouTube videos on Firefox for Android.
Google Pixel 3a using Android 11.0.
Firefox Android 81.1.2 (Build #2015767043)
AC: 57.0.7, 68343a885
GV: 81.0.1-20200930150533
AS: 61.0.13
Comment 33•4 years ago
|
||
Not having this issue on Youtube but just found it on Udemy.
Version 89.0.1
User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0
OS Windows_NT 10.0 19042
Comment 34•4 years ago
|
||
Having this problem on Udemy as well.
Version 89.0.2 (64 bit) on Windows 10.
Comment 35•4 years ago
|
||
(In reply to sportsmannnnn from comment #31)
Hi! I am currently using Firefox 81.0; 64 Bit on Windows 10. I have audio distortion issue too. To recreate the issue you'll have to watch this video https://www.youtube.com/watch?v=jkytV1w5IeI and set playback speed to 1.5x or 2.0. You'll heare strong sound cracking espesially in the begining.
I can confirm. The sound is distorted in Firefox, but not in Edge. You can hear it from the very first second.
I also have this problem on Udemy, and it's driving me nuts. Constant clicking sounds on 2.0x.
I've been using Firefox for 17 years and want to continue using it. But this problem forces me to use other browsers.
Version 89.0.2
User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0
OS Windows_NT 10.0 18363
Comment 36•4 years ago
|
||
I've just tested the issue on the nightly build, on a different computer, with all addons switched off, and tried switching off hardware acceleration as well. None of that made any difference.
Please suggest any other ideas I can try to help with this problem.
Version 91.0a1
Build ID 20210630212829
User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0
OS Windows_NT 10.0 19041
Comment 37•3 years ago
|
||
I arrived here looking for a solution and can see it's been a problem for years.
Udemy is an easy way to reproduce it, I get crackling audio after 5-10 seconds of watching any video at 1.5x speed. It's super unpleasant. I think it's worse if Firefox doesn't have foreground.
Chrome and Edge handle this just fine with no crackling.
94.0.2 (64-bit)
Windows 10 19044
i7-8850H
Realtek audio
Comment 38•3 years ago
|
||
I also arrived here looking for a solution after trying to watch an Udemy couse at 1.75x and there are a lot of "cracking sounds" as if it is struggling to keep up with the video.
At first, I thought it was a video problem, but after testing the same video on Edge I found that it played smoothly.
My computer specs are:
Firefox 95.0 (64-bit)
Realtek Audio
Processor: AMD Ryzen 9 4900HS with Radeon Graphics 3.00 GHz
OS: Windows 11 Pro Insider Preview
Version: Dev
OS build: 22518.1012
Experience Windows Feature Experience Pack 1000.22518.1012.0
Comment 39•3 years ago
|
||
Hello,
Waiting for solution of this problem is getting annoying. Maybe someone has a workaround for this problem, because we probably can't count on fixing it? Unless someone raises it to the urgent ones. I'm starting to look for an alternative browser.
Newest firefox, win 10 x64 pro.
Comment 40•3 years ago
•
|
||
If that happens, that means the website doesn't set mozPreservesPitch
, or it only set preservesPitch
.
There is an attribute on HTMLMediaElement
used to control the pitch when changing the playback rate, which historically has different prefix, mozPreservesPitch
and webkitPreservesPitch
. That attirbute was recently unified by preservesPitch
and Firefox hasn't changed that yet. Unprefix mozPreservesPitch
will be done in bug 1652950.
The easiest way to fix it by youself is to set video.mozPreservesPitch = true
on the video you're watching if the website doesn't do that.
Considering this is a website issue, and now Youtube did set mozPreservesPitch
correctly. I will close this bug. For unprefix issue, please follow bug 1652950.
Comment 41•3 years ago
|
||
(In reply to boris.naydis from comment #35)
I can confirm. The sound is distorted in Firefox, but not in Edge. You can hear it from the very first second.
I also have this problem on Udemy, and it's driving me nuts. Constant clicking sounds on 2.0x.
I've been using Firefox for 17 years and want to continue using it. But this problem forces me to use other browsers.
In addition, for bad sound quality issue on Udemy (or other sites using DRM) when having high playback rate, that might be bug 1749804, which has been fixed.
(In reply to myaseen98 from comment #29)
Has the 4x sound cut off issue been fixed? Is there a bug report for that specifically?
That has been fixed by bug 1630569.
Comment 42•3 years ago
|
||
(In reply to Alastor Wu [:alwu] from comment #40)
If that happens, that means the website doesn't set
mozPreservesPitch
, or it only setpreservesPitch
.There is an attribute on
HTMLMediaElement
used to control the pitch when changing the playback rate, which historically has different prefix,mozPreservesPitch
andwebkitPreservesPitch
. That attirbute was recently unified bypreservesPitch
and Firefox hasn't changed that yet. UnprefixmozPreservesPitch
will be done in bug 1652950.The easiest way to fix it by youself is to set
video.mozPreservesPitch = true
on the video you're watching if the website doesn't do that.Considering this is a website issue, and now Youtube did set
mozPreservesPitch
correctly. I will close this bug. For unprefix issue, please follow bug 1652950.
I've checked and video.mozPreservesPitch = true
is already set for Udemy and it still produces the 'cracking' sound.
It makes me believe that this is not a website issue.
Comment 43•3 years ago
|
||
(In reply to Alastor Wu [:alwu] from comment #40)
If that happens, that means the website doesn't set
mozPreservesPitch
, or it only setpreservesPitch
.There is an attribute on
HTMLMediaElement
used to control the pitch when changing the playback rate, which historically has different prefix,mozPreservesPitch
andwebkitPreservesPitch
. That attirbute was recently unified bypreservesPitch
and Firefox hasn't changed that yet. UnprefixmozPreservesPitch
will be done in bug 1652950.The easiest way to fix it by youself is to set
video.mozPreservesPitch = true
on the video you're watching if the website doesn't do that.Considering this is a website issue, and now Youtube did set
mozPreservesPitch
correctly. I will close this bug. For unprefix issue, please follow bug 1652950.
I've checked and video.mozPreservesPitch = true
is already set for Udemy and it still produces the 'cracking' sound.
It makes me believe that this is not a website issue.
Comment 44•3 years ago
|
||
(In reply to rickftime from comment #43)
I've checked and
video.mozPreservesPitch = true
is already set for Udemy and it still produces the 'cracking' sound.
It makes me believe that this is not a website issue.
See comment 41, it has been fixed by bug 1749804.
Updated•9 months ago
|
Updated•9 months ago
|
Description
•