openframeworks / openframeworks/openFrameworks
AVFoundation player doesn't load HDV ( non-square pixels ) correctly.
@ofTheo is already working on this.
Since Feb 23, 2016.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
https://forum.openframeworks.cc/t/issues-with-pixel-ratios-in-ofvideoplayer/22120/10
Test video is here:
https://www.dropbox.com/sh/t2rezaeeghyj581/AAAAkGZvI6uJmG6KYOKEFCNUa?dl=0
On initial research the way to get the true size of the frame is:
CVImageBufferRef imageBuffer = [videoPlayer getCurrentFrame];
int realW = CVPixelBufferGetWidth(imageBuffer);
int realH = CVPixelBufferGetHeight(imageBuffer);
The problem is that this info comes in later ( once the first frame is delivered ).
So for texture playback we need to change the texture coords based on the difference between the reported width ( 1920 ) and the pixel width ( 1440 )
For getting the pixels out we would need to figure out whether we should return the pixels as they are ( 1440 x 1080 ), or scale the pixels up which would add overhead.
ping @i-n-g-o @openframeworks/macos
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.