You need to first understand some concepts here. VCF files are a catalog of genomic positions that contain polymorphisms within the reads that mapped to a reference genome coordinate. VCF files are generated by analyzing the CIGAR info within the SAM/BAM alignment files. There are specialized software to identify such polymorphisms such as GATK, freebayes, SAMtools. So the question of convert a BAM to a VCF is actually wrong. You should first read some review papers on the topic, and then run the actual analysis.