Jump to content

fswebcam update for OPI (H3 only)


@lex

Recommended Posts

I just updated the fswebcam code on github so you are able to set Exposure, Vflip and Hflip contols using command line if you don't want to mess with kernel side.

 
Grab the code: 
cd fswebcam
./configure --prefix=/usr --disable-v4l1 --enable-32bit-buffer
make
sudo make install
 
Some command line samples:
fswebcam --Vflip 1 -r 1600x1200 -p YUV420P - > cam1600x1200_2.jpg
fswebcam --Hflip 1 -r 800x600 -p YUV420P - > cam800x600_1.jpg
fswebcam --exposure 4 -r 640x480 -p YUV420P - > cam640x480_1.jpg
 
Exposure = [-4 to 4]
Vflip = [0,1] - Flip image Vertically 
Hflip = [0,1] - Filp image Horizontally 
 
Enjoy

 

 
Link to comment
Share on other sites

Tested this just now in Armbian 5.15 / Xenial. Prior to running configure successfully an

apt-get install libgd-dev

is necessary. And latest kernel where I just added your updated gc2035.c code :)

 

Thx a lot!

Link to comment
Share on other sites

Im no skilled packager, but i had a go and here is the script i used, it should be able to add to the build tools you use - with some modifications.

 

Like i said before when it comes to building .debs anything beyond --check-install is new to me

 

-----------> snip

CACHEDIR="/sdcard/cache"
DEST="/sdcard"
tmpdir1="tmpdir1"
TARGET="boardtarget"
REVISION="0.0.1"
ARCH="armhf"
MAINTAINER="someone"
MAINTAINERMAIL="someemail@smoewhere"

sync
# lets hear we started!
    echo "Building fswebcam" > $DEST/debug/fswebcam-build.log 2>&1
    git clone https://github.com/avafinger/fswebcam $CACHEDIR/$tmpdir1 >> $DEST/debug/fswebcam-build.log 2>&1
# Jump into the cache "/sdcard/cache/tmpdir1"
    cd $CACHEDIR/$tmpdir1
# now we configure and make it
./configure --prefix=/usr --disable-v4l1 --enable-32bit-buffer && make  >> $DEST/debug/fswebcam-compile.log 2>&1
#

# Lets do some deb packaging prep
cd $CACHEDIR/$tmpdir1
mkdir -p fswebcampak fswebcampak/DEBIAN fswebcampak/usr/bin fswebcampak/usr/share/man/man1
cat <<END > fswebcampak/DEBIAN/control
Package: fswebcam$TARGET
Version: $REVISION
Architecture: $ARCH
Maintainer: $MAINTAINER <$MAINTAINERMAIL>
Installed-Size: 1
Depends:  libgd2-xpm-dev, libjpeg-dev, libpng-dev, libfreetype6-dev, libgd-dev
Section: utils
Priority: optional
Description: fswebcam https://github.com/avafinger/fswebcam
END
#        fswebcam
cp "$CACHEDIR/$tmpdir1/fswebcam" "$CACHEDIR/$tmpdir1/fswebcampak/usr/bin/fswebcam"
cp "$CACHEDIR/$tmpdir1/fswebcam.1.gz" "$CACHEDIR/$tmpdir1/fswebcampak/usr/share/man/man1/fswebcam.1.gz"
cd "$CACHEDIR/$tmpdir1/fswebcampak"
cd ..
# package it all up
dpkg -b $CACHEDIR/$tmpdir1/fswebcampak
#
# NOW MOVE IT TO WHERE ITS NEEDED !

-----------> snip

Link to comment
Share on other sites

Nice!

 

Next weekend i will release a build of the guvcview for the H3 and will need some help to automate the gnu makefile and packaging, today it is hard coded manually to be able to build it and run fine on OPI.

I will build the latest stable version possible.

Hope you can improve that.

Link to comment
Share on other sites

@lex

 

