finally cpcap fully works, reverted codec to make it compilable