Closed Captions broken with h264_qsv encoder

Description

Summary of the bug:

Ffmpeg 3.2 has -a53cc turned on by default. It works perfectly well when encoding with libx264. Closed Captions from mpeg files are inserted into the resulting mp4, and they can be turned on or off when playing the file in VLC, any other media player or even Apple TV.

3.2 is supposed to include the same functionality when encoding with h264_qsv (Intel QSV hardware acceleration), but it seems to be somehow broken. Captions are included but they are all messed up. Some words show up, some are just gibberish.

Trying to compile 0eac93da. I'm stuck at "./configure --enable-libmxf". I assume it's libmfx instead, but in any case I get "libmfx not found using pkg-config". Sorry. this is all new to me, help much appreciated...

I think you are in the right track. Disabling b-frames (-bf 0) gives a way better result. Not yet perfect, but almost readable. This is what I get (as opposed to the text on comment 11). Please let me know what to try next: