NB, avoid transcoding audio for 4k content if at all possible as it will likely cause your playback to buffer and you’ll lose any HDR component to your video. Read this 4k FAQ to learn more.
tl;dr stick with AC3, EAC3, DTS or DTS-HD MA as they’ll play without transcoding. You’ll probably have a better experience connecting the soundbar to your TV’s ARC capable HDMI port, too (so long as your soundbar supports HDMI).