A compact optical gas sensor based on a tunable Fabry-Pérot filter-detector was constructed. Multicomponent gas analysis was performed on typical C4 hydrocarbons found in petrochemistry processes. Fast selective and sensitive monitoring of the components was achieved by using chemometric data processing (MLR and PLS).