We have measured the total elastic (σ e1) and inelastic (σ a) cross sections for reactions of π-mesons with Be, C and Al nuclei at various energies around 1 GeV. The counter experiment, made with the help of Saclay's proton synchrotron, was a “poor” and “rich” geometry one. The extrapolation to zero angle of the attenuation of the beam measurements at different θ angles was made with the use of the optical model. We assume that the shapes of the nuclei are those determined by electron scattering experiments, and that the inelastic products have an approximately constant distribution.From this use of the optical model one can get not only σ a and σ e1, but also a value of the mean forward scattering amplitude f(0) of the π-nucleon system for linked nucleons. This value has to be compared to the mean π-free nucleon amplitude at the same energy of the pion, in order to check the usual approximations used in the optical model. The order of magnitude of the two amplitudes is the same and, in particular, the real parts are not significantly different, as could be deduced from other experiments. To get a fair agreement between the imaginary parts, one has to take account of the Fermi momenta of nucleons and of second order corrections using correlation functions of nucleons inside nuclei.