mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-03 21:23:48 +00:00
[BUG] Empty srt file being generated for a ts file linux #488
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 @gigatesseract on GitHub (Mar 8, 2019).
Please prefix your issue with one of the following: [BUG]
CCExtractor version (using the --version parameter preferably) : 0.87
In raising this issue, I confirm the following (please check boxes, eg [X] - and delete unchecked ones):
My familiarity with the project is as follows (check one, eg [X] - and delete unchecked ones):
Necessary information
-autoprogram**Video links (replace text below with your links) **
sample .ts file
Additional information
I built the linux ccextractor version 0.87. I tried to extract cc in the sample .ts file above (a sample file given by videolan). The command I used was simply
./ccextractor <filename>. Only an empty ts file is generated. However, VLC media player plays it just fine.@thelastpolaris commented on GitHub (Mar 8, 2019):
Seems that the problem is with .ts decoding stuff in ccextractor, as I converted your .ts file to mp4 and ccextractor extracted subtitles.
@gigatesseract commented on GitHub (Mar 8, 2019):
@thelastpolaris Ah yeah, The srt file is generated properly for .mp4. There is some problem with the .ts decoder 👍 😳
@thelastpolaris commented on GitHub (Mar 8, 2019):
Ok, so if you try to to convert .mp4 file back to ts without reconverting the video (
ffmpeg -i 1077.mp4 -codec copy 1077.ts) it extracts subtitles. Also, if you check with your original file withffmpeg -i orig_1077.tsyou fill find that there are a lot of kinda empty tracks.@thelastpolaris commented on GitHub (Mar 8, 2019):
@gigatesseract So depending on the definition, the problem is either in your sample or in ccextractor way of handling .ts files with strange programs :)
This is
ffmpeg -ioutput for your original sample https://pastebin.com/mW6EhPkC, from which ccextractor can't extract subtitles even if I pass-pn 358as a parameter (program number for real stream).https://pastebin.com/MdXAnduG this is description of the file I created with ffmpeg by creating 2 programs and copying video and audio streams to them. Normally, ccextractor will ask you from which program to extract subtitles but in case of your original sample, I guess, ccextractor fails to do that because of
No Programprogram with a lot of empty and unknown streams.So solution for you is to repack your .ts file with ffmpeg and preserve closed captions (
ffmpeg -i 1077.ts -map 0:p:358 -c:v copy 1077_copy.ts).@cfsmp3 should we consider behavior when ccextractor doesn't work with .ts file that has
No Programprograms as incorrect one?@cfsmp3 commented on GitHub (Mar 8, 2019):
@thelastpolaris in general if there's a way to get the subtitles (ffmpeg can do it, VLC can do it, any player can do it, etc) but we are unable to get them, assume it's a problem in CCExtractor.
Saying that the sample doesn't have programs doesn't help the user :-) He just has a sample that contains subtitles and wants CCExtractor to extract them for him.
@gigatesseract commented on GitHub (Mar 11, 2019):
@thelastpolaris @cfsmp3 Thank you for looking into the issue. 😄