added header declarations for encoding
added add_stream to format context, added more codec properties