Probing the formation of sol-gel mesoporous films and characterizing them under environmental/in-operando conditions represents an important challenge to optimize their performances. Obtaining a complete picture of the system usually requires a combination of multiple techniques. In this work, we introduce in situ infrared (IR) ellipsometry equipped with an environmental chamber as a tool to follow simultaneously the evolution of structural, optical and chemical properties during the formation of sol-gel derived mesoporous films. As a case study, we investigate the formation of mesoporous TiO2 by comparing a conventional thermal treatment and a low-temperature annealing by UV irradiation. In both cases, the structural optical and chemical evolution could be monitored during the IR ellipsometric experiment. Interestingly, UV-annealing allows the fabrication of mesoporous TiO2 films at low temperatures enabling the formation of plasmonic mesoporous composites. At last, we critically discuss the advantages and drawbacks of IR ellipsometry for in situ investigations compared to conventional UV-visible ellipsometry by providing additional insights for future developments.