bitrate-plotter icon indicating copy to clipboard operation
bitrate-plotter copied to clipboard

Minor fix for current ffprobe

Open clort81 opened this issue 1 year ago • 1 comments

in ffprobe_out_parser.py i had to change the parser for ffprobe output.

    for line in io.TextIOWrapper(process.stdout, encoding="utf-8"):
        ## ffprobe will return the time in ms and the size in bytes.
        if line.strip():  # Check if the line is not empty                                                                                                                       
            dts_time, packet_size = line.strip().split(",", 2)[:2]   # grab only 2 fields
             # original bad code dts_time, packet_size = line.strip().split(",")

It was choking on empty lines and for some reason ffprobe was returning lines with a trailing comma. This gets past that problem.

Thanks for the real hepful tool!

clort81 avatar May 07 '24 22:05 clort81

Feel free to open a pull request and you can be listed as a contributor of this tool :)

CrypticSignal avatar May 09 '24 17:05 CrypticSignal