hi everybody
i have TI DM368 board with LI-5M02 board and am using DVSDK_4_02_00_06 sdk
i already boot my board using NFS ..now i like to save the capture image to
SD card in Jpeg format... if you have any document or related link please
let me know...
Thankyou!!!
Regards
V.Natarajan
Hi Natraj,
You can capture Images from your V4L2 source and compress them as JPEG files and store them using the following pipeline:
gst-launch -e v4l2src always-copy=false num-buffers=1 chain-ipipe=true ! video/x-raw-yuv,format=\(fourcc\)UYVY, width=640, height=480 ! dmaienc_jpeg ! filesink location=VGA_jpeg_file01.jpg
This pipeline stores your image to a file in your NFS root folder.
If you want to store it on an SD card, you have to mount your SD card, i have already explained that in here: http://designsomething.org/leopardboard/f/23/p/733/2657.aspx#2657
Assuming you have called your SD mount directory as /CARD you can run the previous pipeline but with the folder name:
gst-launch -e v4l2src always-copy=false num-buffers=1 chain-ipipe=true ! video/x-raw-yuv,format=\(fourcc\)UYVY, width=640, height=480 ! dmaienc_jpeg ! filesink location=/CARD/VGA_jpeg_file02.jpg
Hope that is useful.Morteza
Hi Morteza
Thankyou very much for your reply... but i got this message after execute that your first command (store to root foler)
WARNING: erroneous pipeline: no property "chain-ipipe" in element "v4l2src0"
V.natarajan
Hi Natarajan,
Try removing the property with error and run the pipeline again:
gst-launch -e v4l2src always-copy=false num-buffers=1 ! video/x-raw-yuv,format=\(fourcc\)UYVY, width=640, height=480 ! dmaienc_jpeg ! filesink location=VGA_jpeg_file01.jpg
But are you sure your gstreamer is working? have you tested other pipelines on it before? Report back the feedback if there is any error
Morteza
hi Morteza
i used this this line
gst-launch -e v4l2src always-copy=false num-buffers=1 ! video/x-raw-yuv,format=\(fourcc\)UYVY, width=640, height=480 ! jpegenc -e ! filesink location=VGA_jpeg_file01.jpg
i got empty jpeg file with 0 byte written in root with following message
Setting pipeline to PAUSED ...
davinci_resizer davinci_resizer.2: RSZ_G_CONFIG:0:1:124
davinci_previewer davinci_previewer.2: ipipe_set_preview_config
vpfe-capture vpfe-capture: IPIPE Chained
vpfe-capture vpfe-capture: Resizer present
EVM: switch to tvp7002 HD video input
vpfe-capture vpfe-capture: input information not found for the subdev
tvp7002 1-005c: querystd, erorxxx, val = 1, val1 = 1
vpfe-capture vpfe-capture: width = 1, height = 1, bpp = 2
vpfe-capture vpfe-capture: adjusted width = 16, height = 2, bpp = 2, bytesperline = 32, sizeimage = 64
vpfe-capture vpfe-capture: width = 32768, height = 32768, bpp = 2
vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 2, bytesperline = 4352, sizeimage = 6684672
vpfe-capture vpfe-capture: width = 1, height = 1, bpp = 1
vpfe-capture vpfe-capture: adjusted width = 32, height = 2, bpp = 1, bytesperline = 32, sizeimage = 96
vpfe-capture vpfe-capture: width = 32768, height = 32768, bpp = 1
vpfe-capture vpfe-capture: adjusted width = 2176, height = 1536, bpp = 1, bytesperline = 2176, sizeimage = 5013504
vpfe-capture vpfe-capture: width = 8, height = 2, bpp = 2
vpfe-capture vpfe-capture: width = 32775, height = 32769, bpp = 2
vpfe-capture vpfe-capture: width = 640, height = 480, bpp = 2
vpfe-capture vpfe-capture: adjusted width = 640, height = 480, bpp = 2, bytesperline = 1280, sizeimage = 614400
Pipeline is live and does not need PREROLL ...
WARNING: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Video input device did not accept new frame rate setting.
Additional debug info:
v4l2src_calls.c(342): gst_v4l2src_set_capture (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
system error: Invalid argument
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Caught interrupt -- handling interrupt.
Interrupt: Stopping pipeline ...
EOS on shutdown enabled -- Forcing EOS on the pipeline
Waiting for EOS...
Got EOS from element "pipeline0".
EOS received - stopping pipeline...
Execution ended after 23239774026 ns.
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
and am using the camera module LI-5M02 header board connected in imager interface not component interface...
hi Morteza.. Thankyou for reply
and i tested the Gstreamer decoder working .. But i using camera option not component/composite option in bootarg setting
i got empty jpeg file with 0 byte written with following message
I am sorry I forgot to ask you two questions first:
1- What is your input card? 2-What is your output line?
My responses up to now where based on Composite input and Composite output.
For your camera card, just remove the "input-src=composite" from the pipeline and give it a try.
You can also try the following pipelines to see if your camera is working properly or not (I assume you have your composite output connected to a TV)?
Video preview without the Pitch settings:
gst-launch -e v4l2src always-copy=FALSE ! 'video/x-raw-yuv,format=(fourcc)NV12,width=640,height=480' ! TIDmaiVideoSink videoStd=D1_NTSC videoOutput=composite sync=false
Simplest Video test:
gst-launch -e v4l2src always-copy=FALSE ! autovideosink
I do not have a Camera card and can not test them, but I think they must work.
i used this Boot parameter
setenv bootargs console=ttyS0,115200n8 rw dm365_imp.oper_mode=0 video=davincifb:vid0=OFF:vid1=OFF:osd0=480x272x16,4050K mem=60MB vpfe_capture.interface=1davinci_enc_mngr.ch0_output=LCD davinci_enc_mngr.ch0_mode=480x372 root=/dev/nfs nfsroot=192.168.1.106:/home/jackal/targetfs ip=dhcp
with Camera input not composite/Component input with this setting i got the output message above i posted last time..
So i Changed the following thing
mt9p031.c file. In the mt9p031_querystd function, change:
*id = V4L2_STD_MT9P031_STD_ALL;
to:
*id = V4L2_STD_720P_60;
after i changed this i got the Jpeg Image file in my Root file system but that image look like above.. the color is missing
i used following command
gst-launch -e v4l2src always-copy=false num-buffers=1 input-src=camera ! video/x-raw-yuv,format=\(fourcc\)UYVY, width=640, height=480 ! jpegenc -e ! filesink location=VGA_jpeg_file03.jpg
i do not use the Composite/Component Input ... I using only Imager interface input LI-5M02 Camera header board with MT9P031 aptina sensor
i got jpeg image only after i change mt9p031.c file camera id.... without this i can't get the output image...
Thankyou!!
Natarajan,
Did you manage to solve the problem or color is still missing?
hi.. Morteza
please help me i dn't know how to solve this color problem...
i got this image
if i run the video loop back command
./video_loopback_dm368.x470MV -O component -I camera -y5 it's working fine...
component output working good...then if run my jpeg command i got only this gray color image all the time
anything i am missing?
fhello svnatraj,
My DM368 EVM is bought from TI,Linux:206.32.17,DVSDK:dvsdk_dm368_4_02_00_06
I have also build the NFS,and i want to capture image from the camera.
uboot like this:
bootargs=console=ttyS0,115200n8 rw dm365_imp.oper_mode=0 video=davincifb:vid0=OFF:vid1=OFF:osd0=480x272x16,4050K mem=60MB vpfe_capture.interface=1 davinci_enc_mngr.ch0_output=LCD davinci_enc_mngr.ch0_mode=480x272 root=/dev/nfs nfsroot=10.22.74.211:/root/targetfs ip=10.22.74.212:10.22.74.211:10.22.74.211:255.255.255.192
i have change the mt9p031.c,
*id= *id = V4L2_STD_720P_60;
And i execute this command :
The Jpeg file is empty,and display the error like this :
mt9p031 1-005d: control id -2147483648 not supportedvpfe-capture vpfe-capture: input information not found for the subdevmt9p031 1-005d: control id 9963776 not supportedmt9p031 1-005d: control id 9963777 not supportedmt9p031 1-005d: control id 9963778 not supportedmt9p031 1-005d: control id 9963779 not supportedmt9p031 1-005d: control id 9963780 not supported
after the above,you must use Ctrl+c to stop the processing.
Thank you in advance,please help me ...
fyl
Hi Natarajan.
Actually my board has just arrived but I am unable to boot .
I am trying to load the kernel image I am trying with the hyper terminal the kernel image is building and at last it is showing the error as:
Jumping to entry point at 0x81080000.
LSP 2.10 POST BETA RELEASE
VERSION: 2.10.010.03
U-Boot 1.3.4-svn56 (Mar 24 2011 - 13:53:45)
I2C: ready
DRAM: 128 MB
NAND: NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron NAND 256MiB 3,3
V 8-bit)
Bad block table found at page 131008, version 0x01
Bad block table found at page 130944, version 0x01
256 MiB
In: serial
Out: serial
Err: serial
Ethernet PHY: GENERIC @ 0x00
NAND read: device 0 offset 0xc900000, size 0x800
2048 bytes read: OK
Current WDT flag is 0xffffffff
NAND read: device 0 offset 0xc800000, size 0x800
Current firmware update flag is 0xffffffff
Hit any key to stop autoboot: 0
NAND read: device 0 offset 0x800000, size 0x800000
8388608 bytes read: OK
Loading from NAND 256MiB 3,3V 8-bit, offset 0x400000
Image Name: Linux-2.6.18_pro500-davinci
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1858436 Bytes = 1.8 MB
Load Address: 80008000
Entry Point: 80008000
## Booting kernel from Legacy Image at 80700000 ...
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ...
Uncompressing Linux.............................................................
............................................................... done, booting th
e kernel.
Linux version 2.6.18_pro500-davinci (renxiang@renxiang-desktop) (gcc version 4.2
.0 (MontaVista 4.2.0-16.0.32.0801914 2008-08-30)) #1 PREEMPT Sun May 23 21:06:24
PDT 2010
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
Machine: DaVinci DM365 IPNC
Memory policy: ECC disabled, Data cache writeback
DaVinci DM0365 variant 0x8
PLL0: fixedrate: 24000000, commonrate: 121500000, vpssrate: 243000000
PLL0: vencrate_sd: 27000000, ddrrate: 243000000 mmcsdrate: 121500000
PLL1: armrate: 297000000, voicerate: 99000000, vencrate_hd: 74250000
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
Built 1 zonelists. Total pages: 29696
Kernel command line: mem=116M console=ttyS0,115200n8 root=/dev/ram0 rw initrd=0x
82000000,8M ip=off video=davincifb:vid0=OFF:vid1=OFF:osd0=1280x720x16,8000K dm36
5_imp.oper_mode=0 davinci_capture.device_type=4
Unknown boot option `dm365_imp.oper_mode=0': ignoring
Unknown boot option `davinci_capture.device_type=4': ignoring
PID hash table entries: 512 (order: 9, 2048 bytes)
Clock event device timer0_0 configured with caps set: 07
Console: colour dummy device 80x30
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 116MB = 116MB total
Memory: 105344KB available (3181K code, 653K data, 184K init)
Security Framework v1.0.0 initialized
Capability LSM initialized
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
checking if image is initramfs...it isn't (bad gzip magic numbers); looks like a
n initrd
Freeing initrd memory: 8192K
NET: Registered protocol family 16
DaVinci: 104 gpio irqs
MUX: initialized GPIO20
MUX: initialized I2C_SCL
MUX: initialized GPIO87
Generic PHY: Registered new driver
ch0 default output "COMPOSITE", mode "NTSC"
VPBE Encoder Initialized
SCSI subsystem initialized
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 4096 bind 2048)
TCP reno registered
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
squashfs: version 3.1 (2006/08/19) Phillip Lougher
JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
yaffs May 23 2010 21:02:19 Installing.
SGI XFS with no debug enabled
Initializing Cryptographic API
io scheduler noop registered
io scheduler anticipatory registered (default)
LTT : ltt-facilities init
LTT : ltt-facility-core init in kernel
DAVINCI-WDT: DaVinci Watchdog Timer: heartbeat 60 sec
Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO map 0x1c20000 mem 0xfbc20000 (irq = 40) is a 16550A
serial8250.0: ttyS1 at MMIO map 0x1d06000 mem 0xfbd06000 (irq = 41) is a 16550A
RAMDISK driver initialized: 1 RAM disks of 32768K size 1024 blocksize
Davinci EMAC MII Bus: probed
MAC address is deadbeaf
TI DaVinci EMAC Linux version updated 4.0
netconsole: not configured, aborting
Linux video capture interface: v2.00
Trying to register davinci display video device.
layer=c29eae00,layer->video_dev=c29eaf60
layer=c29eac00,layer->video_dev=c29ead60
davinci_init:DaVinci V4L2 Display Driver V1.0 loaded
i2c /dev entries driver
nand_davinci nand_davinci.0: Using 4-bit hardware ECC
NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron NAND 256MiB 3,3V 8-bit
)
Creating 5 MTD partitions on "nand_davinci.0":
0x00000000-0x00080000 : "bootloader"
0x00080000-0x00200000 : "params"
0x00200000-0x00400000 : "kernel"
0x00400000-0x01c00000 : "filesystem1"
0x01c00000-0x10000000 : "filesystem2"
nand_davinci nand_davinci.0: hardware revision: 2.3
musb_hdrc: version 6.0, cppi-dma, peripheral, debug=0
musb_hdrc musb_hdrc: No DMA interrupt line
musb_hdrc: USB Peripheral mode controller at c7866000 using DMA, IRQ 12
rtc_davinci_dm365 rtc_davinci_dm365.0: rtc intf: proc
rtc_davinci_dm365 rtc_davinci_dm365.0: rtc intf: dev (254:0)
rtc_davinci_dm365 rtc_davinci_dm365.0: rtc core: registered rtc_davinci_dm365 as
rtc0
rtc wait time out !!!!!
davinci-mmc davinci-mmc.0: Supporting 4-bit mode
davinci-mmc davinci-mmc.0: Using DMA mode
Advanced Linux Sound Architecture Driver Version 1.0.12rc1 (Thu Jun 22 13:55:50
2006 UTC).
ASoC version 0.13.1
CQ0093 Voice Codec 0.1
asoc: cq93vc <-> davinci-vcif mapping ok
ALSA device list:
#0: On-chip voice codec (cq93vc)
IPv4 over IPv4 tunneling driver
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Time: timer0_1 clocksource has been installed.
Clock event device timer0_0 configured with caps set: 08
Switched to high resolution mode on CPU 0
rtc_davinci_dm365 rtc_davinci_dm365.0: setting the system clock to 2000-09-14 01
:01:01 (968893261)
RAMDISK: Couldn't find valid RAM disk image starting at 0.
yaffs: dev is 1048576 name is "ram0"
yaffs: Attempting MTD mount on 1.0, "ram0"
XFS: bad magic number
XFS: SB validate failed
No filesystem could mount root, tried: ext3 ext2 cramfs squashfs msdos vfat yaf
fs yaffs2 xfs
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
Thanks and Regards
Vivek