I have a GW192A thermal camera that connects to mobile phones through OTG USB and provides the image through a proprietary mobile app. I'm trying to make a custom app to interface this camera.
Connecting it to a computer shows that it acts as a UVC device and provides the following stream formats:
ffmpeg -list_options true -f dshow -i video="UVC Camera"
[dshow @ 000001414a2ff440] DirectShow video device options (from video devices)
[dshow @ 000001414a2ff440] Pin "Capture" (alternative pin name "0")
[dshow @ 000001414a2ff440] pixel_format=yuyv422 min s=96x176 fps=25 max s=96x176 fps=25
[dshow @ 000001414a2ff440] pixel_format=yuyv422 min s=96x176 fps=25 max s=96x176 fps=25 (tv, bt470bg/bt709/unknown, topleft)
[dshow @ 000001414a2ff440] pixel_format=yuyv422 min s=96x100 fps=25 max s=96x100 fps=25
[dshow @ 000001414a2ff440] pixel_format=yuyv422 min s=96x100 fps=25 max s=96x100 fps=25 (tv, bt470bg/bt709/unknown, topleft)
[dshow @ 000001414a2ff440] pixel_format=yuyv422 min s=96x194 fps=25 max s=96x194 fps=25
[dshow @ 000001414a2ff440] pixel_format=yuyv422 min s=96x194 fps=25 max s=96x194 fps=25 (tv, bt470bg/bt709/unknown, topleft)
[dshow @ 000001414a2ff440] pixel_format=yuyv422 min s=96x216 fps=25 max s=96x216 fps=25
[dshow @ 000001414a2ff440] pixel_format=yuyv422 min s=96x216 fps=25 max s=96x216 fps=25 (tv, bt470bg/bt709/unknown, topleft)
[dshow @ 000001414a2ff440] pixel_format=yuyv422 min s=96x322 fps=25 max s=96x322 fps=25
[dshow @ 000001414a2ff440] pixel_format=yuyv422 min s=96x322 fps=25 max s=96x322 fps=25 (tv, bt470bg/bt709/unknown, topleft)
[dshow @ 000001414a2ff440] pixel_format=nv12 min s=96x96 fps=25 max s=96x96 fps=25
[dshow @ 000001414a2ff440] pixel_format=nv12 min s=96x96 fps=25 max s=96x96 fps=25 (tv, bt470bg/bt709/unknown, topleft)
[in#0 @ 000001414a2ff040]
The 96x96 nv12 stream seems to contain the actual thermal image (before color mapping). The 96x100 and 96x167 yuyv442 seem to contain the thermal image as well (but in some other coding, I don't think it properly conforms to yuyv422) plus possibly some metadata. The other streams (96x194, 96x216 and 96x322) I can neither play nor record with ffmpeg, if I try no frames are received and the capture will be 0kb.
Here are example captures of the 96x96 nv12, 96x100 yuyv442 and 96x176 yuyv442 streams:
https://limewire.com/d/Oiniw#YxIMCGjofO
captured with these commands:
ffmpeg -f dshow -video_size 96x96 -pixel_format nv12 -framerate 25 -i video="UVC Camera" -c:v rawvideo -pix_fmt nv12 -f rawvideo 96x96_nv12.yuv
ffmpeg -f dshow -video_size 96x100 -pixel_format yuyv442 -framerate 25 -i video="UVC Camera" -c:v rawvideo -pix_fmt yuyv442 -f rawvideo 96x100_yuyv442.yuv
ffmpeg -f dshow -video_size 96x176 -pixel_format yuyv442 -framerate 25 -i video="UVC Camera" -c:v rawvideo -pix_fmt yuyv442 -f rawvideo 96x176_yuyv442.yuv
to play them you can use:
ffplay -f rawvideo -pixel_format nv12 -video_size 96x96 -framerate 25 -loop 96x96_nv12.yuv
ffplay -f rawvideo -pixel_format yuyv442 -video_size 96x100 -framerate 25 -loop 96x100_yuyv442.yuv
ffplay -f rawvideo -pixel_format yuyv442 -video_size 96x176 -framerate 25 -loop 96x176_yuyv442.yuv
Here are extracted example frames converted to png:
What I wonder is whether someone can help me understand the 96x100 and 96x176 streams and their encoding. Especially the meaning of the three fields in the 96x176 stream and the bottom left corner seems to contain a row of pixels that are changing. Might this be used to transmit temperature metadata information?