ccextractor icon indicating copy to clipboard operation
ccextractor copied to clipboard

[PROPOSAL] - Structured data JSON output of ccextractor -out=report

Open bbgdzxng1 opened this issue 2 years ago • 2 comments

Would you be kind enough to consider extending ccextractor -out=report to export a JSON output so that the output of the ccextractor analyser can be machine readable without a custom parser? This would mean that an external structured data parser such as jq can be used to parse / filter the output.

Similar to:

$ ffprobe -show_streams -print_format json -i INFILE | jq .
$ mediainfo -full --Output=JSON INFILE | jq .

eg something like...

$ ccextractor --output-format json_templatev1 -out=report INFILE | jq .

Obviously, it would require the definition of a schema, and the data structure of all the potential outputs of ccextractor may need to be extended in the future (hence proposal of versioning the schema), but it would seem like useful functionality for anyone who uses ccextractor in an automated environment. I suspect there is already a defined data structure internal to ccextractor anyway.

Thanks!

bbgdzxng1 avatar Dec 07 '21 18:12 bbgdzxng1

We'll be happy to accept pull requests or sponsorship for this to happen :-)

cfsmp3 avatar Dec 07 '21 18:12 cfsmp3

Hey, I wanted to work on this issue. But I'll need a little bit direction regarding this. Currently ccextractor ~/Downloads/cc/COMEDY.ts -out=report is giving this output

And with comparison with mediainfo -full --Output=JSON INFILE | jq command's output, the CCExtracter output is quite less.

So, I wanted to know that is there any part of code in ccextracter has these type of information provided but not used here, so that i can use that & make a informative report from that. Or Should i just wrap the current ccextracter output to Json format and print to STDOUT or create it to another file. (that would be quick, if you say so)

IshanGrover2004 avatar Dec 29 '23 17:12 IshanGrover2004