MediaArea / MediaInfoLib

Convenient unified display of the most relevant technical and tag data for video and audio files.
https://mediaarea.net/MediaInfo
BSD 2-Clause "Simplified" License
616 stars 169 forks source link

Feature Request: Screen Subtitle PAC / FPC Support #1945

Open joe-sciame-wm opened 6 months ago

joe-sciame-wm commented 6 months ago

Hi Jerome,

We are working on large international library that contains a set of FPC and PAC subtitle files. Currently, MediaInfo returns no information so we aren't able to validate them using MediaConch. I'd like to be able to return the following for validation

In the files I have, I'm noticing that the contents have a metadata blurb as the first cc. We wouldn't want that returned as text, but that's where metadata could be pulled from.

1 00:00:00,000 --> 00:00:00,267 {\an4}STORY: LANG: TUR TITLE: SubsAndBlips EPS: Parts ABC

1 00:00:00,000 --> 00:00:00,267 {\an1}STORY: . LANG: RUS. TITLE: Subs And Blips Cyrillic. EPS: 1Track Parts A B C

2 01:00:00,000 --> 01:00:00,033 First Frame of Video. FRAME 720

General Count : 348 Count of stream of this kind : 1 Kind of stream : General Kind of stream : General Stream identifier : 0 Complete name : ESD_933410B_FRA.PAC Folder name : /PAC_VTT_TESTING/French_FRA File name extension : ESD_933410B_FRA.PAC File name : ESD_933410B_FRA File extension : PAC File size : 5397 File size : 5.27 KiB File size : 5 KiB File size : 5.3 KiB File size : 5.27 KiB File size : 5.271 KiB Stream size : 5397 Stream size : 5.27 KiB (100%) Stream size : 5 KiB Stream size : 5.3 KiB Stream size : 5.27 KiB Stream size : 5.271 KiB Stream size : 5.27 KiB (100%) Proportion of this stream : 1.00000 File last modification date : 2021-01-27 00:44:26 UTC File last modification date (local) : 2021-01-26 19:44:26

JeromeMartinez commented 5 months ago

Checking PAC/FPC examples is seems not complicated and we could do as with other text formats, but examples don't match with the example you provide, please send a couple of file (compressed and not compressed) for being sure we talk about the same kind of content.

joe-sciame-wm commented 5 months ago

Hi @JeromeMartinez Sent samples via email.

JeromeMartinez commented 5 months ago

Checking the file format, I find no spec and the first project I found actually does not handle the files (it seems buggy in addition to lack of support of Python3), but I see that SubtitleEdit supports the files well and source code is available (and is a nightmare e.g. about codepage detection), so doable.

Checking metadata blurb, I see no specific magic value (the an4 stuff is ASS style formating), it seems that we'll have to do some empirical tests e.g. about the duration of the first item and catching some magic words.

But I wonder what is the meaning of "EPS" as well the logic behind "First Frame of Video FRAME 720" with a time code of "01:00:00:00" + "FRAME 3600" with a time code of "01:02:00:00", it makes no sense to me, could you explain what you expect from that?

joe-sciame-wm commented 1 month ago

Adding to this base on the email thread: