{"id":757,"date":"2016-10-07T15:40:16","date_gmt":"2016-10-07T14:40:16","guid":{"rendered":"http:\/\/www.brucewiggins.co.uk\/?p=757"},"modified":"2017-01-06T11:29:09","modified_gmt":"2017-01-06T11:29:09","slug":"youtube-spatial-audio-inverse-filter","status":"publish","type":"post","link":"https:\/\/www.brucewiggins.co.uk\/?p=757","title":{"rendered":"YouTube Spatial Audio Inverse Filter"},"content":{"rendered":"<p>It&#8217;s been a little while since my last Ambisonics on YouTube post, so I thought I&#8217;d share a filter I&#8217;ve made to help make YouTube Ambisonics content sound better! \u00a0As you may have noticed, the audio that comes off YouTube once your spatial, Ambisonic, audio is uploaded is quite coloured compared to the original. \u00a0This is due to the Head Related Transfer Functions used in the modelling of the system. \u00a0If the HRTFs exactly model your own hearing system, then we wouldn&#8217;t notice it, but as they won&#8217;t, you will!<\/p>\n<p>In order to equalise the system, the same EQ curve just needs applying to all the Ambisonic channels equally before uploading to YouTube. \u00a0So, first, we need to find the average response of the system. \u00a0There could be a few methods for this, but the simple approach is to pan an impulse around the listener, storing the frequency response each time. \u00a0Sum these together, and average them in some way (I used an RMS type approach). \u00a0This is then an &#8216;average&#8217; response of the system. \u00a0I then invert this system (adding delay as it&#8217;s non-minimum phase) and then decompose the filter into it&#8217;s minimum phase only response for the EQ (as that&#8217;s all we&#8217;re really interested in).<\/p>\n<p><!--more-->To use this in your Reaper project, load the filter into ReaVerb (as an impulse file) and apply it to all four channels of your ambiX B-format before adding it to your video and uploading to YouTube. \u00a0As long as you do the same thing to each of the four B-format channels, it won&#8217;t affect the spatial aspects of the recording, just the frequency response. \u00a0A plot below shows the frequency response of YouTube and the generated inverse filter. \u00a0Note that I&#8217;ve used my measured YouTube filters for this, so there was no data above 16kHz. \u00a0To make this not make the inversion go a little crazy, I&#8217;ve assumed it&#8217;s flat after this point (YouTube filters out after this point anyway!)<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2016\/10\/YTInvFilter.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"762\" data-permalink=\"https:\/\/www.brucewiggins.co.uk\/?attachment_id=762\" data-orig-file=\"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2016\/10\/YTInvFilter.png?fit=560%2C420&amp;ssl=1\" data-orig-size=\"560,420\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"YouTube Frequency Response vs Inverse Filter\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2016\/10\/YTInvFilter.png?fit=525%2C394&amp;ssl=1\" class=\"alignnone wp-image-762\" src=\"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2016\/10\/YTInvFilter.png?resize=500%2C375\" alt=\"YouTube Frequency Response vs Inverse Filter\" width=\"500\" height=\"375\" srcset=\"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2016\/10\/YTInvFilter.png?w=560&amp;ssl=1 560w, https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2016\/10\/YTInvFilter.png?resize=300%2C225&amp;ssl=1 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p>You can download the filter, if you&#8217;d like to try it, below.<\/p>\n<p><a href=\"http:\/\/www.brucewiggins.co.uk\/wp-content\/uploads\/2016\/10\/YTInvFilter3Min.zip\">Inverse Filter for YouTube 1st Order Spatial Audio<\/a><\/p>\n<p>EDIT : Below is an inverse filter I&#8217;ve calculated from the Google Thrive Impulse Responses, rather than my measured IRs. \u00a0It&#8217;s very similar, frequency response wise, but should be a slightly better match with the algorithm YouTube is using. \u00a0The previous also had my DAC and ADC in the chain!<\/p>\n<p><a href=\"http:\/\/www.brucewiggins.co.uk\/wp-content\/uploads\/2016\/10\/YTInvFilter3Min2.zip\">Inverse Filter for YouTube Spatial Audio Created Directly from Google Thrive IRs<\/a><\/p>\n<p>The differences between the two inverse filters can be seen below (again, I&#8217;m leveling off the response to account for YouTube rolling off after around 16kHz).<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2016\/10\/InvFilterGoogle-1.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"770\" data-permalink=\"https:\/\/www.brucewiggins.co.uk\/?attachment_id=770\" data-orig-file=\"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2016\/10\/InvFilterGoogle-1.png?fit=614%2C460&amp;ssl=1\" data-orig-size=\"614,460\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Measured IRs vs Thrive IRs Inverse Filters\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2016\/10\/InvFilterGoogle-1.png?fit=525%2C393&amp;ssl=1\" class=\"alignnone wp-image-770\" src=\"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2016\/10\/InvFilterGoogle-1.png?resize=500%2C375\" alt=\"Measured IRs vs Thrive IRs Inverse Filters\" width=\"500\" height=\"375\" srcset=\"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2016\/10\/InvFilterGoogle-1.png?w=614&amp;ssl=1 614w, https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2016\/10\/InvFilterGoogle-1.png?resize=300%2C225&amp;ssl=1 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p>For completeness, below are the inverse filters calculated right up to around 21.8kHz (where the anti-aliasing filters kick in in the Google Thrive data). \u00a0I can&#8217;t tell any difference, but I also can&#8217;t hear much above 16kHz, so I wouldn&#8217;t, would I!)<\/p>\n<p><a href=\"http:\/\/www.brucewiggins.co.uk\/wp-content\/uploads\/2016\/10\/YTInvFilter4Min.zip\">Inverse Filter for YouTube&#8217;s Spatial Audio using Google Thrive IRs up to 21.8kHz<\/a><\/p>\n<p>Below is a graph of how the higher frequencies are boosted compared to the others:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2016\/10\/InvFilterGoogleHF.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"774\" data-permalink=\"https:\/\/www.brucewiggins.co.uk\/?attachment_id=774\" data-orig-file=\"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2016\/10\/InvFilterGoogleHF.png?fit=614%2C460&amp;ssl=1\" data-orig-size=\"614,460\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Inverse Filter up to 21.8kHz\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2016\/10\/InvFilterGoogleHF.png?fit=525%2C393&amp;ssl=1\" class=\"alignnone wp-image-774\" src=\"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2016\/10\/InvFilterGoogleHF.png?resize=501%2C375\" alt=\"Inverse Filter up to 21.8kHz\" width=\"501\" height=\"375\" srcset=\"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2016\/10\/InvFilterGoogleHF.png?w=614&amp;ssl=1 614w, https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2016\/10\/InvFilterGoogleHF.png?resize=300%2C225&amp;ssl=1 300w\" sizes=\"auto, (max-width: 501px) 100vw, 501px\" \/><\/a><\/p>\n<p>A demo of it working is below:<\/p>\n<p><span class=\"embed-youtube\" style=\"text-align:center; display: block;\"><iframe loading=\"lazy\" class=\"youtube-player\" width=\"500\" height=\"282\" src=\"https:\/\/www.youtube.com\/embed\/6YK0UIrcqms?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en-GB&#038;autohide=2&#038;wmode=transparent\" allowfullscreen=\"true\" style=\"border:0;\" sandbox=\"allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox\"><\/iframe><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s been a little while since my last Ambisonics on YouTube post, so I thought I&#8217;d share a filter I&#8217;ve made to help make YouTube Ambisonics content sound better! \u00a0As you may have noticed, the audio that comes off YouTube once your spatial, Ambisonic, audio is uploaded is quite coloured compared to the original. \u00a0This &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.brucewiggins.co.uk\/?p=757\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;YouTube Spatial Audio Inverse Filter&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-757","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2iYFT-cd","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":666,"url":"https:\/\/www.brucewiggins.co.uk\/?p=666","url_meta":{"origin":757,"position":0},"title":"YouTube, Ambisonics and VR","author":"Bruce Wiggins","date":"April 25th,  2016","format":false,"excerpt":"Introduction So, last week Google enabled head (phone!) tracked positional audio on 360 degree videos. \u00a0Ambisonics is now one of the defacto standards for VR audio. \u00a0This is a big moment! \u00a0I've been playing a little with some of the command line tools needed to get this to work, and\u2026","rel":"","context":"In &quot;Ambisonics&quot;","block_context":{"text":"Ambisonics","link":"https:\/\/www.brucewiggins.co.uk\/?cat=3"},"img":{"alt_text":"AmbiSignalRemap","src":"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2016\/04\/AmbiSignalRemap.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":700,"url":"https:\/\/www.brucewiggins.co.uk\/?p=700","url_meta":{"origin":757,"position":1},"title":"YouTube 360 VR Ambisonics Teardown!","author":"Bruce Wiggins","date":"April 28th,  2016","format":false,"excerpt":"UPDATE : 4th May 2016 - I've added a video using the measured filters. This will be useful for auditioning the mixes before uploading them to YouTube. So, I've\u00a0been experimenting with YouTube's Ambisonic to Binaural VR videos. \u00a0They work, sound spacious and head tracking also functions (although there seems to\u2026","rel":"","context":"In &quot;Ambisonics&quot;","block_context":{"text":"Ambisonics","link":"https:\/\/www.brucewiggins.co.uk\/?cat=3"},"img":{"alt_text":"You Tube HRIRs 0 degrees","src":"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2016\/04\/YouTubeHRIRs00-300x222.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":730,"url":"https:\/\/www.brucewiggins.co.uk\/?p=730","url_meta":{"origin":757,"position":2},"title":"YouTube Binaural Reaper Project","author":"Bruce Wiggins","date":"May 12th,  2016","format":false,"excerpt":"So, here's an example (but empty) Reaper project that contains the YouTube binaural filters I measured. \u00a0You'll need to use your preferred Ambisonics plug-ins of choice, and I'm assuming FuMa channel ordering etc.. they'll be remapped by a plug-in. There is a bundle of JS effects in the folder too,\u2026","rel":"","context":"In &quot;Ambisonics&quot;","block_context":{"text":"Ambisonics","link":"https:\/\/www.brucewiggins.co.uk\/?cat=3"},"img":{"alt_text":"YouTubeBinProject","src":"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2016\/05\/YouTubeBinProject-300x166.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1008,"url":"https:\/\/www.brucewiggins.co.uk\/?p=1008","url_meta":{"origin":757,"position":3},"title":"Sounds in Space 2017 Live Streams","author":"Bruce Wiggins","date":"June 26th,  2017","format":false,"excerpt":"Tomorrow we're holding our annual\u00a0Sounds in Space Research Symposium. \u00a0This year we've decided to stream the entire event on both YouTube and Facebook using binaural audio (well, Ambisonics to binaural as it happens). \u00a0The event is 9.30am (GMT+1) until around 5.00pm. \u00a0If you're interested in watching the events, here's the\u2026","rel":"","context":"In &quot;Ambisonics&quot;","block_context":{"text":"Ambisonics","link":"https:\/\/www.brucewiggins.co.uk\/?cat=3"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":859,"url":"https:\/\/www.brucewiggins.co.uk\/?p=859","url_meta":{"origin":757,"position":4},"title":"Details on Facebook 360 Ambisonics Mapping from Angelo Farina","author":"Bruce Wiggins","date":"February 22nd,  2017","format":false,"excerpt":"EDIT: You can download a JS effect (for Reaper) that does the conversion from ambiX to TBE and another that goes from TBE to 2nd order, 2D, Furse-Malham format here (I've included my remapping JS effect too, so you can also go from Furse-Malham to TBE format by converting to\u2026","rel":"","context":"In &quot;Ambisonics&quot;","block_context":{"text":"Ambisonics","link":"https:\/\/www.brucewiggins.co.uk\/?cat=3"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2017\/02\/TBE_Channel_4_ZR-217x300.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1799,"url":"https:\/\/www.brucewiggins.co.uk\/?p=1799","url_meta":{"origin":757,"position":5},"title":"WHAM &#8211; Webcam Head-track AMbisonics","author":"Bruce Wiggins","date":"January 27th,  2022","format":false,"excerpt":"The restrictions imposed by the pandemic thwarted the continuation of \u2018in-person\u2019 listening tests into Ambisonic Order and transparency over head-tracked headphones in 2020\/21, which is an ongoing project using Very High Order Ambisonics (up to 35th) and hardware head-tracking. It raised the question, \u201cHow do we maintain our essential test\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2022\/01\/image-3.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2022\/01\/image-3.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2022\/01\/image-3.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.brucewiggins.co.uk\/wp-content\/uploads\/2022\/01\/image-3.png?resize=700%2C400&ssl=1 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.brucewiggins.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/757","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.brucewiggins.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.brucewiggins.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.brucewiggins.co.uk\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.brucewiggins.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=757"}],"version-history":[{"count":9,"href":"https:\/\/www.brucewiggins.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/757\/revisions"}],"predecessor-version":[{"id":853,"href":"https:\/\/www.brucewiggins.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/757\/revisions\/853"}],"wp:attachment":[{"href":"https:\/\/www.brucewiggins.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=757"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.brucewiggins.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=757"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.brucewiggins.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=757"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}