Extracting coordinates (x y z) from a BVH file
You can find a lot of helpful information by taking a look at Blender's import and export scripts for BVH located in /your/install/dir/2.80/scripts/addons/io_anim_bvh or if you have cloned the repository /your/git/repo/blender-git/blender/release/scripts/addons/io_anim_bvh or online in diffusion.

As you can see in the importer (line 173), the file contains so called channels which contain the x,y,z-coordinates. Since I'm not familiar with the format I can't tell you exactly how the matrix transformations work, but given that the importer script is rather short you may be able to figure this out on your own.