Open PyCoder040 opened 1 year ago
UPDATE (much closer, but still not working)
Using this https://github.com/szatmary/libcaption which injects 608/708 into FLV files, I was able to get a non-zero-length MCC file from the same source files as above. I'm yet to figure out why though. The file looks valid, but when you play it back the captions are present but the timing is shot. All captions stay up for exactly one frame then move on to the next one. So unless you are an incredibly fast speed reader, you're out of luck. BTW, VLC plays 2.flv and 3.mp4 just fine and the captions are shown at the correct speed.
ffmpeg -y -i HyperDeck_0002.mp4 -codec copy -f flv 1.flv
./flv+srt 1.flv HyperDeck_0002.srt > 2.flv
ffmpeg -y -i 2.flv -codec copy 3.mp4
ccextractor 3.mp4 -out=mcc -o 4.mcc
Improper high speed playback can be confirmed by having ffmpeg convert the MCC to SRT. The srt shows all times at just a counter+33 milliseconds (all captions are just output on the very next frame of video). In all cases, simply changing -out=srt proves the input files are being read, and all timing is being understood. Simply MCC output seems to be broken.
ffmpeg -i HyperDeck_0004scc.mcc zzz.srt
1
00:00:01,104 --> 00:00:03,379
after the off on this event.
2
00:00:03,390 --> 00:00:03,845
Okay. and.
3
00:00:03,856 --> 00:00:05,934
>> But unsolicited Talk about
4
00:00:05,968 --> 00:00:07,349
passwords are hey, summer is
CCExtractor detailed version info Version: 0.94 Git commit: 5b7666965fa92735eba8953d8acda7ba4f7ef220 Compilation date: 2023-06-07 CEA-708 decoder: Rust File SHA256: Could not open file
Libraries used by CCExtractor Tesseract Version: 5.2.0 Leptonica Version: leptonica-1.82.0 libGPAC Version: 1.0.1 zlib: 1.2.11 utf8proc Version: 2.4.0 protobuf-c Version: 1.3.1 libpng Version: 1.6.37 FreeType libhash nuklear libzvbi
In raising this issue, I confirm the following:
Necessary information
So testing my input I get valid captions
But when I try to switch the output format to MCC, I get a fatal error message:
After reviewing the code (ccx_encoders_common.c), I see that this error can be generated when a 608 caption is to be stored in a MCC format. This leads me to believe that I can output MCC files as long as the input is not considered to be 608. I don't see where I can declare my payload to be non-608. So I think I'm just doing this wrong. Do I need to provide 708, or can I tell ccextractor to "convert" to 708?
My input file was created by using subrip2scc.pl to convert a SRT into SCC. Then I used scc2raw.pl to convert the SCC into a McPoodle RAW file. I think that maybe this is creating a standard definition (608) caption file? Anyway, that's what I fed into ccextractor as shown above.
If I'm unknowingly making a 608-only file, this may be where I'm going wrong. I need 708 captions to feed into ccextractor to get a MCC file.
Is it possible for someone to post a working example of a commandline producing a valid MCC output file?
P.S. I have also tried this with the 0.94 release version. No difference.
As a second test, I took an entirely different approach. I injected a SRT into a MP4 using ffmpeg. VLC will show these captions all day long. But when fed to ccextractor, the captions are seen if specified in -stdout, but if you add the MCC output, you get a zero length mcc file.