As an important part of pretreatment before recycling, sorting has a great impact on the quality, efficiency, cost and difficulty of recycling. In this paper, dual-energy X-ray transmission (DE-XRT) combined with variable gas-ejection is used to improve the quality and efficiency of in-line automatic sorting of waste non-ferrous metals. A method was proposed to judge the sorting ability, identify the types, and calculate the mass and center-of-gravity coordinates according to the shading of low-energy, the line scan direction coordinate and transparency natural logarithm ratio of low energy to high energy (R_value). The material identification was satisfied by the nearest neighbor algorithm of effective points in the material range to the R_value calibration surface. The flow-process of identification was also presented. Based on the thickness of the calibration surface, the material mass and center-of-gravity coordinates were calculated. The feasibility of controlling material falling points by variable gas-ejection was analyzed. The experimental verification of self-made materials showed that identification accuracy by count basis was 85%, mass and center-of-gravity coordinates calculation errors were both below 5%. The method proposed features high accuracy, high efficiency, and low operation cost and is of great application value even to other solid waste sorting, such as plastics, glass and ceramics.