The Motorola Development Community

GameMobile

Go Back   MotorolaFans.com Forums > Developments > Development
Notices

Development Hacking, development, scripts etc

Reply

Member

Join Date: May 2006
Posts: 67
Thanks: 0
Thanked 1 Time in 1 Post
Quote  
#11
08-04-2006
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


User Information
asadqq is offlineReport Post

Member

pnail's Avatar

Join Date: Sep 2005
Posts: 110
Thanks: 1
Thanked 1 Time in 1 Post
Location: BorderlessLinuxWorld

Quote  
#12
08-11-2006
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


User Information
Current Phone: A780
Firmware: A780Version: R52_G_OD.76.A1R, R52_G_OD.39.B1P
Location: BorderlessLinuxWorld

pnail is offlineReport Post
Member

Join Date: Nov 2005
Posts: 1,202
Thanks: 0
Thanked 0 Times in 0 Posts
Quote  
#13
08-11-2006
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


User Information
tarwin is offlineReport Post
Member

Join Date: May 2006
Posts: 67
Thanks: 0
Thanked 1 Time in 1 Post
Quote  
#14
08-26-2006
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


User Information
asadqq is offlineReport Post
Member

pnail's Avatar

Join Date: Sep 2005
Posts: 110
Thanks: 1
Thanked 1 Time in 1 Post
Location: BorderlessLinuxWorld

Quote  
#15
08-30-2006
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, 270 views)
Reply With Quote


User Information
Current Phone: A780
Firmware: A780Version: R52_G_OD.76.A1R, R52_G_OD.39.B1P
Location: BorderlessLinuxWorld

pnail is offlineReport Post
Member

Join Date: May 2006
Posts: 67
Thanks: 0
Thanked 1 Time in 1 Post
Quote  
#16
09-03-2006
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


User Information
asadqq is offlineReport Post
Member

Join Date: Nov 2005
Posts: 1,202
Thanks: 0
Thanked 0 Times in 0 Posts
Quote  
#17
09-03-2006
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


User Information
tarwin is offlineReport Post
Member

Join Date: May 2006
Posts: 67
Thanks: 0
Thanked 1 Time in 1 Post
Quote  
#18
09-04-2006
Default Re: VGA Video Recorder any one??????

Guys Spread the word about this software guys !!!!
Reply With Quote


User Information
asadqq is offlineReport Post
Member

mech_nrg's Avatar

Join Date: May 2006
Posts: 214
Thanks: 0
Thanked 0 Times in 0 Posts
Location: Mumbai,India

Quote  
#19
09-04-2006
Default Re: VGA Video Recorder any one??????

make a seperate thread for the software!
Reply With Quote


User Information
Location: Mumbai,India

mech_nrg is offlineReport Post
Member

pnail's Avatar

Join Date: Sep 2005
Posts: 110
Thanks: 1
Thanked 1 Time in 1 Post
Location: BorderlessLinuxWorld

Quote  
#20
09-07-2006
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


User Information
Current Phone: A780
Firmware: A780Version: R52_G_OD.76.A1R, R52_G_OD.39.B1P
Location: BorderlessLinuxWorld

pnail is offlineReport Post
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
Forum Jump


All times are GMT. The time now is 03:53 AM. Search Engine Friendly URLs by vBSEO 3.2.0 Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd. VBulletin Skin by ForumMonkeys.