CCExtractor / ccextractor

CCExtractor - Official version maintained by the core team
https://www.ccextractor.org
GNU General Public License v2.0
705 stars 422 forks source link

CEA-708 is not supported at all for MP4 #158

Closed cfsmp3 closed 9 years ago

cfsmp3 commented 9 years ago

The MP4 code doesn't detect CEA-708, so obviously the decoder doesn't have a chance to process it.

I looked into this a bit and it might not be a lot of work.

We have one MP4 sample that contains 708 (only, no 608) in this directory:

/Chenders

From what I look, the track type is c708 which is correct (however the code in mp4.c skips it). After that, comes the interesting thing. The atom type is not cdat (as the specs say should be for subtitles) but ccpd which is undocumented.

Someone in ffmpeg did some digging and explains here https://trac.ffmpeg.org/ticket/3250

I think that should be enough to put us in the right direction.

okisseloff commented 9 years ago

Spent some time trying to figure out why gpac mistakes calculating samples offsets :) (https://github.com/CCExtractor/ccextractor/pull/159)

Here comes my dev branch of mp4 CEA-708 support https://github.com/kisselef/ccextractor/tree/feature-mp4-c708-support. @cfsmp3 check it please to confirm that this is what you meant. If so, I'll run some more tests and will create a pull request.

xvkdev commented 9 years ago

Haven't tested it but the changes seems reasonable.

About timing, I don't think the problem is with GPAC... we have the same problem with 708 inside MPEG-TS.