Solved Issue - Update FFMPEG To Support ATSC Closed Captions

  Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Closed
svet-am Offline
Junior Member
Posts: 23
Joined: Sep 2012
Reputation: 0
Location: Colorado, USA
Post: #1
Original Thread Here: http://forum.xbmc.org/showthread.php?tid...pid1230598

I've been informed that the lack of ATSC captions stems from a lack of support in the FFMPEG used in XBMC. I'm requesting that FFMPEG be updated if that's the only thing holding this back.

Original Post Text:
I've never seen on-the-fly caption decoding from the video file working either with the built-in MythTV client or with MythBox but I was hopeful that now that MythTV support being claimed as "PVR quality" that it would work. I am working with the latest nightlies of XBMC coupled with the latest from Git repo and I don't see it working.

Is this kind of support even on the roadmap?

I could make a good argument for not supporting captions when MythTV support was claimed as "tangential" and not a primary function but now that the PVR capability (espescially Live TV) is being baked right into the heart of XBMC I (personally) see native closed caption support (eg, straight out of the video video on-the-fly) as a _must_.
(This post was last modified: 2015-07-08 17:28 by Ned Scott.)
find
fiveisalive Offline
Fan
Posts: 382
Joined: Jul 2009
Reputation: 0
Location: United States
Post: #2
As noted in one of the original github requests here:

https://github.com/tsp/xbmc/issues/3#iss...nt-2685231

it appears that MythTV modifies the ffmpeg to enable the subtitles, which could be mirrored in xbmc, specifically:

Quote:Hmm just checked. It looks like the necessary code is in mythtv\libs\libavcodec\mpeg12.c in the function mpeg_decode_user_data

Once this is enabled, then presumably it would allow all PVR add-ons to access the subtitles, so would there be some PVR specific changes (as well as general video changes) needed as well?
(This post was last modified: 2012-11-18 03:51 by fiveisalive.)
find
svet-am Offline
Junior Member
Posts: 23
Joined: Sep 2012
Reputation: 0
Location: Colorado, USA
Post: #3
Now that the Frodo release candidates are rolling out, I'm still not seeing caption support. Given the emphasis on LiveTV functionality in this release, I'm inclined to change this from a "feature request" to a "bug." It's not realistic IMHO to support LiveTV without supporting closed captioning for deaf/hard-of-hearing users.
find
Memphiz Offline
Kodi MVP
Posts: 16,191
Joined: Feb 2011
Reputation: 230
Location: germany
Post: #4
we bump ffmpeg version once in a release cycle because it needs a couple of months before everything works again as expected. So if this is an ffmpeg thing it will hit xbmc once we bump ffmpeg after frodo again.

AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
find
svet-am Offline
Junior Member
Posts: 23
Joined: Sep 2012
Reputation: 0
Location: Colorado, USA
Post: #5
(2012-12-22 01:43)Memphiz Wrote:  we bump ffmpeg version once in a release cycle because it needs a couple of months before everything works again as expected. So if this is an ffmpeg thing it will hit xbmc once we bump ffmpeg after frodo again.

I just checked out the Git repository and started going through the code to see where this would need to be modified. It looks like someone already has an EIA Closed Caption decoder written -- but it's in the DVD player code.

Here's the directory: xbmc\cores\dvdplayer\DVDCodecs\Overlay\libspucc

Can this code be migrated to the at-large video decoder?
find
svet-am Offline
Junior Member
Posts: 23
Joined: Sep 2012
Reputation: 0
Location: Colorado, USA
Post: #6
I am bumping this so that it gets attention for the next XBMC cycle.
find
2twisty Offline
Junior Member
Posts: 8
Joined: Feb 2013
Reputation: 0
Post: #7
Any idea when the FFMPEG will be bumped? This is really an important feature for me.
find
Memphiz Offline
Kodi MVP
Posts: 16,191
Joined: Feb 2011
Reputation: 230
Location: germany
Post: #8
Follow the white rabbit:

http://forum.xbmc.org/showthread.php?tid=156303

But better don't post there if you don't have something development related. Let those people do their work...

AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
find
fetzerch Offline
Team-Kodi Member
Posts: 370
Joined: Jul 2011
Reputation: 19
Post: #9
I think there's a misunderstanding here.
The upstream ffmpeg does not contain the code to get the closed caption data from the stream.

MythTV has patched the version of ffmpeg that they include.

To make this work for xbmc, someone needs to port that patches to xbmc's ffmpeg,
parse the closed caption data and hook it up to the xbmc player code.

MythTV PVR addon - Wiki
find
Memphiz Offline
Kodi MVP
Posts: 16,191
Joined: Feb 2011
Reputation: 230
Location: germany
Post: #10
I correct your statement if you don't mind.

For this to work - someone needs to try hard to push those changes to the upstream development team of ffmpeg. We are against the isle solution in general.

AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
find
svet-am Offline
Junior Member
Posts: 23
Joined: Sep 2012
Reputation: 0
Location: Colorado, USA
Post: #11
(2013-03-07 19:33)cfetzer Wrote:  I think there's a misunderstanding here.
The upstream ffmpeg does not contain the code to get the closed caption data from the stream.

MythTV has patched the version of ffmpeg that they include.

To make this work for xbmc, someone needs to port that patches to xbmc's ffmpeg,
parse the closed caption data and hook it up to the xbmc player code.

I had actually started this and saw that the MythTV code looks like a mess -- there are lots of hacks and apparent spaghetti code in their caption decoder implementation.

That said, as I mentioned above, it looks like XBMC already has caption support as part of the library that is being used in the DVD player for subtitles.
find
basteagow Offline
Junior Member
Posts: 2
Joined: Mar 2013
Reputation: 0
Post: #12
VLC has supported closed captions for a few years now, and it is also FFmpeg-based. Here are some relevant commits:

http://git.videolan.org/?p=ffmpeg.git&a=...ed+caption
http://git.videolan.org/?p=vlc.git&a=sea...ed+caption

The bulk of their initial implementation was based on CCExtractor:

http://git.videolan.org/?p=vlc.git;a=com...a5b1d50435

And here is a sample I recorded that VLC is able to play with closed captions:

https://docs.google.com/file/d/0BwiCIYAN...sp=sharing
find
eman7 Offline
Junior Member
Posts: 12
Joined: Mar 2013
Reputation: 0
Post: #13
I'm new to xbmc - just set up one not too long ago and I've been trying to get closed captioning, subtitles if you will, to work with live TV. If I understood correctly, it's not possible at this point?

I have HDHomeRun and NextPVR configured and I know the subtitles option is enabled on xbmc but I don't get closed captioning. If xbmc doesn't support it, I'd be surprised given the fact xbmc has been around for a while. What are the alternatives?

Thanks.
find
svet-am Offline
Junior Member
Posts: 23
Joined: Sep 2012
Reputation: 0
Location: Colorado, USA
Post: #14
(2013-03-31 00:11)eman7 Wrote:  I'm new to xbmc - just set up one not too long ago and I've been trying to get closed captioning, subtitles if you will, to work with live TV. If I understood correctly, it's not possible at this point?

I have HDHomeRun and NextPVR configured and I know the subtitles option is enabled on xbmc but I don't get closed captioning. If xbmc doesn't support it, I'd be surprised given the fact xbmc has been around for a while. What are the alternatives?

Thanks.

eman7,

You are correct that ATSC captions do not currently work in XBMC. It's also important to note that subtitles != closed-captions. The subtitle support already built into XBMC (and what you are seeing in the GUI) depends upon an external subtitle source, whether it be an .SRT file or a service.

What I am trying to drive through this request is on-the-fly decoding of closed captions from the ATSC video stream.
find
svet-am Offline
Junior Member
Posts: 23
Joined: Sep 2012
Reputation: 0
Location: Colorado, USA
Post: #15
I am bumping this for visibility's sake.

as can be seen here ( http://forum.xbmc.org/showthread.php?tid=143855 ), I started to work on this on my own and needed help and was ignored....

I still think this is a VERY important feature if XBMC wants to claim to support LiveTV _properly_
find
Thread Closed