Project Eideticker: Difference between revisions

Jump to navigation Jump to search
(→‎Initial prototype: Link to primer on DeckLink cards)
Line 331: Line 331:
Code (and installation/usage docs): https://github.com/markrcote/eideticker
Code (and installation/usage docs): https://github.com/markrcote/eideticker


A [[Project_Eideticker/DeckLink_Primer|primer]] on Blackmagic DeckLink cards.
See the [[Project_Eideticker/DeckLink_Primer|primer]] on Blackmagic DeckLink cards for information on their capabilities and notes on installation, use, and application development.


=== Investigation and Observations ===
=== Status ===


* A call to Blackmagic support indicated that the Blackmagic cards can only capture from broadcast standards, e.g. 1080p at the standard 1920x1080, 720p at 1280x720, etc.
* Captures 1080p60 output from the LG phone at 8-bit YUV 4:2:2 to a raw video file.


* It seems that the Transformer does ''not'' output at a standard resolution.  I was unable to capture from it with any input setting.  My TV is able to display it; however, the display is cropped, lending credence to this theory.  Blackmagic support said that many mobile devices do not output at broadcast standards.
* Transforms raw video into a compressed AVI and a zipped archive of PNG images, one per frame.


* The LG phone does have standard outputs; in fact, you can choose the output format (although only two of the options are supported by the capture card).
* Controlled by a web interface, which can also serve the capture files.
** I was able to capture uncompressed video at both 720p and 1080p using Blackmagic's MediaExpress software.  At 720p, the video recorded flawlessly, at least while browsing a few pages.  At 1080p the machine lost frames, apparently due to disk speed (despite the SSD).  However there's no reason to believe we can't make it work with an even faster disk.  The software and docs certainly imply that it shouldn't be a problem with a high-end machine.
** None of the HDMI output resolutions (1920x1080 and 1280x720) match the phone's screen's resolution (480x800).  It appears that the image is scaled; it takes up the full vertical resolution but maintains aspect ratio and thus has large black bands on either side.  It appears that this scaling is done by the phone after applications render the output to the screen.  This means it isn't a pixel-perfect representation of what is on the screen and thus what Firefox calculates and displays.
** I captured a couple frames and converted them from Targa to PNG.
*** [http://people.mozilla.com/~mcote/eideticker/frames/mozilla.org-screenshot-720p.png Single output frame at 720p]
*** [http://people.mozilla.com/~mcote/eideticker/frames/mozilla.org-screenshot-1080p.png Single output frame at 1080p]


=== The SDK ===
* Unable to use the DeckLink with the Transformer since the latter does not output at a broadcast standard.  I believe it outputs at its screen resolution (1280x800).


* Blackmagic provides an SDK to develop custom DeckLink applications for Windows, OS X, and Linux.  It comes with several sample programs.  The "Capture" program, in particular, is largely what we need.  It can record to raw video files in a variety of formats.
=== The Phone ===


* I was able to record raw 720p and 1080p video at 8-bit YUV (4:2:2) and play it back with mplayerI have been able to record at 10-bit YUV, but it uses a special blackmagic codec that I haven't yet been able to play back yet, but I'm sure it's just a case of finding the right incantation.
* Its screen is 480x800, but there is no option to output at this resolution on the HDMI portA variety of standard formats are available.


* The SDK, for some reason, does not seem to support RGB (i.e. no subsampling) at 1080p.  Only 8- and 10-bit YUV (4:2:2) are supported.  This is strange, given that MediaExpress can output 10-bit RGB, albeit as an image sequence.  I'll have to talk to support about this.
* It must be scaling (and potentially converting) the output at some level below the application layer.


* The effect of 4:2:2 subsampling on Firefox's output is currently unknown.
=== Issues and Concerns ===


=== Issues and Concerns ===
* Full RGB capture appears to be impossible.  As noted in the [[Project_Eideticker/DeckLink_Primer|primer]], the DeckLink card ''cannot'' capture 8-bit nor 10-bit RGB at 1080p60, nor can it capture 8-bit RGB at 720p60.  It ''can'' supposedly capture 10-bit RGB at 720p60; however, when in this mode the card cannot find an input source when the phone is connected and outputting at 720p.  Perhaps the card itself is outputting at YUV 4:2:2, if that's possible.
 
* Full screen resolution also appears to be impossible.  The phone's screen is 800 pixels high, but the HDMI output is restricted to HDMI standards (1080, 720, etc.).  Furthermore the card can only capture broadcast standards, even if the phone could output at 800 pixels (as the Transformer appears to).


* An exact 1:1 mapping of the pixels of the captured output to the pixels calculated and displayed to the phone's screen appears to be impossible with the current hardware configuration.  I am uncertain of the exact ramifications of this on the project's goals.
* Thus an exact 1:1 mapping of the pixels of the captured output to the pixels calculated and displayed to the phone's screen is not possible with the current hardware configuration.  I am uncertain of the exact ramifications of this on the project's goals, but there are probably some tasks that can be accomplished even with this inexact capture of screen output.
** Theoretically an HDMI-capable device with a screen exactly 720 or 1080 pixels high (or wide) should output a pixel-by-pixel match.  Alternatively, there may exist capture cards that can capture at any resolution, which would have to be paired with a device that can output at exactly its screen's resolution (e.g. potentially the Transformer but not the LG).
** Theoretically an HDMI-capable device with a screen exactly 720 or 1080 pixels high (or wide) should output a pixel-by-pixel match.  Alternatively, there may exist capture cards that can capture at any resolution, which would have to be paired with a device that can output at exactly its screen's resolution (e.g. potentially the Transformer but not the LG).
** Alternatively, perhaps it would be possible to hack a device to treat its HDMI output as primary.
** Alternatively, perhaps it would be possible to hack a device to treat its HDMI output as primary.


* In effect, capturing any device's output with the DeckLink card is the same as capturing any desktop's output, since the card can only capture standard formats at their full resolution.
* At 1080p YUV 4:2:2, there is no frame skipping.  However disk speed could become an issue if we somehow manage to capture full RGB output.
** This shouldn't be an issue with a sufficiently fast disk.
** This shouldn't be an issue with a sufficiently fast disk.
** Also, perhaps a custom app could record only the pixels of interest, since most of each frame is black.  There would probably be a CPU-disk speed tradeoff here.
** Also, perhaps a custom app could record only the pixels of interest, since most of each frame is black.  There would probably be a CPU-disk speed tradeoff here.
Confirmed users
1,927

edits

Navigation menu