Other news: while trying to process one of those badly encoded videos, I found that the I-frames are correctly encoded. For example, if I set intra_period=30, the first frame is ok, then the net 29 frames are not valid, and the 31st frame is again ok.
Anyone has suggestions?