plotbitrate icon indicating copy to clipboard operation
plotbitrate copied to clipboard

Per-frame bitrate graph?

Open andreymal opened this issue 3 years ago • 8 comments

The old version of plotbitrate (4553220) painted the bitrate for each frame separately. Although I-frames usually have extremely high bitrate, I find this this graph a lot more informative because it allows me to analyze videos in more detail - such a graph shows well number of B-frames, GOP size, scenecuts and other small details. Unfortunately, I didn't find the same mode in the new version, and if it really does not exist, then it would be good if it appeared again :)

(Oh, it seems this issue is an opposite of #12 :)

andreymal avatar Dec 02 '20 21:12 andreymal

@rezun already added this option in the latest script. Try using the -t option and see if that fits your needs.

zeroepoch avatar Dec 02 '20 21:12 zeroepoch

Unfortunately plotbitrate -t video.mp4 still does not draw per-frame graph

andreymal avatar Dec 02 '20 22:12 andreymal

Oh... sorry, you meant per-frame not per-frame-type. @rezun and I had a discussion about this when we did some major refactoring and most people were expecting the "average" bitrate per/sec rather than "instantaneous" bitrate/sec. The way frame sizes are aggregated now it would be difficult to implement this as an option without having two different code paths. As a short term solution it might be better to use a previous version of the script. Or if you're fine messing with Excel or another plotting tool you can use the -f csv_raw -o out.csv options to save the frame data as a CSV file and play with it from there. If you want a version before these changes, but with threading speed ups try 5ceee64128c59f164ec83781f4766ae88f98b057.

zeroepoch avatar Dec 02 '20 22:12 zeroepoch

Well. I think in most cases the bitrate per second is what people would like to know. I don't have a use case to go by frame but I see how it could be useful and this is a regression. I don't think it would be too much effort to have this as an additional option again. But, painting these separate graphs does take significantly more time. So this option would only be feasible with shorter videos or a time restriction. I'll take a look at it and see what I can do in the next days.

rezun avatar Dec 02 '20 23:12 rezun

Is the bitrate shown the average per second or the maximum?

fa1rid avatar Dec 09 '21 11:12 fa1rid

Or if you're fine messing with Excel or another plotting tool you can use the -f csv_raw -o out.csv options to save the frame data as a CSV file and play with it from there

for csv option, the size is in which unit?

fa1rid avatar Dec 09 '21 11:12 fa1rid

does this tool work properly with variable frame rate?

fa1rid avatar Dec 09 '21 12:12 fa1rid

Is the bitrate shown the average per second or the maximum?

The tool currently shows the average bitrate per second.

for csv option, the size is in which unit?

It's in bytes. It shows the size in bytes of each individual frame.

does this tool work properly with variable frame rate?

Yes, this tool properly supports variable frame rate now.

zeroepoch avatar Dec 12 '21 04:12 zeroepoch