Updated transcoding function to not transcode files into same codec needlessly.