I had a similar problem when I used vlc to transcode AVCHD (.mts) video camera files to H.264. vlc could play the files, but gave lots of "Missing reference picture" errors when I tried to transcode. It worked after I processed the .mts files through ffmpeg, just like this: ffmpeg -i video...