-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Count decoded pixels. #147
Conversation
This allows for a decodeo-only flow.
Ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚢
@darkdarkdragon Yeah the current plan is for B to check the pixel count for each transcoded result. This will be async (see this discussion thread). I'm interested in how this impacts the benchmarking results you've been doing and whether the performance hit is acceptable for now. |
@darkdarkdragon Correct, in the short term, we will probably end up being CPU constrained rather than memory constrained on broadcast nodes. It'll be interesting to see exactly how much this affects our capacity on hardware that would otherwise be memory-limited. This shouldn't be a blocker for anything right now though. FWIW, it takes roughly 100-120ms to decode a 8-second video on my i7 Macbook Pro using software decoding. Cloud GPUs should be in that ballpark. Resolving the LPMS bottleneck should help decoder performance as well. For the future we have a few possible ways to mitigate the performance impact here:
|
@j0sh as I understand, we need only number of frames? Can we parse video stream without decoding actual video data? |
@darkdarkdragon We would need at least the resolution of each frame as well, since each frame could potentially have a different resolution. Rather than return a long list of frames, we just return a sum of pixels for the segment. This certainly isn't foolproof from a verification perspective, but the goals here are mostly around reconciliation for PM accounting, rather than verification. It is possible that we parse the bitstream and extract the necessary information needed to determine the number of pixels, without going through a full decode (in H.264 this is mostly the macroblock count, eg |
@j0sh thanks for the explanation! I didn't know that
Another reason to from FFmpeg, but certainly not now. |
The GetMediaInfo function in go-livepeer becomes:
This could be further specialized to return pixels only, rather than a generic struct, because go-livepeer not likely to need the frame count.
Fixes #125