Opened 4 years ago

Closed 4 years ago

#12546 closed Patch - Feature (Duplicate)

Captions not recognized in MPEG-4 recordings

Reported by: gravityhammer@… Owned by:
Priority: minor Milestone: 0.28
Component: 3rd Party - FFMPEG Version: 0.27.5
Severity: medium Keywords: MPEG-4 captions
Cc: Ticket locked: no

Description (last modified by Karl Egly)

Comcast recently moved to MPEG-4 encoding on many channels here, and Myth is unable to recognize that there are captions in the file. VLC plays the captions.

From mediainfo: Text #1 ID : 4268 (0x10AC)-CC1 Menu ID : 1 (0x1) Format : EIA-608 Muxing mode : SCTE 128 / DTVCC Transport Muxing mode, more info : Muxed in Video #1 Duration : 1h 2mn Bit rate mode : Constant Stream size : 0.00 Byte (0%)

Text #2 ID : 4268 (0x10AC)-1 Menu ID : 1 (0x1) Format : EIA-708 Muxing mode : SCTE 128 / DTVCC Transport Muxing mode, more info : Muxed in Video #1 Duration : 1h 2mn Bit rate mode : Constant Stream size : 0.00 Byte (0%)

Text #3 ID : 4268 (0x10AC)-2 Menu ID : 1 (0x1) Format : EIA-708 Muxing mode : SCTE 128 / DTVCC Transport Muxing mode, more info : Muxed in Video #1 Duration : 1h 2mn Bit rate mode : Constant Stream size : 0.00 Byte (0%)

A clip of a problematic recording is here: http://www.filetolink.com/4bd9ced67e

mythbackend --version Please attach all output as a file in bug reports. MythTV Version : 68e51d6fd4fa25e985b21cb3a5b5ca6fce9aca9d MythTV Branch : fixes/0.27 Network Protocol : 77 Library API : 0.27.20151025-1 QT Version : 4.8.5 Options compiled in:

linux release use_hidesyms using_alsa using_oss using_backend using_bindings_python using_bindings_php using_frontend using_hdhomerun using_ceton using_hdpvr using_ivtv using_libcrypto using_libfftw3 using_libxml2 using_libudf using_mheg using_opengl using_opengl_video using_qtwebkit using_qtscript using_qtdbus using_taglib using_v4l2 using_x11 using_xrandr using_xv using_mythlogserver using_bindings_python using_bindings_php using_mythtranscode using_opengl using_vdpau using_ffmpeg_threads using_mheg using_libxml2 using_libudf

Attachments (1)

h264-captions.patch (14.1 KB) - added by jpoet 4 years ago.
Add H.264 embeded caption decoding

Download all attachments as: .zip

Change History (13)

comment:1 Changed 4 years ago by J.Pilk@…

VLC codec info lists 117 streams; closed caption 1 shows severely garbled text. VLC 2.2.2

The lack of subtitles doesn't seem the worst feature of this horrific clip.

I don't get audio in VLC.

comment:2 Changed 4 years ago by gravityhammer@…

Thanks for the response. It's obvious I clipped it wrong - I used this command format:

ffmpeg -i input -ss 00:00:30.0 -c copy -t 00:00:10.0 output

Is that incorrect / is there a better way to clip it?

Would it be best if I put the whole file on my Google Drive to share?

comment:3 Changed 4 years ago by J.Pilk@…

There's more than enough for my taste, but:

#to skip 35 Mb from start of file and transfer 40 Mb as a test

dd bs=1M skip=35 count=40 if=2506_20070123200000.mpg0 of=2506_20070123200000.mpg

comment:4 Changed 4 years ago by gravityhammer@…

Great! Thanks!

This clip works a lot better: Link

comment:5 Changed 4 years ago by J.Pilk@…

Yes, and the goriest bits have gone. I've played it as a video on today's *buntu trusty ppa download and could find no subtitles - but I rarely use them and, being in the UK, may not have the full set-up for what VLC says is cc1. Castilian Spanish (track 2) sounds quite English, though.

comment:6 Changed 4 years ago by jpoet

A co-worker of mine came up with this patch a while back. It is against the 0.27 version of Myth. Unfortunately, I don't believe it was ever submitted upstream to ffmpeg, but I am guessing it would solve your problem...

Changed 4 years ago by jpoet

Attachment: h264-captions.patch added

Add H.264 embeded caption decoding

comment:7 Changed 4 years ago by Phil Bridges <gravityhammer@…>

OK - stupid question. How do I apply this patch?

I put the file in /usr/bin ran patch -p0 < h264-captions2.patch

I get: can't find file to patch at input line 11 Perhaps you used the wrong -p or --strip option? The text leading up to this was:


|commit 4dd789efdce70c969b283642f1a484fd585e183b |Author: rkrishna1 <sun.radha@…> |Date: Wed Nov 6 21:04:26 2013 +0530 | | Add H264 Caption extraction | |diff --git a/mythtv/external/FFmpeg/libavcodec/h264.c b/mythtv/external/FFmpeg/libavcodec/h264.c |index 8c0544a..f464364 100644

a/mythtv/external/FFmpeg/libavcodec/h264.c

|+++ b/mythtv/external/FFmpeg/libavcodec/h264.c


File to patch:

comment:8 Changed 4 years ago by Stuart Auchterlonie

Milestone: unknown0.28
Owner: set to jpoet
Status: newassigned
Version: UnspecifiedMaster Head

comment:9 Changed 4 years ago by Stuart Auchterlonie

Version: Master Head0.27.5

comment:10 Changed 4 years ago by Karl Egly

Component: MythTV - General3rd Party - FFMPEG
Description: modified (diff)
Keywords: MPEG-4 added; MP4 removed
Owner: jpoet deleted
Status: assignednew
Summary: Captions not recognized in MP4 recordingsCaptions not recognized in MPEG-4 recordings
Type: Bug Report - GeneralPatch - Feature

Unassigning as per http://lists.mythtv.org/pipermail/mythtv-users/2015-November/383200.html This feature patch against FFmpeg needs someone who adopts it and submits it upstream. Then it'll land in MythTV with the next FFmpeg sync.

Any volunteers?

comment:11 Changed 4 years ago by Karl Egly

Status: newinfoneeded_new

comment:12 Changed 4 years ago by paulh

Resolution: Duplicate
Status: infoneeded_newclosed

Duplicate of #11932.

Looks like the last FFmpeg sync to 2.8 added support for H264 closed captions so this is no longer required.

Note: See TracTickets for help on using tickets.