Opened 6 years ago
Last modified 6 years ago
#5969 new defect
Closed Captions broken with h264_qsv encoder
Reported by: | Sawgr | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | git-master | Keywords: | cc QSV |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
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.
How to reproduce:
% ffmpeg.exe -i "Test.ts" -f mpegts -c:v h264_qsv -c:a:0 libmp3lame -b:a:0 128k Out2.mp4 ffmpeg version N-82579-g28d8789 built on 20161120
Attachments (3)
Change History (17)
by , 6 years ago
comment:1 by , 6 years ago
Original MPEG TS: https://www.datafilehost.com/d/2023377c
libx264 encoded file (right Captions): https://www.datafilehost.com/d/afe2151a
h264_qsv encoded file (wrong Captions): https://www.datafilehost.com/d/12552886
comment:2 by , 6 years ago
Keywords: | cc added; Captions removed |
---|
comment:4 by , 6 years ago
I'm kind of new to this, so I don't really have an answer to that... Any way I can help?
comment:5 by , 6 years ago
Checkout the relevant version, compile it and test with -a53cc 1
$ git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg $ cd ffmpeg $ git checkout 0eac93da $ ./configure --enable-libmxf $ make ffmpeg
follow-up: 7 comment:6 by , 6 years ago
Or please test this binary:
https://ffmpeg.zeranoe.com/builds/win32/static/2015/ffmpeg-20151130-git-7b11eea-win32-static.7z
comment:7 by , 6 years ago
Replying to cehoyos:
Or please test this binary:
https://ffmpeg.zeranoe.com/builds/win32/static/2015/ffmpeg-20151130-git-7b11eea-win32-static.7z
This binary gives me a "Unknown encoder 'h264_qsv' " error. I'm going to try and compile build 0eac93da
comment:8 by , 6 years ago
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...
comment:9 by , 6 years ago
Still stuck. Can anybody help me compile 0eac93da and I'll do the testing? Thanks
comment:10 by , 6 years ago
Please test this binary:
https://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-20160301-git-1c7e2cf-win32-static.7z
comment:11 by , 6 years ago
Thanks. Tested with different samples, -a53cc enabled. Captions still come up totally messed up. Timing is also incorrect. Here's a transcript of the first few seconds:
1
00:00:00,735 --> 00:00:03,102
m go m hogeme
oo smen Ian s can
2
00:00:04,905 --> 00:00:07,573
eal th teahi oka ty?kaWe
nyto afoonnynor llw, aht rll?h y
3
00:00:09,043 --> 00:00:10,576
Ok, yeahOk
loahI veoulo yo.ouoo
comment:13 by , 6 years ago
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:
1
00:00:00,768 --> 00:00:02,001
I'm gonna get home
s s sas Ian
2
00:00:02,103 --> 00:00:03,235
toeaeaeawith this, okay?
3
00:00:03,337 --> 00:00:04,903
We can deal with thitogeer.
4
00:00:05,006 --> 00:00:07,706
Just don't say anything
to anyone r w, all right?
Log Report