ffmpeg-debug-qp icon indicating copy to clipboard operation
ffmpeg-debug-qp copied to clipboard

Idea: Direct mode without datalog

Open lars18th opened this issue 4 years ago • 2 comments

Hi,

I suggest this idea: Include support for [-l | -k | -n] where -n represents: -n, --no-logfile "not use a logfile, compute directly".

After incorporating my PR #26 (re-adapted to the current code), it will be possible to use the function log_callback() to adapt the output. Then in a direct mode instead of writing to a file, the datalog lines can be passed over the STDIN/STDOUT to the python parser directly. In this case, a chunk of lines are preferable to overcome troubles. In fact, the idea is to buffer a complete frame and flush when it ends (at the line with the pkt_size lable).

What you think?

lars18th avatar Mar 14 '20 07:03 lars18th

Sounds like a good idea. We should modify or buffer the lines so that they're easier to parse.

In principle, if we did that, thinking a bit further, we could also just directly write the CSV and LD-JSON output from the binary. It's only my lack of willingness to do that in C++ that has prevented this so far.

slhck avatar Mar 14 '20 08:03 slhck

Sounds like a good idea. We should modify or buffer the lines so that they're easier to parse.

In principle, if we did that, thinking a bit further, we could also just directly write the CSV and LD-JSON output from the binary. It's only my lack of willingness to do that in C++ that has prevented this so far.

Well, I prefer to leave the option to save the logfile. However, regarding the idea of removing the python code it can be useful. But as you mentioned this will implies a lot of work using C/C++ libraries (for parsing, CSV and JSON support). So, I suggest to first implement this option.

Regards.

lars18th avatar Mar 14 '20 08:03 lars18th