Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

SDL2 Webcam

A simple webcam capturing program using SDL2, V4L2 Linux Kernel API and libyuv

Demo

Demo

Usage

Assuming GCC is used:

gcc webcam_t1_sdl.c -o webcam_t1_sdl -lSDL2main -lSDL2 -lyuv

And then:

./webcam_t1_sdl <device_name> <jpeg_or_yuv> <width> <height>

Do remember to check for what resolution your camera support by running

v4l2-ctl -d /dev/video0 --list-formats-ext

If the program receives any resolution that is not supported, undefined behaviours can occur, which, in this case, the rendered output will be broken.

Resources

Of course this program isn't at all unique and I've been able to complete this thanks to these guides

About

A simple webcam capturing program using SDL2 and V4L2 Linux Kernel API

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages