home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
General Development (no feature request here!)
MediaPortal Audio renderer - better video playback quality
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="tourettes" data-source="post: 637136" data-attributes="member: 10858"><p><span style="font-size: 12px"><span style="font-family: 'Arial Black'">Beta warning</span></span></p><p></p><p><strong>Do not use if you aren't willing to take part into the beta testing!</strong></p><p></p><p><span style="font-size: 12px"><span style="font-family: 'Arial Black'">What is the target audience for audio renderer?</span></span></p><p></p><p>MediaPortal Audio renderer is currently targeted for people who are after better video playback quality (strange isn't it? <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" />). Currently HIFI people wont get any benefits from the audio renderer (lets see if that changes in the future).</p><p></p><p>...also this is only alpha quality on both stability and feature level so the current "release" is not intented to be used for anything else than for reporting the errors to make future targets (MP2 mainly) better.</p><p></p><p><span style="font-size: 12px"><span style="font-family: 'Arial Black'">Benefits of audio renderer</span></span></p><p></p><p>Audio renderer tries to combat few video playback related issues that almost all (all without Reclock) Windows based (other OSes most likely fall into this category as well) media players are affected:</p><p></p><p><strong>Audio / Video clock drifting</strong></p><p></p><p>One of the basic issues that almost every sine PC has is the fact that audio and video clocks are based on the different HW crystals / time sources. Normaly this can be only over come by either dropping or inserting silence into the audio stream which causes pops & clics in audio stream or by dropping or repeating video frames which result juddering / non-smooth video playback.</p><p></p><p>MediaPortal Audio renderer solves this (like Reclock as well) by adjusting the reference clock a bit and resampling the audio to match the result. This will slightly degenerate audio quality when ever the correction is done.</p><p></p><p><strong>Refresh rate and fps mismatch</strong></p><p></p><p>Like Reclock, MediaPortal Audio renderer is able to speed up / down the playback speed of the media to make the media fps to match the dispay refresh rate or it's whole number multiplier.</p><p></p><p><strong>EVR presenter's vsync position</strong></p><p></p><p>EVR presenter is able to "steer" the audio renderer in such way that the video frame rendering is done on optimal vsync position. This is able to correct the random EVR mixer vsync position that is "selected" on streaming start (playback start, skip or resume from pause).</p><p></p><p><span style="font-size: 12px"><span style="font-family: 'Arial Black'">Limitations of audio renderer</span></span></p><p></p><p>Currently there are following limitations for MediaPortal Audio renderer</p><p></p><ul> <li data-xf-list-type="ul"> Bitstreaming (no point since resampling destroys the whole idea of bitstreaming) - includes all formats</li> <li data-xf-list-type="ul"> Windows 7 (Vista most likely as well) audio decoder is not supporting AC3 with 3rd party applications (Dolby lisencing restirction - <a href="http://msdn.microsoft.com/en-us/library/dd390676%28VS.85%29.aspx" target="_blank">Microsoft MPEG-1/DD/AAC Audio Decoder (Windows)</a>)</li> <li data-xf-list-type="ul"> Volume control is not working with WASAPI exclusive mode since it bypasses the OS audio mixer.</li> </ul><p></p><p></p><p><span style="font-size: 12px"><span style="font-family: 'Arial Black'">Future possibitilies of audio renderer</span></span></p><p></p><ul> <li data-xf-list-type="ul"> Bitstreaming (this will cause lot of the main, video playback related features not to work - so this is not on high priority)</li> </ul><p></p><p>Already done:</p><ul> <li data-xf-list-type="ul"> Not possible the playback speed adjust window / bias control</li> <li data-xf-list-type="ul"> Implement WASAPI event driven mode (polling mode wont be available after that)</li> <li data-xf-list-type="ul"> Support for multi channel audio</li> <li data-xf-list-type="ul"> Support for non-16 bit samples</li> <li data-xf-list-type="ul"> AC3 re-encoding so that SPDIF users can have use on the resampling functionality (without this only HDMI LPCM or analog would allow multi channel audio formats when multi channel support is implemented)</li> <li data-xf-list-type="ul"> Audio HW based reference clock </li> <li data-xf-list-type="ul"> Implement a "learning" bias that will reduce the amount of audio adjustments done for non 1:1, 1:2, 1:3... rates</li> </ul><p></p><p></p><p><span style="font-size: 12px"><span style="font-family: 'Arial Black'">How to install</span></span></p><p></p><ul> <li data-xf-list-type="ul"> backup current dshowhelper.dll</li> <li data-xf-list-type="ul"> copy the attached dshowhelper.dll over the old one</li> <li data-xf-list-type="ul"> copy mpaudiorenderer.ax to some folder</li> <li data-xf-list-type="ul"> use "regsvr32 mpaudiorenderer" to register the audio renderer</li> <li data-xf-list-type="ul"> set "MediaPortal audio renderer" to be used in DVD / TV / My Videos as audio renderer</li> </ul><p></p><p><span style="font-size: 12px"><span style="font-family: 'Arial Black'">Debug settings for audio renderer</span></span></p><p></p><p>Following registry settings can be used to tweak / debug / troubleshoot the audio renderer's functionality. They are located in <strong>HKEY_CURRENT_USER\Software\Team MediaPortal\Audio Renderer</strong></p><p></p><p><strong>EnableTimestretching</strong></p><p></p><p>Enables all the audio renderer's special features to work (should be only disabled to check if some issue is also reporducible with it disabled). Enabled by default.</p><p></p><p><strong>ForceDirectSound</strong></p><p></p><p>Forces DirectSound to be used in Vista / Windows 7 instead of the WASAPI. Disabled by default.</p><p></p><p><strong>DevicePeriod</strong></p><p></p><p>Device side buffer size, the samller the more often the audio renderer needs to write to the buffer. 500000 (50ms) by default.</p><p></p><p>0 = default from the audio driver</p><p>1 = minimum from the audio driver</p><p>others -> user specified (default 500000 -> 50 ms)</p><p></p><p><strong>WASAPIExclusive</strong></p><p></p><p>Uses WASAPI exclusive mode. Enabled by default.</p><p></p><p><strong>WASAPIUseEventMode</strong></p><p></p><p>Uses WASAPI event driven mode. Enabled by default (causes issues on some HW / drivers where no proper support is available.)</p><p></p><p><strong>WASAPIPreferredDevice</strong></p><p></p><p>Audio end point device (where the audio is played). Check AudioRenderer.log for possible devices. If left empty it will use OS default which should be ok for most of the time.</p><p></p><p><strong>HWBasedRefClock</strong></p><p></p><p>Toggles between the audio HW based reference clock and system time based reference clock. Audio HW based reference clock is the default value (1).</p><p></p><p><strong>EnableSyncAdjustment</strong></p><p></p><p>Toggles between v-sync adjustments on / off. By default this is on. Use only for debugging purposes (like sync drifting).</p><p></p><p><strong>LogSampleTimes</strong></p><p></p><p>For debugging only. When enabled, all audio incoming sample timestamps (and current stream time) is logged into the audiorenderer.log. Disabled by default.</p><p></p><p><strong>EnableAC3Encoding</strong></p><p></p><p>Enables AC3 (Dolby Digital on-the-fly encoding for SPDIF). Disabled by default.</p><p></p><p><strong>AC3bitrate</strong></p><p></p><p>Bitrate setting for the AC3 encoding. Default value is 448 kbps, valid values are 192, 224, 256, 320, 384, 448, 512, 576, 640.</p><p></p><p><strong>MaxBias</strong></p><p></p><p>Maximum allowed speed that the playback can reach, this value is divided with 10000 to get the real value. Default value is 11000 (1.1x) - 10% speed up at maximum.</p><p></p><p><strong>MinBias</strong></p><p></p><p>Minimum allowed speed for the playback, this value is divided with 10000 to get the real value. Default value is 9000 (0.9x) - 10% speed down at maximum.</p><p></p><p><strong>AudioDelay</strong></p><p></p><p>Delay audio for xxx ms, can be used to compensate delay introduced by display device (postprocessing in LCD for example). By default this is 0 ms. Amount is given in ms.</p><p></p><p><strong>ChannelMaskOverride_5_1</strong></p><p></p><p>Override the channel mask for 5.1 stream types. Use this to fix incompatibilities with the speak configuration between driver and the audio decoder. Disabled / zero by default. <strong>For ASUS Xonar use "1551".</strong></p><p></p><p><strong>ChannelMaskOverride_7_1</strong></p><p></p><p>Override the channel mask for 7.1 stream types. Use this to fix incompatibilities with the speak configuration between driver and the audio decoder. Disabled / zero by default.</p><p></p><p></p><p><span style="font-size: 12px"><span style="font-family: 'Arial Black'">How to configure audio codecs</span></span></p><p></p><p>Since MediaPortal audio renderer is currently really picky about the input audio stream format that it accepts it is recommended to use ffdshow's audio decoder (which is a really good decoder in any case). Following setting should be used:</p><p></p><ul> <li data-xf-list-type="ul"> All passthru settings must be disabled</li> <li data-xf-list-type="ul"> AC3 encode should be disabled</li> </ul><p></p><p><span style="font-size: 12px"><span style="font-family: 'Arial Black'">How to report a bug</span></span></p><p></p><ul> <li data-xf-list-type="ul"> Try to provide as clean logs as possible (for example if live tv causes issues, just after the last channel change if possible)</li> <li data-xf-list-type="ul"> Provide information about the used sample media file (even better if you can provide a small piece of that file itself, but take care that you aren't violating copyright)</li> <li data-xf-list-type="ul"> Provide system information about the audio chip & drives. Same for GPU</li> <li data-xf-list-type="ul"> Provide AudioRenderer.log</li> <li data-xf-list-type="ul"> Provide Evr.log</li> <li data-xf-list-type="ul"> Provide MediaPortal.log</li> <li data-xf-list-type="ul"> Check with GraphEdit / GraphStudio that the audio renderer is really connected to the audio decoder in graph</li> </ul><p></p><p><span style="font-size: 12px"><span style="font-family: 'Arial Black'">Source codes</span></span></p><p></p><p>EVR presenter and audio renderer source codes can be found from</p><p></p><p><a href="http://sources.team-mediaportal.com/svn/public/branches/Accurate_sync/" target="_blank">public - Revision 26095: /branches/Accurate_sync</a></p><p></p><p><span style="font-size: 12px"><span style="font-family: 'Arial Black'">People who made this possible</span></span></p><p></p><p>ar-jar (Arto Järvinen - <a href="http://www.ostrogothia.com/" target="_blank">vertical sync</a>). The main idea for searching for the better video playback quality (mainly the A/V clock drift issue we are plagued) did come from Arto's work on the GothPlayer / MPC-HC side.</p><p></p><p>Arion_p - For helping the audio renderer itself (and volunteering to continue with the multi channel implementation <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" />)</p><p></p><p>Olwsroost - He was the one who did continue the EVR presenter scheduling and frame presentation improvements. </p><p></p><p>albain - ffdshow developer who has provided the MPC-HC project the basic audio renderer implementation that the MediaPortal Audio renderer is based on.</p><p></p><p></p><p>The attached picture has been taken on approx 105 minutes of time when a Blu-ray sourced M2TS file is being played on non-matching 50 Hz monitor.</p></blockquote><p></p>
[QUOTE="tourettes, post: 637136, member: 10858"] [SIZE="3"][FONT="Arial Black"]Beta warning[/FONT][/SIZE] [b]Do not use if you aren't willing to take part into the beta testing![/b] [SIZE="3"][FONT="Arial Black"]What is the target audience for audio renderer?[/FONT][/SIZE] MediaPortal Audio renderer is currently targeted for people who are after better video playback quality (strange isn't it? :D). Currently HIFI people wont get any benefits from the audio renderer (lets see if that changes in the future). ...also this is only alpha quality on both stability and feature level so the current "release" is not intented to be used for anything else than for reporting the errors to make future targets (MP2 mainly) better. [SIZE="3"][FONT="Arial Black"]Benefits of audio renderer[/FONT][/SIZE] Audio renderer tries to combat few video playback related issues that almost all (all without Reclock) Windows based (other OSes most likely fall into this category as well) media players are affected: [b]Audio / Video clock drifting[/b] One of the basic issues that almost every sine PC has is the fact that audio and video clocks are based on the different HW crystals / time sources. Normaly this can be only over come by either dropping or inserting silence into the audio stream which causes pops & clics in audio stream or by dropping or repeating video frames which result juddering / non-smooth video playback. MediaPortal Audio renderer solves this (like Reclock as well) by adjusting the reference clock a bit and resampling the audio to match the result. This will slightly degenerate audio quality when ever the correction is done. [b]Refresh rate and fps mismatch[/b] Like Reclock, MediaPortal Audio renderer is able to speed up / down the playback speed of the media to make the media fps to match the dispay refresh rate or it's whole number multiplier. [b]EVR presenter's vsync position[/b] EVR presenter is able to "steer" the audio renderer in such way that the video frame rendering is done on optimal vsync position. This is able to correct the random EVR mixer vsync position that is "selected" on streaming start (playback start, skip or resume from pause). [SIZE="3"][FONT="Arial Black"]Limitations of audio renderer[/FONT][/SIZE] Currently there are following limitations for MediaPortal Audio renderer [list] [*] Bitstreaming (no point since resampling destroys the whole idea of bitstreaming) - includes all formats [*] Windows 7 (Vista most likely as well) audio decoder is not supporting AC3 with 3rd party applications (Dolby lisencing restirction - [url=http://msdn.microsoft.com/en-us/library/dd390676%28VS.85%29.aspx]Microsoft MPEG-1/DD/AAC Audio Decoder (Windows)[/url]) [*] Volume control is not working with WASAPI exclusive mode since it bypasses the OS audio mixer. [/list] [SIZE="3"][FONT="Arial Black"]Future possibitilies of audio renderer[/FONT][/SIZE] [list] [*] Bitstreaming (this will cause lot of the main, video playback related features not to work - so this is not on high priority) [/list] Already done: [list] [*] Not possible the playback speed adjust window / bias control [*] Implement WASAPI event driven mode (polling mode wont be available after that) [*] Support for multi channel audio [*] Support for non-16 bit samples [*] AC3 re-encoding so that SPDIF users can have use on the resampling functionality (without this only HDMI LPCM or analog would allow multi channel audio formats when multi channel support is implemented) [*] Audio HW based reference clock [*] Implement a "learning" bias that will reduce the amount of audio adjustments done for non 1:1, 1:2, 1:3... rates [/list] [SIZE="3"][FONT="Arial Black"]How to install[/FONT][/SIZE] [list] [*] backup current dshowhelper.dll [*] copy the attached dshowhelper.dll over the old one [*] copy mpaudiorenderer.ax to some folder [*] use "regsvr32 mpaudiorenderer" to register the audio renderer [*] set "MediaPortal audio renderer" to be used in DVD / TV / My Videos as audio renderer [/list] [SIZE="3"][FONT="Arial Black"]Debug settings for audio renderer[/FONT][/SIZE] Following registry settings can be used to tweak / debug / troubleshoot the audio renderer's functionality. They are located in [b]HKEY_CURRENT_USER\Software\Team MediaPortal\Audio Renderer[/b] [b]EnableTimestretching[/b] Enables all the audio renderer's special features to work (should be only disabled to check if some issue is also reporducible with it disabled). Enabled by default. [b]ForceDirectSound[/b] Forces DirectSound to be used in Vista / Windows 7 instead of the WASAPI. Disabled by default. [b]DevicePeriod[/b] Device side buffer size, the samller the more often the audio renderer needs to write to the buffer. 500000 (50ms) by default. 0 = default from the audio driver 1 = minimum from the audio driver others -> user specified (default 500000 -> 50 ms) [b]WASAPIExclusive[/b] Uses WASAPI exclusive mode. Enabled by default. [b]WASAPIUseEventMode[/b] Uses WASAPI event driven mode. Enabled by default (causes issues on some HW / drivers where no proper support is available.) [b]WASAPIPreferredDevice[/b] Audio end point device (where the audio is played). Check AudioRenderer.log for possible devices. If left empty it will use OS default which should be ok for most of the time. [b]HWBasedRefClock[/b] Toggles between the audio HW based reference clock and system time based reference clock. Audio HW based reference clock is the default value (1). [b]EnableSyncAdjustment[/b] Toggles between v-sync adjustments on / off. By default this is on. Use only for debugging purposes (like sync drifting). [b]LogSampleTimes[/b] For debugging only. When enabled, all audio incoming sample timestamps (and current stream time) is logged into the audiorenderer.log. Disabled by default. [b]EnableAC3Encoding[/b] Enables AC3 (Dolby Digital on-the-fly encoding for SPDIF). Disabled by default. [b]AC3bitrate[/b] Bitrate setting for the AC3 encoding. Default value is 448 kbps, valid values are 192, 224, 256, 320, 384, 448, 512, 576, 640. [b]MaxBias[/b] Maximum allowed speed that the playback can reach, this value is divided with 10000 to get the real value. Default value is 11000 (1.1x) - 10% speed up at maximum. [b]MinBias[/b] Minimum allowed speed for the playback, this value is divided with 10000 to get the real value. Default value is 9000 (0.9x) - 10% speed down at maximum. [b]AudioDelay[/b] Delay audio for xxx ms, can be used to compensate delay introduced by display device (postprocessing in LCD for example). By default this is 0 ms. Amount is given in ms. [b]ChannelMaskOverride_5_1[/b] Override the channel mask for 5.1 stream types. Use this to fix incompatibilities with the speak configuration between driver and the audio decoder. Disabled / zero by default. [b]For ASUS Xonar use "1551".[/b] [b]ChannelMaskOverride_7_1[/b] Override the channel mask for 7.1 stream types. Use this to fix incompatibilities with the speak configuration between driver and the audio decoder. Disabled / zero by default. [SIZE="3"][FONT="Arial Black"]How to configure audio codecs[/FONT][/SIZE] Since MediaPortal audio renderer is currently really picky about the input audio stream format that it accepts it is recommended to use ffdshow's audio decoder (which is a really good decoder in any case). Following setting should be used: [list] [*] All passthru settings must be disabled [*] AC3 encode should be disabled [/list] [SIZE="3"][FONT="Arial Black"]How to report a bug[/FONT][/SIZE] [list] [*] Try to provide as clean logs as possible (for example if live tv causes issues, just after the last channel change if possible) [*] Provide information about the used sample media file (even better if you can provide a small piece of that file itself, but take care that you aren't violating copyright) [*] Provide system information about the audio chip & drives. Same for GPU [*] Provide AudioRenderer.log [*] Provide Evr.log [*] Provide MediaPortal.log [*] Check with GraphEdit / GraphStudio that the audio renderer is really connected to the audio decoder in graph [/list] [SIZE="3"][FONT="Arial Black"]Source codes[/FONT][/SIZE] EVR presenter and audio renderer source codes can be found from [url=http://sources.team-mediaportal.com/svn/public/branches/Accurate_sync/]public - Revision 26095: /branches/Accurate_sync[/url] [SIZE="3"][FONT="Arial Black"]People who made this possible[/FONT][/SIZE] ar-jar (Arto Järvinen - [url=http://www.ostrogothia.com/]vertical sync[/url]). The main idea for searching for the better video playback quality (mainly the A/V clock drift issue we are plagued) did come from Arto's work on the GothPlayer / MPC-HC side. Arion_p - For helping the audio renderer itself (and volunteering to continue with the multi channel implementation :)) Olwsroost - He was the one who did continue the EVR presenter scheduling and frame presentation improvements. albain - ffdshow developer who has provided the MPC-HC project the basic audio renderer implementation that the MediaPortal Audio renderer is based on. The attached picture has been taken on approx 105 minutes of time when a Blu-ray sourced M2TS file is being played on non-matching 50 Hz monitor. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
MediaPortal Audio renderer - better video playback quality
Contact us
RSS
Top
Bottom