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.
I basically want a circuit that does what this chip does
... buy that board \$\endgroup\$