We give two characterizations, one for the class of generalized Young measures generated by $mathcal A$-free measures, and one for the class generated by $mathcal B$-gradient measures $mathcal Bu$. Here, $mathcal A$ and $mathcal B$ are linear homogeneous operators of arbitrary order, which we assume satisfy the constant rank property. The characterization places the class of generalized $mathcal A$-free Young measures in duality with the class of $mathcal A$-quasiconvex integrands by means of a well-known Hahn--Banach separation property. A similar statement holds for generalized $mathcal B$-gradient Young measures. Concerning applications, we discuss several examples that showcase the rigidity or the failure of $mathrm{L}^1$-compensated compactness when concentration of mass is allowed. These include the failure of $mathrm{L}^1$-estimates for elliptic systems and the failure of $mathrm{L}^1$-rigidity for the two-state problem. As a byproduct of our techniques we also show that, for any bounded open set $Omega$, the inclusions [ mathrm{L}^1(Omega) cap ker mathcal A hookrightarrow mathcal M(Omega) cap ker mathcal A, ] [ {mathcal B uin mathrm{C}^infty(Omega)} hookrightarrow {mathcal B uin mathcal M(Omega)}, ] are dense with respect to area-functional convergence of measures