Ultra long linear carbon chains of more than 6000 carbon atoms have recently been synthesized within double-walled carbon nanotubes, and they show a promising new route to one--atom--wide semiconductors with a direct band gap. Theoretical studies predicted that this band gap can be tuned by the length of the chains, the end groups, and their interactions with the environment. However, different density functionals lead to very different values of the band gap of infinitely long carbyne. In this work, we applied resonant Raman excitation spectroscopy with more than 50 laser wavelengths to determine for the first time the band gap of long carbon chains encapsulated inside DWCNTs. The experimentally determined band gaps ranging from 2.253 to 1.848 eV follow a linear relation with Raman frequency. This lower bound is the smallest band gap of linear carbon chains observed so far. The comparison with experimental data obtained for short chains in gas phase or in solution demonstrates the effect of the DWCNT encapsulation, leading to an essential downshift of the band gap. This is explained by the interaction between the carbon chain and the host tube, which greatly modifies the chains bond length alternation.