adding input_cnt into chapter and one file from arm for encoding