LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-07-2019, 04:20 PM   #1
alex14641
Member
 
Registered: Feb 2016
Distribution: Slackware64_14.1, Slackware64_14.2, Slackware64_current
Posts: 153

Rep: Reputation: Disabled
If you want AptX and other high(er) quality codec support...


Give this a try: https://github.com/EHfive/pulseaudio-modules-bt. I'm currently using with some AptX compatible headphones, and I can tell the difference. You will have to upgrade ffmpeg to 4.x.
 
Old 03-08-2019, 08:04 AM   #2
1337_powerslacker
Member
 
Registered: Nov 2009
Distribution: Slackware64-current
Posts: 716
Blog Entries: 1

Rep: Reputation: 461Reputation: 461Reputation: 461Reputation: 461Reputation: 461
Quote:
Originally Posted by alex14641 View Post
Give this a try: https://github.com/EHfive/pulseaudio-modules-bt. I'm currently using with some AptX compatible headphones, and I can tell the difference. You will have to upgrade ffmpeg to 4.x.
I've got a Denon AVR-S510BT with 2 front and 2 rear speakers, and I've already had great sound come out of it, and honestly, I can't tell a whole lot of difference. Maybe it makes a bigger difference with headphones than with a stereo system. But I'm of the opinion that it's better to have such options available. Thanks for letting us know about this, alex.
 
Old 03-08-2019, 02:09 PM   #3
alex14641
Member
 
Registered: Feb 2016
Distribution: Slackware64_14.1, Slackware64_14.2, Slackware64_current
Posts: 153

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by 1337_powerslacker View Post
I've got a Denon AVR-S510BT with 2 front and 2 rear speakers, and I've already had great sound come out of it, and honestly, I can't tell a whole lot of difference. Maybe it makes a bigger difference with headphones than with a stereo system. But I'm of the opinion that it's better to have such options available. Thanks for letting us know about this, alex.
What codecs does the device support?
 
Old 03-08-2019, 02:20 PM   #4
1337_powerslacker
Member
 
Registered: Nov 2009
Distribution: Slackware64-current
Posts: 716
Blog Entries: 1

Rep: Reputation: 461Reputation: 461Reputation: 461Reputation: 461Reputation: 461
Quote:
Originally Posted by alex14641 View Post
What codecs does the device support?
As suggested by the project's Wiki page, I ran the following command:

Code:
pactl list sinks | grep -e bluez -e a2dp_codec
Part of that output is the following:

Code:
bluetooth.a2dp_codec = "AAC"
Is there a way to get pulseaudio to accept a different codec, or does it just use what it detects the bluetooth device can support?
 
Old 03-08-2019, 03:03 PM   #5
alex14641
Member
 
Registered: Feb 2016
Distribution: Slackware64_14.1, Slackware64_14.2, Slackware64_current
Posts: 153

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by 1337_powerslacker View Post
As suggested by the project's Wiki page, I ran the following command:
Is there a way to get pulseaudio to accept a different codec, or does it just use what it detects the bluetooth device can support?
Per the docs, the modules will automatically choose the best supported codec for the device. My headphones actually show 'AptX' when I ran the same command.
 
1 members found this post helpful.
Old 03-08-2019, 03:47 PM   #6
1337_powerslacker
Member
 
Registered: Nov 2009
Distribution: Slackware64-current
Posts: 716
Blog Entries: 1

Rep: Reputation: 461Reputation: 461Reputation: 461Reputation: 461Reputation: 461
Quote:
Originally Posted by alex14641 View Post
Per the docs, the modules will automatically choose the best supported codec for the device. My headphones actually show 'AptX' when I ran the same command.
After going through the instructions outlined in the docs, it looks like AAC is the only codec supported by my receiver.

EDIT: Since the AAC codec was stated as having been added as part of those modules, it looks like it was not effort wasted.

Last edited by 1337_powerslacker; 03-08-2019 at 04:00 PM.
 
Old 03-08-2019, 08:52 PM   #7
1337_powerslacker
Member
 
Registered: Nov 2009
Distribution: Slackware64-current
Posts: 716
Blog Entries: 1

Rep: Reputation: 461Reputation: 461Reputation: 461Reputation: 461Reputation: 461
ffmpeg 4.x can be installed alongside 3.x!

From the SlackBuilds page:

Quote:
ffmpeg4 should be installable alongside ffmpeg 3.x without conflict.

By default it will not build the ffmpeg binaries or man-pages, in order
not to conflict with an ffmpeg 3.x package.

To link to this version of the ffmpeg libraries, you'll need to set
the PKG_CONFIG_PATH to "/usr/lib${LIBDIRSUFFIX}/ffmpeg4/pkgconfig"
where ${LIBDIRSUFFIX} is either 64 or an empty string, depending on
your architecture.
Following the instructions, I was able to install support for AptX & other codecs supported in ffmpeg 4.x without touching the installed 3.x. I rebuilt the pulseaudio-modules-bt package, and it detected the libraries and installed support for the codecs. So I don't disrupt support for packages that require (and depend upon) 3.x to operate. I could re-compile packages for 4.x support, but on balance, it's much easier to install a sister package for 4.x support.

Last edited by 1337_powerslacker; 03-08-2019 at 09:23 PM.
 
1 members found this post helpful.
Old 03-09-2019, 04:17 PM   #8
alex14641
Member
 
Registered: Feb 2016
Distribution: Slackware64_14.1, Slackware64_14.2, Slackware64_current
Posts: 153

Original Poster
Rep: Reputation: Disabled
Thanks for the info about ffmpeg version coexistence. I've created and installed packages for both.
 
Old 03-10-2019, 07:28 AM   #9
1337_powerslacker
Member
 
Registered: Nov 2009
Distribution: Slackware64-current
Posts: 716
Blog Entries: 1

Rep: Reputation: 461Reputation: 461Reputation: 461Reputation: 461Reputation: 461
Quote:
Originally Posted by alex14641 View Post
Thanks for the info about ffmpeg version coexistence. I've created and installed packages for both.
You're welcome!
 
Old 03-11-2019, 04:35 PM   #10
alex14641
Member
 
Registered: Feb 2016
Distribution: Slackware64_14.1, Slackware64_14.2, Slackware64_current
Posts: 153

Original Poster
Rep: Reputation: Disabled
Note: In order for multiple versions of ffmpeg to coexist, you must do either
1) Add the directory containing the ffmpeg 4 libs to /etc/ld.so.conf
2) Set the LDFLAGS environment variable to '-Wl,-rpath=/usr/lib64/ffmpeg4' before configuring the ffmpeg4 and bluetooth modules for building. Replace /usr/lib64/ffmpeg4 with the directory containing your ffmpeg 4 libs.

I did 2) to ensure no conflict with existing applications.

To determine whether the modules support all codecs, look for the following in /var/log/messages:
Code:
Mar 11 18:01:26 boss4 bluetoothd[11960]: Endpoint registered: sender=:1.171 path=/MediaEndpoint/A2DPSource/VENDOR/LDAC
Mar 11 18:01:26 boss4 bluetoothd[11960]: Endpoint registered: sender=:1.171 path=/MediaEndpoint/A2DPSource/VENDOR/APTXHD
Mar 11 18:01:26 boss4 bluetoothd[11960]: Endpoint registered: sender=:1.171 path=/MediaEndpoint/A2DPSource/VENDOR/APTX
Mar 11 18:01:26 boss4 bluetoothd[11960]: Endpoint registered: sender=:1.171 path=/MediaEndpoint/A2DPSource/AAC
Mar 11 18:01:26 boss4 bluetoothd[11960]: Endpoint registered: sender=:1.171 path=/MediaEndpoint/A2DPSource/SBC
Mar 11 18:01:26 boss4 bluetoothd[11960]: Endpoint registered: sender=:1.171 path=/MediaEndpoint/A2DPSink/VENDOR/APTXHD
Mar 11 18:01:26 boss4 bluetoothd[11960]: Endpoint registered: sender=:1.171 path=/MediaEndpoint/A2DPSink/VENDOR/APTX
Mar 11 18:01:26 boss4 bluetoothd[11960]: Endpoint registered: sender=:1.171 path=/MediaEndpoint/A2DPSink/AAC
Mar 11 18:01:26 boss4 bluetoothd[11960]: Endpoint registered: sender=:1.171 path=/MediaEndpoint/A2DPSink/SBC
These are the codecs the modules support, not what a particular device supports. Note the presence of APTX and APTXHD codecs

