1
\$\begingroup\$

How can I capture photos and videos (JPEG and MPEG4 respectively) taken from an NTSC camera to an SD card and also log text data to it?

I am working on a project in which I need to log analog data from sensors in the form of a csv or txt file to an SD card continuously (I would say every second or so). I also need to record video or photos to the SD card every so often (when the appropriate signal is given to the microcontroller by the user). I know many digital cameras, consumer drones, and other devices can save photos/videos to an SD card and also access settings and save other data to the SD card, so it must be possible.

I know that NTSC video can be saved to an SD card in MPEG4 format, as this circuit does exactly that. One of the chips on this board is an NTSC to BT.656 decoder. The other IC on the board is sharpied out, however, and I'm not sure how they compress the BT.656 video to MPEG4 and save it to an SD card. I assume they use a microcontroller fast enough to compress the raw BT.656 video output from the first IC to MPEG4 and then save it to the SD via SPI.

Could a possible solution to my problem be to use this decoder and then program an ARM or other powerful microcontroller to compress the BT.656 video to MPEG4 and then save it to the SD card? Or for photos just take a frame of the raw video and convert that to JPEG to save to SD? While the microcontroller is dealing with video or photos the sensor data could be logged to EEPROM by the aforementioned sensory/user input microcontroller, and then when the video/photo processing microcontroller isn't saving photos or videos it could catch up on logging the sensor data it missed to the csv/txt file. If this could work I would have to do more research on how video codecs are programmed so that I could compress the BT.656 in code. Hopefully someone has some insight as to whether I should go down this path.


Note: please don't offer solutions that involve not designing such a circuit. I know there are solutions that I could buy to do this job, however I am looking to create my own design that I can tailor to the capabilities that I need. Furthermore, a question asking for recommendations on products to buy does not comply with this site's rules, and this is not what this question is asking for. I would greatly appreciate an answer that gave insight into the conventions for saving video/photos to SD cards and that detailed whether or not my proposed plan could work. Thank you in advance to anyone willing to share their knowledge on this subject.

I have edited this question to remove confusing background information and to make the question more specific and less broad. In researching this problem I have found few online resources with relevant information so I hope this question will be reopened to allow for the chance for useful information pertaining to this question to be made available to users of this site and to internet users in general.

Finally, if this question would be more appropriate on signal processing stack exchange please let me know and I will move the question there.

\$\endgroup\$

closed as too broad by Chris Stratton, Sparky256, PeterJ, Dave Tweed Jan 1 '18 at 12:51

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    \$\begingroup\$ I basically want a circuit that does what this chip does ... buy that board \$\endgroup\$ – jsotola Dec 30 '17 at 22:14
  • \$\begingroup\$ Don't build what you can buy. The more costly Raspberry Pi boards have video, audio, USB and Ethernet built in, plus a slot for a SD card. And an expansion slot for hobbyist. \$\endgroup\$ – Sparky256 Dec 31 '17 at 4:47
  • \$\begingroup\$ @Sparky256: No, you really don't want to use a raspberry pi for this. \$\endgroup\$ – Chris Stratton Dec 31 '17 at 7:09
  • 1
    \$\begingroup\$ use an 8266: you can log data to it's 3MB SPIFFS and AV to the SD. and it's 3.3v and tiny. \$\endgroup\$ – dandavis Dec 31 '17 at 16:20
  • \$\begingroup\$ @dandavis: How would I save the AV to the SD card? Is the 8266 fast enough to read the video data and write it to the SD with SPI? \$\endgroup\$ – Murey Tasroc Dec 31 '17 at 18:47