if the devs decide that what i have posted above is sufficient for them to deem it worthy of being modded and included in the scripts then i will gladly assist in building you a .deb file based on the above

 

elsewise i think i can amend the above to create a standalone .deb so that you can include it on your github site

Link to comment
Share on other sites

teken me a while to work this out but this seems to be the files and folder structure that needs packaging (from the master branch - will be doing your fork next

 

+/usr/local/bin/guvcview
+/usr/local/include/guvcview-2/libgviewaudio/gviewaudio.h
+/usr/local/include/guvcview-2/libgviewencoder/gviewencoder.h
+/usr/local/include/guvcview-2/libgviewrender/gviewrender.h
+/usr/local/include/guvcview-2/libgviewv4l2core/gview.h
+/usr/local/include/guvcview-2/libgviewv4l2core/gviewv4l2core.h
+/usr/local/lib/libgviewaudio-2.0.so.2
+/usr/local/lib/libgviewaudio-2.0.so.2.0.0
+/usr/local/lib/libgviewaudio.a
+/usr/local/lib/libgviewaudio.la
+/usr/local/lib/libgviewaudio.so
+/usr/local/lib/libgviewencoder-2.0.so.2
+/usr/local/lib/libgviewencoder-2.0.so.2.0.0
+/usr/local/lib/libgviewencoder.a
+/usr/local/lib/libgviewencoder.la
+/usr/local/lib/libgviewencoder.so
+/usr/local/lib/libgviewrender-2.0.so.2
+/usr/local/lib/libgviewrender-2.0.so.2.0.0
+/usr/local/lib/libgviewrender.a
+/usr/local/lib/libgviewrender.la
+/usr/local/lib/libgviewrender.so
+/usr/local/lib/libgviewv4l2core-2.0.so.2
+/usr/local/lib/libgviewv4l2core-2.0.so.2.0.0
+/usr/local/lib/libgviewv4l2core.a
+/usr/local/lib/libgviewv4l2core.la
+/usr/local/lib/libgviewv4l2core.so
+/usr/local/lib/pkgconfig/libgviewaudio.pc
+/usr/local/lib/pkgconfig/libgviewencoder.pc
+/usr/local/lib/pkgconfig/libgviewrender.pc
+/usr/local/lib/pkgconfig/libgviewv4l2core.pc
+/usr/local/share/appdata/guvcview.appdata.xml
+/usr/local/share/applications/guvcview.desktop
+/usr/local/share/doc/guvcview/AUTHORS
+/usr/local/share/doc/guvcview/ChangeLog
+/usr/local/share/doc/guvcview/COPYING
+/usr/local/share/doc/guvcview/INSTALL
+/usr/local/share/doc/guvcview/README.md
+/usr/local/share/locale/bg/LC_MESSAGES/guvcview.mo
+/usr/local/share/locale/bg/LC_MESSAGES/gview_v4l2core.mo
+/usr/local/share/locale/bs/LC_MESSAGES/guvcview.mo
+/usr/local/share/locale/bs/LC_MESSAGES/gview_v4l2core.mo
+/usr/local/share/locale/cs/LC_MESSAGES/guvcview.mo
+/usr/local/share/locale/cs/LC_MESSAGES/gview_v4l2core.mo
+/usr/local/share/locale/da/LC_MESSAGES/guvcview.mo
+/usr/local/share/locale/da/LC_MESSAGES/gview_v4l2core.mo
+/usr/local/share/locale/de/LC_MESSAGES/guvcview.mo
+/usr/local/share/locale/de/LC_MESSAGES/gview_v4l2core.mo
+/usr/local/share/locale/en_AU/LC_MESSAGES/guvcview.mo
+/usr/local/share/locale/en_AU/LC_MESSAGES/gview_v4l2core.mo
+/usr/local/share/locale/es/LC_MESSAGES/guvcview.mo
+/usr/local/share/locale/es/LC_MESSAGES/gview_v4l2core.mo
+/usr/local/share/locale/eu/LC_MESSAGES/guvcview.mo
+/usr/local/share/locale/eu/LC_MESSAGES/gview_v4l2core.mo
+/usr/local/share/locale/fo/LC_MESSAGES/guvcview.mo
+/usr/local/share/locale/fo/LC_MESSAGES/gview_v4l2core.mo
+/usr/local/share/locale/fr/LC_MESSAGES/guvcview.mo
+/usr/local/share/locale/fr/LC_MESSAGES/gview_v4l2core.mo
+/usr/local/share/locale/gl/LC_MESSAGES/guvcview.mo
+/usr/local/share/locale/gl/LC_MESSAGES/gview_v4l2core.mo
+/usr/local/share/locale/he/LC_MESSAGES/guvcview.mo
+/usr/local/share/locale/he/LC_MESSAGES/gview_v4l2core.mo
+/usr/local/share/locale/hr/LC_MESSAGES/guvcview.mo
+/usr/local/share/locale/hr/LC_MESSAGES/gview_v4l2core.mo
+/usr/local/share/locale/it/LC_MESSAGES/guvcview.mo
+/usr/local/share/locale/it/LC_MESSAGES/gview_v4l2core.mo
+/usr/local/share/locale/ja/LC_MESSAGES/guvcview.mo
+/usr/local/share/locale/ja/LC_MESSAGES/gview_v4l2core.mo
+/usr/local/share/locale/lv/LC_MESSAGES/guvcview.mo
+/usr/local/share/locale/lv/LC_MESSAGES/gview_v4l2core.mo
+/usr/local/share/locale/nl/LC_MESSAGES/guvcview.mo
+/usr/local/share/locale/nl/LC_MESSAGES/gview_v4l2core.mo
+/usr/local/share/locale/pl/LC_MESSAGES/guvcview.mo
+/usr/local/share/locale/pl/LC_MESSAGES/gview_v4l2core.mo
+/usr/local/share/locale/pt_BR/LC_MESSAGES/guvcview.mo
+/usr/local/share/locale/pt_BR/LC_MESSAGES/gview_v4l2core.mo
+/usr/local/share/locale/pt/LC_MESSAGES/guvcview.mo
+/usr/local/share/locale/pt/LC_MESSAGES/gview_v4l2core.mo
+/usr/local/share/locale/ru/LC_MESSAGES/guvcview.mo
+/usr/local/share/locale/ru/LC_MESSAGES/gview_v4l2core.mo
+/usr/local/share/locale/si/LC_MESSAGES/guvcview.mo
+/usr/local/share/locale/si/LC_MESSAGES/gview_v4l2core.mo
+/usr/local/share/locale/sr/LC_MESSAGES/guvcview.mo
+/usr/local/share/locale/sr/LC_MESSAGES/gview_v4l2core.mo
+/usr/local/share/locale/tr/LC_MESSAGES/guvcview.mo
+/usr/local/share/locale/tr/LC_MESSAGES/gview_v4l2core.mo
+/usr/local/share/locale/uk/LC_MESSAGES/guvcview.mo
+/usr/local/share/locale/uk/LC_MESSAGES/gview_v4l2core.mo
+/usr/local/share/locale/zh_TW/LC_MESSAGES/guvcview.mo
+/usr/local/share/locale/zh_TW/LC_MESSAGES/gview_v4l2core.mo
+/usr/local/share/man/man1/guvcview.1
+/usr/local/share/menu/guvcview
+/usr/local/share/pixmaps/guvcview/audio_controls.png
+/usr/local/share/pixmaps/guvcview/camera.png
+/usr/local/share/pixmaps/guvcview/close.png
+/usr/local/share/pixmaps/guvcview/guvcview.png
+/usr/local/share/pixmaps/guvcview/image_controls.png
+/usr/local/share/pixmaps/guvcview/movie.png
+/usr/local/share/pixmaps/guvcview/video_controls.png
 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines