Skip to content

Instantly share code, notes, and snippets.

@tranthamp
Created October 25, 2012 16:02
Show Gist options
  • Save tranthamp/3953665 to your computer and use it in GitHub Desktop.
Save tranthamp/3953665 to your computer and use it in GitHub Desktop.
yavta notes
// I'm using a virtual video capture device via the vivi kernel module
# modprobe vivi
// This creates /dev/video0 if no other devices have yet been enumerated.
// Display available formats for the video device
# yavta --enum-formats /dev/video0
Device /dev/video0 opened.
Device `vivi' on `vivi-000' is a video capture device.
- Available formats:
Format 0: YUYV (56595559)
Type: Video capture (1)
Name: 4:2:2, packed, YUYV
Format 1: UYVY (59565955)
Type: Video capture (1)
Name: 4:2:2, packed, UYVY
Format 2: RGB565 (50424752)
Type: Video capture (1)
Name: RGB565 (LE)
Format 3: RGB565X (52424752)
Type: Video capture (1)
Name: RGB565 (BE)
Format 4: RGB555 (4f424752)
Type: Video capture (1)
Name: RGB555 (LE)
Format 5: RGB555X (51424752)
Type: Video capture (1)
Name: RGB555 (BE)
Video format: RGB565 (50424752) 640x480 (stride 1280) buffer size 614400
// Choose a format and dimensions, then use yavta to capture and dump some frames
# yavta -f RGB565 -s 640x480 -n 4 --capture=5 -F /dev/video0
// This command will capture 5 frames (--capture=5) using 4 buffers (-n 4) with a
// size of 640x480 (-s 640x480) in the rgb565 little endian format (-f RGB565),
// then it will dump them to files (-F) named frame-00000x.bin
// Change the file extensions to indicate the format (required for conversion by ffmpeg)
# mv frame-000001.{bin,rgb}
// To display the raw 16-bit rgb files, I convert them to the png format using ffmpeg
# ffmpeg -s 640x480 -pix_fmt rgb565le -i frame-000001.rgb -f image2 -pix_fmt rgb24 frame1.png
@anantha-vidhya
Copy link

after running yavta commnd by killing windows manager i got a information of

root@am437x-evm:/# yavta -c10 -fUYVY -s720x576 -n4 --capture=5 -F /dev/video0
Device /dev/video0 opened.
Device TI AM437x VPFE' on platform:vpfe 48328000.vpfe' is a video output (without mplanes) device.
Video format set: UYVY (59565955) 720x480 (stride 1440) field interlaced buffer size 691200
Video format: UYVY (59565955) 720x480 (stride 1440) field interlaced buffer size 691200
4 buffers requested.
length: 691200 offset: 0 timestamp type/source: mono/EoF
Buffer 0/0 mapped at address 0xb6d53000.
length: 691200 offset: 692224 timestamp type/source: mono/EoF
Buffer 1/0 mapped at address 0xb6caa000.
length: 691200 offset: 1384448 timestamp type/source: mono/EoF
Buffer 2/0 mapped at address 0xb6c01000.
length: 691200 offset: 2076672 timestamp type/source: mono/EoF
Buffer 3/0 mapped at address 0xb6b58000.
but it is hanging like that only why
so i am not understanding what to do there after i waited for a while and pressed ctrl + c to stop
next i am not getting what to do

@vision3Daerospace
Copy link

Hi, any update? I have a similar issue

@anantha-vidhya
Copy link

we actually changed driver .c file to support YUYV format which worked for us.
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment