notes/audio.md

1.9 KiB

title
Audio

Bluetooth

Bluez

  • Using `gdbus` to introspect or retrieve properties
gdbus introspect --system --dest org.bluez  --object-path /org/bluez/hci0/dev_6C_C4_D5_6C_CF_19
gdbus call --system --dest org.bluez  --object-path /org/bluez/hci0/dev_6C_C4_D5_6C_CF_19 --method org.freedesktop.DBus.Properties.GetAll org.freedesktop.DBus.Properties

Information on codecs

Transport payload sizes observed for SBC

  • SBC-XQ @ 552 Kbps: 622 bytes
  • SBC-XQ @ 512 Kbps: 574 bytes
  • SBC-XQ @ 453 Kbps: 678 bytes

Random

Clean up audio with Audacity

Consider an mkv file recorded with OBS, do the following

  • Extract the audio from video file

    ffmpeg -i infile.mp4 -acodec copy outfile.aac
    

    The option -acodec copy implies to not re-sample the audio.

  • Use Audacity's noise reduction filters. Export as m4a.

  • Merge audio and video again

    ffmpeg -i infile.mp4 -i denoised-audio.m4a -vcodec copy -acodec copy -map 0:0 -map 1:0 denoised-video.mp4
    
  • Increase the volume using ffmpeg

    ffmpeg -i infile.mkv -vcodec copy -filter:a "volume=5.000000" infile-outputlouder.mkv
    

    Note that this command seems to change the format in mkv file from aac to ogg.

    To keep the codec same namely AAC, use the following

    ffmpeg -i infile.mp4 -vcodec copy -filter:a "volume=3.000000" -c:a aac -b:a 320k infile-outputlouder.mkv
    

    See the link https://trac.ffmpeg.org/wiki/Encode/AAC