mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-14 13:35:43 +00:00
CCExtractor says no closed captions found in a EIA TS file #322
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rboy1 on GitHub (Jul 18, 2017).
Originally assigned to: @anshul1912 on GitHub.
Using the latest 0.85b build of ccextractor, I tried a sample TS video file with EIA closed captions:
The file can be downloaded from here (sample)
http://streams.videolan.org/streams/ts/Closed%20Caption%20EIA.ts
CCExtractor says no closed captions found
@rboy1 commented on GitHub (Jul 21, 2017):
Any thoughts?
@canihavesomecoffee commented on GitHub (Jul 24, 2017):
Media info says there's a CC stream, but it has no size:
That might explain why CCExtractor cannot extract anything...
@saurabhshri commented on GitHub (Jul 24, 2017):
VLC on the other hand displays the captions just fine, it detects 4 closed caption streams. This looks similar to : https://github.com/CCExtractor/ccextractor/issues/723#issuecomment-292806654 .
Edit : Attaching screenshots.
CC displayed by VLC
Detected streams by VLC
@iha commented on GitHub (Oct 2, 2017):
I don't think this information about stream size from mediainfo makes sense with closed captions, there is another file in vlc samples [0] and the stream size is zero, but ccextractor works. Anyway I'm working in this bug.
[0] http://streams.videolan.org/streams/ts/atsc-cea-708-dtvcc-and-cea-608.ts
@navimakarov commented on GitHub (Dec 6, 2018):
After some work on ccextractor code I found out that the error comes from general_loop.c
I dowloaded file with 0 stream size from issue in task and found out that ccextractor doesn't extract subtitles from problem file because in this particular file pid != datalist->stream_pid. So the obvious solution is to change:
be34781a64/src/lib_ccx/general_loop.c (L909)@cfsmp3 commented on GitHub (Dec 6, 2018):
@anshul1912 I think this was your code, can you take a look?
@navimakarov commented on GitHub (Dec 15, 2018):
@cfsmp3 please note that we use get_best_stream function only in the place I described above. So if @anshul1912 verify this changes we can simple delete this function from ccextractor code completely. By the way, my PR is ready and I'm waiting for changes verification.
@cfsmp3 commented on GitHub (Dec 15, 2018):
@MakarovGCI2018 if we deleted that function then most streams wouldn't work. A requirement of FIXES is not to break more than your fix :-)
@navimakarov commented on GitHub (Dec 15, 2018):
@cfsmp3 Sorry, but I don't really understand what the problem is. I've just deleted this function and tested it on all samples I had and it works great. As I understand, we have this function just in one place but ccextractor works ok without it. We don't call it from any other places so we can delete it. Am I wrong?
@anshul1912 commented on GitHub (Dec 15, 2018):
Let me explain that function.
Get_best_stream keeps the priority of subtitle when multiple subtitles are present, so removing it will work for you but then you mess with priority, you will always select whichever is on top. So I would say no to remove that function, I would suggest you to find why that function is not working. If some subtitle are wrongly reported then we always have option to pass from cmd line which one is needed for selection
int get_best_stream(struct ccx_demuxer *ctx)
{
}
@navimakarov commented on GitHub (Dec 15, 2018):
@anshul1912 thank you for the explanation. I will try to find out why this function doesn't work correct :-)
@navimakarov commented on GitHub (Dec 23, 2018):
There is an interesting thing in this file. They claim that they have some type of subtitle but actually they dont have it. And the function get_best_stream choose this pid as the one with highest priority. In this particular case we have a "fake" pid 7714 and pid, which contains captions with 5154 number.
That's why we have difference between pid and datalist->stream_pid and no captions in input as a result.
But actually, ccextractor doesn't need any changes. In those cases user has to know about this possible problem and use -datapid option.
https://github.com/CCExtractor/ccextractor/blob/master/src/lib_ccx/params.c#L508
So @rboy1 those parameters allow you to get correct output:
[input_file] -datapid 5154 -o [output_file]
@rboy1 commented on GitHub (Dec 23, 2018):
Thanks. As a user how do I know which PID? Isn’t there a way for ccextractor to pick it up automatically like you said if the preferred doesn’t exist but it found another one? In this case skip the fake and take the one indicated since it can read it?
@navimakarov commented on GitHub (Dec 24, 2018):
@rboy as for now we don't support skipping fake pid. By the way, adding this function will increase get_best_stream method time .
You can get best stream pid with external programs(Take a look on mediaInfo where right pid is ID/String, VLC detected streams where pid is Original ID or ffprobe tool). Also you can get info about possible pids using -parsePMT parameter in ccextractor.
@xvkdev commented on GitHub (Dec 24, 2018):
Parsepmt lists all pids.
A possible solution could be to delay selecting the stream until data has
been found.
On Mon, Dec 24, 2018, 09:35 MakarovGCI2018 <notifications@github.com wrote:
@rboy1 commented on GitHub (Dec 24, 2018):
Would it be appropriate to automatically detect the fake ID and then search for the actual ID? It may take longer but that’s better than bypassing it since it’s much more difficult and time consuming to manually search for the actual PID and then restart it. In fact most folks won’t even realize it and will just assume that there no embedded captions since there is error either. Perhaps a cli option to automatically search for fake ID and extract/use the real ID may be make for smoother operation if the searching for the fake ID taking too long is a going to add a significant amount of time (would this be in minutes of seconds?)?
@rboy1 commented on GitHub (Jan 9, 2019):
@MakarovGCI2018 just checking in, would it possible to add a cli command which tells ccextractor to follow the fake pid and extract the real one. It may take a little more time but it'll be super easy for the end user rather than trying to figure out if there are fakes, extracting etc..
@rboy1 commented on GitHub (Nov 15, 2019):
Just checking in if this would be something that would be addressed in .89?
@jshin313 commented on GitHub (Jan 18, 2020):
Is this still an issue? When I run
windows\Debug\ccextractorwin.exe "..\Closed Caption EIA.ts"I get the following:@NilsIrl commented on GitHub (Jan 18, 2020):
works for me on master
@NilsIrl commented on GitHub (Jan 18, 2020):
The output you gave seems to work. It doesn't say "No captions were found in input."
@rboy1 commented on GitHub (Jan 18, 2020):
Yes it appears to be working with the latest release, closing the ticket. Any idea when the next release 0.89 is due?
@cfsmp3 commented on GitHub (Jan 18, 2020):
Wondering why each of those runs have different values for CC type 0
CC type 0: 413 (NTSC line 21 field 1 closed captions)
That's definitely data :-)
Just to confirm, is there an output .srt file that contains something?
On Sat, Jan 18, 2020 at 8:14 AM Nils ANDRÉ-CHANG
notifications@github.com wrote:
@NilsIrl commented on GitHub (Jan 18, 2020):
@cfsmp3 was planning to do it during the Christmas break but apparently it didn't happen.
@NilsIrl commented on GitHub (Jan 18, 2020):
yes, It has captions
@cfsmp3 commented on GitHub (Jan 18, 2020):
Yes, 0.89 was due two weeks ago :-) I guess we'll do it after GCI is over,
so possibly next weekend.
On Sat, Jan 18, 2020 at 8:16 AM rboy1 notifications@github.com wrote: