September 24, 2017, 09:42:35 pm
News:
Pages: [1]
Print
Author Topic: Automated capture to card from composite input? Detect activity?  (Read 2432 times)
willygsd
Newbie
*
Posts: 1


View Profile
« on: December 27, 2010, 05:01:26 pm »

Hi,

The OSD project sounds really interesting.

I would like to use the OSD to capture video to a card from a camera.

Ideally, the OSD would start capturing video when a video signal became present, and stop recording when the signal is turned off.

The application would not have a screen and not be connected to a pc.  So, I would need very little or no user control.

I see that there is a serial port on the OSD. Would it be possible to have the OSD start recording on a message through the serial port and stop capture with another message?

I am an experienced programmer and would be able to do  some modification to code, but would prefer to not have to spend weeks wading through code and rebuilding the system to make it happen.

Any help or guidance would be appreciated,

Willy

Logged
ChadV
Administrator
Hero Member
*****
Posts: 1611


View Profile WWW
« Reply #1 on: December 29, 2010, 09:12:43 pm »

None of what you're asking about has been done yet.

Yes, you can send console commands (VT100 terminal over serial, I believe) through the serial port, and you can start and stop recording through the console.
Logged
heyrick
Global Moderator
Sr. Member
*****
Posts: 340



View Profile WWW
« Reply #2 on: January 01, 2011, 02:58:00 pm »

I am an experienced programmer and would be able to do  some modification to code, but would prefer to not have to spend weeks wading through code and rebuilding the system to make it happen.

The problem is, while such a facility might be useful, there is actually very little need for this sort of thing in a video recorder (I can't think of one single domestic tape-based VCR I've ever owned that would do such a thing)...


However... All is not lost. ChadV says it is possible to start and stop recording from the command line (the exact commands will be on the forum someplace).

Here is something from the sources:
  /** check to see if video signal is available.
   *
   * @return
   *      0 if not present, 1 if present.
   */
  int CoolVideoIsPresent(void)
  {
     static int fd_vs = -1;
   int st_vs = FALSE;
   
   char buf[2];
   int count;
   
   if(fd_vs < 0)
   {
      if ((fd_vs = open("/proc/tvp5150", 0)) < 0)     
      {       
         goto bail;
      }     
   }
   lseek(fd_vs,0,0);
   count = read(fd_vs,buf,1);
   
   if(count <=0) goto bail;
   
   buf[1]=0;
   
   if(strcmp("0",buf)==0)
   {
      DBGLOG("video is not present.\n");
      st_vs = FALSE;      
     }
   else if(strcmp("1",buf)==0)
   {
      st_vs = TRUE;
      DBGLOG("video is present.\n");
   }
   else
   {
      st_vs = FALSE;
   }
   bail:
   return  st_vs;
  }

[in .../Neuros-Cooler/cooler/core/src/video-control.c]

As you say you are a proficient programmer, I don't see why to can't set up a little program to check a couple of times per second "is there a video signal?" and issue command line calls to start/stop the recording as applicable.

Poke around .../linux-r3-main-app/vrecorder/src/ui as well.


Best wishes,

Rick.
Logged
hughmanoid
Newbie
*
Posts: 3


View Profile
« Reply #3 on: January 04, 2011, 02:38:14 am »

I have a VCR somewhere that could be set to record when a video signal was present and sleep when signal was lost.
I believe the feature was called Satellite Link.  Havent seen it in any other VCRs since.
A decade ago or more, I used an X10 motion detector to turn on a power strip that powered a surveillance camera for several minutes after motion stopped.  The VCR only responded to activity on the COAX/RF channel 3 input as I recall.

Now it seem there are a ton of SD card spycamcorders that do this.

Hughmanoid   
Logged
greyback
Administrator
Hero Member
*****
Posts: 1639


View Profile
« Reply #4 on: January 05, 2011, 07:22:42 am »

For some reason, I think the OSD used to have this feature, many many firmware revisions ago (5 years ago or more), but it was removed for some reason.

I've no idea why. It doesn't sound like polling the input every few milliseconds for a signal would be that much of a trial. With Rick's little app, this should be quite do-able, unless a hardware bug crops up somewhere.
-G
Logged
Pages: [1]
Print
Jump to: