The energy dependence of chirally expanded πN isoscalar and isovector amplitudes b 0 (E) and b 1 (E), respectively, for zero-momentum off-shell pions near threshold, is used to impose the minimal substitution requirement E->E-V C on the properly constructed pion optical potential within a large-scale fit to 100 pionic-atom data across the periodic table which also include the recently established 'deeply bound' pionic atoms of Pb and Sn. This fit cannot be reconciled with the well-known free-space values of the πN threshold amplitudes. In contrast, introducing the empirically known energy dependence for on-shell pions leads to a better fit and to satisfactory values for the πN threshold amplitudes. The difference between these two approaches is briefly discussed.