I am converting HEVC video to H264 video using AVFoundation APIs. However I have two problems:
How do I detect the encoder used in the input file using AVFoundation?
How do I calculate the bitrate of the output H264 file that matches the quality of input HEVC file? Need to pass this bitrate to AVAssetWriter compression settings dictionary.