Motorola Development Community

Member Login

Quick Search



Development Hacking, development, scripts etc


Reply
  #11  
Old 08-04-2006
MotoFans JUNR
 
Join Date: May 2006
Posts: 67
Thanks: 0
Thanked 1 Time in 1 Post
Default Re: VGA Video Recorder any one??????

hey guys cmon try doin somethin camcap 1 is already out with great functions i hope u guys will look into this!!!
Reply With Quote
  #12  
Old 08-11-2006
pnail's Avatar
MotoFans MODR
 
Join Date: Sep 2005
Location: BorderlessLinuxWorld
Posts: 110
Thanks: 1
Thanked 1 Time in 1 Post
Default Re: VGA Video Recorder any one??????

could not find source code of <edited> motovision </edited>.. I think it came from another forum. And it seems to use framebuffer - which is not good enough for video capture. I was trying to compile ffmpeg for this phone - but got stuck on large file support and could not find time to continue work on it.

I think the camera can capture at good enough quality - CIF (352 × 28 at 30 fps. I think we will run short of MIPS for mpeg4 (h.264) encoding - unless we use mmx capabilities of PXA272. I guess MIPS maybe just enough for H.263 (though ming seems to support h.264 too?).

But the encoding is something that can be done offline on PC. So was just trying to capture high quality raw video - I think 1GB can accomodate 5 mins of raw video (20 mins on 4GB SD on e680i) - and yes audio could be captured too!

btw, camera has different driver APIs for images and video. It can capture images at 1.3mp (1080x1024) while videos at much less resolution (CIF) but at faster rate. So multi shutter is not going to work - it will only give 5fps at max - what camcap gives.

edit:
PS: not sure if resolution is CIF or QCIF(176x120), I guess the latter.
Reply With Quote
  #13  
Old 08-11-2006
Moto Fans SENR
 
Join Date: Nov 2005
Posts: 1,201
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: VGA Video Recorder any one??????

default is qcif I believe
and I personally don't care about the size, if it's raw it's okay (though some compression is always better).
maybe if someone does this they can have like 3 settings 1:Raw 2:medium (using some compression which doesn't make the file really small but makes it not be huge either) and 3:compressed (using the highest compression possible though it might take a hit on performance)
this could be good for people who don't mind lower fps (such as 15 or so) and those that don't care about the size (those recording a short video or have multiple memory cards, or huge memory cards).

what about mpeg compression? would that take a lot of resources? Because if mpeg1 could be used then files shouldn't be THAT huge...
Reply With Quote
  #14  
Old 08-26-2006
MotoFans JUNR
 
Join Date: May 2006
Posts: 67
Thanks: 0
Thanked 1 Time in 1 Post
Default Re: VGA Video Recorder any one??????

"I think the camera can capture at good enough quality - CIF (352 × 28 at 30 fps"nail
man if you could do this then youll be the god of e680i camera feature !!!!!!! coz the videos 174x144 really sux you cant even the face of the person and with the slow framerate it looks like if it is an matrix slow motion scene
and well i needed a camera and video recording in ma mobile to record any thing which happens suddenly like your childs first steps wats gud in the movie of your child first steps when u can only see a little thing(your child) movin on the ground haha
Reply With Quote
  #15  
Old 08-30-2006
pnail's Avatar
MotoFans MODR
 
Join Date: Sep 2005
Location: BorderlessLinuxWorld
Posts: 110
Thanks: 1
Thanked 1 Time in 1 Post
Default Re: VGA Video Recorder any one??????

well not completely sure if all of that is possible - still needs lot of experimentation. I have written video capture inspired by floe's camera capture utility - just throwing out the code here in case someone wants to experiment and build on it!! (had started on it some 15 days back but never got time to work further on it)

There are still hiccups in the videos (320x240 @5fps) - maybe not just one but all ready frames need to be read after WCAM_VIDIOCGCURFRMS ioctl call??

Also not sure if captured size (CIF) is actual sensors or digitally interpolated (zoomed) one?

further experimentation with fps greater than 5 can be done once video quality gets fixed at current rate.

Do have a look at pxa_camera.h in the kernel sources for help on ioctls.

This utility captures 30 seconds (=150 frames, change loop index to capture more) of video in raw format - Compile the attached source as:

"arm-linux-gcc vidcap.c -o vidcap -I /path/to/a780/linux-2.4.17/include --static"

Also attached is statically compiled vidcap. Running vidcap will create out.yuv (~22MB) in current directory. Convert it to mpeg4 on linux/windows desktop using ffmpeg (Windows user can download 3GP_Converter034.zip which includes ffmpeg.exe) as follows:

"ffmpeg -i out.yuv -s 320x240 -r 5 -pix_map yuv422p out.mp4"

Well, getting access to motovision sources might be useful - does anyone got membership in that forum or know the author?

@floe
btw it should be possible to use similar ffmpeg options to convert captured yuv422p images to jpeg. Thanks a ton for your camera capture utility!!

@asadqq
Mobile sure is the most handy gadget rather than any camcorder!!
Attached Files
File Type: zip vidcap0.1.zip (182.3 KB, 275 views)
Reply With Quote
  #16  
Old 09-03-2006
MotoFans JUNR
 
Join Date: May 2006
Posts: 67
Thanks: 0
Thanked 1 Time in 1 Post
Default Re: VGA Video Recorder any one??????

I Hereby Officially Anounce Mr. Pnail As The God Of e68o,i,A780's Camera function
Sorry M'lord as u can see i am not any developer or somethin i no i shouldve tested it first but dont have a clue bout what youre talkin so other developers are gonna take care of that thnx again!
Reply With Quote
  #17  
Old 09-03-2006
Moto Fans SENR
 
Join Date: Nov 2005
Posts: 1,201
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: VGA Video Recorder any one??????

I thought the cam's natural res was 352x288? wouldn't that mean that 320x240 would be partially dependent?

hmm, I hope someone takes this up...
Reply With Quote
  #18  
Old 09-04-2006
MotoFans JUNR
 
Join Date: May 2006
Posts: 67
Thanks: 0
Thanked 1 Time in 1 Post
Default Re: VGA Video Recorder any one??????

Guys Spread the word about this software guys !!!!
Reply With Quote
  #19  
Old 09-04-2006
mech_nrg's Avatar
MotoFans MODR
 
Join Date: May 2006
Location: Mumbai,India
Posts: 214
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: VGA Video Recorder any one??????

make a seperate thread for the software!
Reply With Quote
  #20  
Old 09-07-2006
pnail's Avatar
MotoFans MODR
 
Join Date: Sep 2005
Location: BorderlessLinuxWorld
Posts: 110
Thanks: 1
Thanked 1 Time in 1 Post
Default Re: VGA Video Recorder any one??????

the flicker in video might be due to lost frames - the vidcap0.1v reads only a frame at a time.

did try reading all available frames, heres the code snippet in case want to experiment:

Code:
  struct {int first, last;} cur_frms;

  output = open("out.yuv", O_RDWR|O_CREAT|O_TRUNC);
  int bufsize = width * height * 2 * MAX_FRAMES;
  buffer = malloc(bufsize);

  int i;
  for (i=0; i < 100; i++)
  {
    ioctl(videodev, WCAM_VIDIOCGCURFRMS, &cur_frms);

    //if (i%10 == 0) printf("i=%d, cur_frms.first=%d, cur_frms.last = %d\n", \ 
        i, cur_frms.first, cur_frms.last);

    //if (cur_frms.first > cur_frms.last) continue;

    n = read(videodev,buffer,bufsize);

    while (1) 
    {
        int frame_size = width * height * 2;
        write(output, buffer+ cur_frms.first*frame_size, frame_size);
        if (cur_frms.first == cur_frms.last) break;
        else
        {
           cur_frms.first++;
           if (cur_frms.first == MAX_FRAMES) cur_frms.first = 0;
        }
    }
    //usleep(70000);
  }
  if (ioctl(videodev,VIDIOCCAPTURE, VIDEO_STOP) < 0) { perror("STOP VIDIOCCAPTURE"); exit(1); }

  close(output);
  close(videodev);
  free(buffer);
Reply With Quote
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Video recorder quality! Can it be improved? indyeah A1200 General Chat 13 08-05-2008 07:57 AM
Another Video Recorder Problem themagician8 A1200 General Chat 15 06-30-2008 11:33 PM
Video Recorder Time themagician8 A1200 General Chat 6 06-27-2008 07:41 PM
Video Recorder damithdex E6 General Chat 12 05-25-2007 02:22 PM
VGA Video Recording Is possible!!! asadqq E680i General Chat 6 09-05-2006 10:53 PM

 
Advertisement

Partner Links





Web Analytics