If the module can't load the correct ffmpeg libraries, you will see the following:
Code:
Mar 10 23:15:03 boss4 bluetoothd[1053]: Endpoint unregistered: sender=:1.88 path=/MediaEndpoint/A2DPSource/VENDOR/LDAC
Mar 10 23:15:03 boss4 bluetoothd[1053]: Endpoint unregistered: sender=:1.88 path=/MediaEndpoint/A2DPSource/AAC
Mar 10 23:15:03 boss4 bluetoothd[1053]: Endpoint unregistered: sender=:1.88 path=/MediaEndpoint/A2DPSource/SBC
Mar 10 23:15:03 boss4 bluetoothd[1053]: Endpoint unregistered: sender=:1.88 path=/MediaEndpoint/A2DPSink/AAC
Mar 10 23:15:03 boss4 bluetoothd[1053]: Endpoint unregistered: sender=:1.88 path=/MediaEndpoint/A2DPSink/SBC
You cannot verify that the modules link to the correct ffmpeg version by looking at the output of ldd, as the modules load the ffmpeg libraries via dlopen.
 
Old 03-12-2019, 07:54 AM   #11
1337_powerslacker
Member
 
Registered: Nov 2009
Distribution: Slackware64-current
Posts: 716
Blog Entries: 1

Rep: Reputation: 461Reputation: 461Reputation: 461Reputation: 461Reputation: 461
Quote:
Originally Posted by alex14641 View Post
Note: In order for multiple versions of ffmpeg to coexist, you must do either
1) Add the directory containing the ffmpeg 4 libs to /etc/ld.so.conf
2) Set the LDFLAGS environment variable to '-Wl,-rpath=/usr/lib64/ffmpeg4' before configuring the ffmpeg4 and bluetooth modules for building. Replace /usr/lib64/ffmpeg4 with the directory containing your ffmpeg 4 libs.

I did 2) to ensure no conflict with existing applications.

To determine whether the modules support all codecs, look for the following in /var/log/messages:
Code:
Mar 11 18:01:26 boss4 bluetoothd[11960]: Endpoint registered: sender=:1.171 path=/MediaEndpoint/A2DPSource/VENDOR/LDAC
Mar 11 18:01:26 boss4 bluetoothd[11960]: Endpoint registered: sender=:1.171 path=/MediaEndpoint/A2DPSource/VENDOR/APTXHD
Mar 11 18:01:26 boss4 bluetoothd[11960]: Endpoint registered: sender=:1.171 path=/MediaEndpoint/A2DPSource/VENDOR/APTX
Mar 11 18:01:26 boss4 bluetoothd[11960]: Endpoint registered: sender=:1.171 path=/MediaEndpoint/A2DPSource/AAC
Mar 11 18:01:26 boss4 bluetoothd[11960]: Endpoint registered: sender=:1.171 path=/MediaEndpoint/A2DPSource/SBC
Mar 11 18:01:26 boss4 bluetoothd[11960]: Endpoint registered: sender=:1.171 path=/MediaEndpoint/A2DPSink/VENDOR/APTXHD
Mar 11 18:01:26 boss4 bluetoothd[11960]: Endpoint registered: sender=:1.171 path=/MediaEndpoint/A2DPSink/VENDOR/APTX
Mar 11 18:01:26 boss4 bluetoothd[11960]: Endpoint registered: sender=:1.171 path=/MediaEndpoint/A2DPSink/AAC
Mar 11 18:01:26 boss4 bluetoothd[11960]: Endpoint registered: sender=:1.171 path=/MediaEndpoint/A2DPSink/SBC
These are the codecs the modules support, not what a particular device supports. Note the presence of APTX and APTXHD codecs

If the module can't load the correct ffmpeg libraries, you will see the following:
Code:
Mar 10 23:15:03 boss4 bluetoothd[1053]: Endpoint unregistered: sender=:1.88 path=/MediaEndpoint/A2DPSource/VENDOR/LDAC
Mar 10 23:15:03 boss4 bluetoothd[1053]: Endpoint unregistered: sender=:1.88 path=/MediaEndpoint/A2DPSource/AAC
Mar 10 23:15:03 boss4 bluetoothd[1053]: Endpoint unregistered: sender=:1.88 path=/MediaEndpoint/A2DPSource/SBC
Mar 10 23:15:03 boss4 bluetoothd[1053]: Endpoint unregistered: sender=:1.88 path=/MediaEndpoint/A2DPSink/AAC
Mar 10 23:15:03 boss4 bluetoothd[1053]: Endpoint unregistered: sender=:1.88 path=/MediaEndpoint/A2DPSink/SBC
You cannot verify that the modules link to the correct ffmpeg version by looking at the output of ldd, as the modules load the ffmpeg libraries via dlopen.
Thanks for the info, alex! Something to keep in mind. My configuration works to my satisfaction.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to install divx codec?where to get codec ginda Linux - Newbie 1 10-22-2004 12:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration