Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio usability improvements #662

Closed
totaam opened this issue Aug 23, 2014 · 11 comments
Closed

Audio usability improvements #662

totaam opened this issue Aug 23, 2014 · 11 comments
Labels

Comments

@totaam
Copy link
Collaborator

totaam commented Aug 23, 2014

Issue migrated from trac ticket # 662

component: sound | priority: minor | resolution: wontfix

2014-08-23 21:50:00: onlyjob created the issue


Please allow audio codec selection from menu (similar to video encodings).
Also please introduce per-codec audio buffering config options.
Also it will be useful to have audio codec priority order config option to change hardcoded CODEC_ORDER = [MP3, WAVPACK, WAV, FLAC, SPEEX].
Thanks.

@totaam
Copy link
Collaborator Author

totaam commented Aug 24, 2014

2014-08-24 05:12:26: totaam changed status from new to assigned

@totaam
Copy link
Collaborator Author

totaam commented Aug 24, 2014

2014-08-24 05:12:26: totaam changed owner from antoine to totaam

@totaam
Copy link
Collaborator Author

totaam commented Aug 24, 2014

2014-08-24 05:12:26: totaam commented


Please allow audio codec selection from menu (similar to video encodings).
[[BR]]
The codecs are defined in the order that has been most tested, I fear that flac and speex are likely to not work very well out of the box, if at all. Exposing them via the gui would make it more likely that the user would end up with a non functional sound setup.
[[BR]]
Also please introduce per-codec audio buffering config options.
[[BR]]
Hmm could do. I would prefer if we chose the right buffering options for each encoding automatically, which might be do-able, just needs time spent testing all the platforms and network combinations. Of which there are many.
And since it works well enough with mp3 on most platforms, and that wavpack works well enough as a fallback... there is little incentive to work on this.
[[BR]]

That said, you can play with:

XPRA_SOUND_QUEUE_TIME=450 xpra attach ...

And if you find a better value, re-assign to afarr for further testing and maybe we can tweak the defaults. Per-codec, and per-platform if needed.
[[BR]]

The one thing that is in favour of this change is usage over very jittery connections, like 3G, but since we have statistical data on the connection latency we could take this into account to calculate an appropriate buffer delay / size automatically.
[[BR]]

Note: the reason why the default buffer queue is so long is because on some platforms (OSX: #379), overruns and underruns are expensive to deal with.
Other related tickets: #362, #400

[[BR]]

useful to have audio codec priority order config option to change hardcoded
[[BR]]
To some extent, you can already affect this order by omitting some codecs from the speaker-codec and microphone-codec lists.

@totaam
Copy link
Collaborator Author

totaam commented Jun 17, 2016

2016-06-17 09:01:59: antoine changed status from assigned to new

@totaam
Copy link
Collaborator Author

totaam commented Jun 17, 2016

2016-06-17 09:01:59: antoine changed owner from totaam to onlyjob

@totaam
Copy link
Collaborator Author

totaam commented Jun 17, 2016

2016-06-17 09:01:59: antoine commented


The codec order will honour the speaker-codec and microphone-codec options, trivial fix in r12849 (which I may backport).
It will still default to the pre-defined codec order if those command line / config file options are left unset. You can see these default values by running xpra _sound_query.


As for the buffering suggestion, that's unlikely to change because:

$ xpra attach --speaker-codec=help
speaker codecs available: opus+gdp, opus+ogg, vorbis+gdp, vorbis+mka, \
    flac+gdp, flac+ogg, mp3, aac+gdp, aac+mpeg4, raw+gdp+lz4, raw+gdp+lzo, raw+gdp, \
    wav+lz4, wav+lzo, wav, wavpack, speex+gdp, speex+ogg

and unless proven otherwise, the defaults (vorbis or opus) are the best codecs for almost every possible use case - both in terms of quality, compression ratio and latency: #1074

@totaam
Copy link
Collaborator Author

totaam commented Jul 12, 2016

2016-07-12 17:51:51: antoine commented


Milestone renamed

@totaam
Copy link
Collaborator Author

totaam commented Aug 21, 2016

2016-08-21 10:55:50: antoine commented


Milestone renamed

@totaam
Copy link
Collaborator Author

totaam commented Feb 15, 2017

2017-02-15 11:35:27: antoine changed status from new to closed

@totaam
Copy link
Collaborator Author

totaam commented Feb 15, 2017

2017-02-15 11:35:27: antoine set resolution to wontfix

@totaam
Copy link
Collaborator Author

totaam commented Feb 15, 2017

2017-02-15 11:35:27: antoine commented


As per comment:3, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant