Catalyzes the desaturation of acyl-CoAs to 2-trans-enoyl-CoAs. First enzyme of the fatty acid beta-oxidation pathway. a 2,3-saturated acyl-CoA + O2 = a (2E)-enoyl-CoA + H2O2 Belongs to the acyl-CoA oxidase family.