Camera is working on Linux
#41
Today i got the pine64 camera driver fixed and working fine (s54kec). Thanks to TLim for the necessary info.
I will publish the driver on github and if Longsleep and/or Igor (Armbian) accept it (someone can make a patch) you can have HW encoding with the Pine camera (currently 640x480).

Guvcview (mind it is a WiP) can show video for the following win sizes:

- 640x480
- 1280x720
- 1280x960
- 1920x1080
- 2048x1536
- 2592x1936

Maybe motion can grab images at these resolutions too, i have not tested it yet.

You can test the new driver with Pine camera with HW encoding installing this deb Package: https://github.com/avafinger/ffmpeg-3.1....64_A64_deb
You may need to install some extra libs if you have a different Image or distro. This was taken on Ubuntu Xenial but should work on latest Jessie (not tested)

If anyone is interested in this subject, please post your findings, fix, comments or experience here (good or bad), so others can try without fear.

You can expect this quality:
a) https://drive.google.com/file/d/0B7A7OPB...sp=sharing
b) https://drive.google.com/file/d/0B7A7OPB...sp=sharing

You can change quality using the -qp parameter [1,..,47]

I think it is a good start and is in pair with Android.

Hope you find it usefull.
  Reply
#42
it is great to read of this development. i tried install of the .deb package on updated lenny debian 07/01jessie and encountered several dependency issues. there are a couple with the ffmpeg .deb package calling for older versions of dependency packages than where installed on the update build. i'm going to see if i can locate a sd card to do a xenial build and try that. thanks for the new work.
  Reply
#43
My SD card is bloated with dev packages, so most of the times the libs are already there and i miss to include it.

This are the libraries linked to the binary, can you narrow down which one is needed?

ldd /usr/bin/ffmpeg-3.1.4
linux-vdso.so.1 => (0x0000007fa5f50000)
libXv.so.1 => /usr/lib/aarch64-linux-gnu/libXv.so.1 (0x0000007fa5f20000)
libX11.so.6 => /usr/lib/aarch64-linux-gnu/libX11.so.6 (0x0000007fa5df8000)
libXext.so.6 => /usr/lib/aarch64-linux-gnu/libXext.so.6 (0x0000007fa5dd7000)
libvdpau.so.1 => /usr/lib/aarch64-linux-gnu/libvdpau.so.1 (0x0000007fa5dc3000)
libva.so.1 => /usr/lib/aarch64-linux-gnu/libva.so.1 (0x0000007fa5d9a000)
libva-drm.so.1 => /usr/lib/aarch64-linux-gnu/libva-drm.so.1 (0x0000007fa5d86000)
libva-x11.so.1 => /usr/lib/aarch64-linux-gnu/libva-x11.so.1 (0x0000007fa5d71000)
libxcb.so.1 => /usr/lib/aarch64-linux-gnu/libxcb.so.1 (0x0000007fa5d46000)
libxcb-shm.so.0 => /usr/lib/aarch64-linux-gnu/libxcb-shm.so.0 (0x0000007fa5d32000)
libxcb-xfixes.so.0 => /usr/lib/aarch64-linux-gnu/libxcb-xfixes.so.0 (0x0000007fa5d1b000)
libxcb-shape.so.0 => /usr/lib/aarch64-linux-gnu/libxcb-shape.so.0 (0x0000007fa5d07000)
libsndio.so.6.1 => /usr/lib/aarch64-linux-gnu/libsndio.so.6.1 (0x0000007fa5ce7000)
libjack.so.0 => /usr/lib/aarch64-linux-gnu/libjack.so.0 (0x0000007fa5c8d000)
libasound.so.2 => /usr/lib/aarch64-linux-gnu/libasound.so.2 (0x0000007fa5ba1000)
libSDL-1.2.so.0 => /usr/lib/aarch64-linux-gnu/libSDL-1.2.so.0 (0x0000007fa5b09000)
libx264.so.148 => /usr/lib/aarch64-linux-gnu/libx264.so.148 (0x0000007fa59a1000)
libv4l2.so.0 => /usr/lib/aarch64-linux-gnu/libv4l2.so.0 (0x0000007fa5983000)
libpulse.so.0 => /usr/lib/aarch64-linux-gnu/libpulse.so.0 (0x0000007fa5930000)
libmp3lame.so.0 => /usr/lib/aarch64-linux-gnu/libmp3lame.so.0 (0x0000007fa58b7000)
libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000007fa580c000)
liblzma.so.5 => /lib/aarch64-linux-gnu/liblzma.so.5 (0x0000007fa57de000)
libbz2.so.1.0 => /lib/aarch64-linux-gnu/libbz2.so.1.0 (0x0000007fa57be000)
libz.so.1 => /lib/aarch64-linux-gnu/libz.so.1 (0x0000007fa5797000)
libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000007fa576a000)
libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007fa5624000)
/lib/ld-linux-aarch64.so.1 (0x00000055839e6000)
libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000007fa5611000)
libdrm.so.2 => /usr/lib/aarch64-linux-gnu/libdrm.so.2 (0x0000007fa55f2000)
libXfixes.so.3 => /usr/lib/aarch64-linux-gnu/libXfixes.so.3 (0x0000007fa55dd000)
libXau.so.6 => /usr/lib/aarch64-linux-gnu/libXau.so.6 (0x0000007fa55ca000)
libXdmcp.so.6 => /usr/lib/aarch64-linux-gnu/libXdmcp.so.6 (0x0000007fa55b4000)
libbsd.so.0 => /lib/aarch64-linux-gnu/libbsd.so.0 (0x0000007fa5591000)
librt.so.1 => /lib/aarch64-linux-gnu/librt.so.1 (0x0000007fa5579000)
libstdc++.so.6 => /usr/lib/aarch64-linux-gnu/libstdc++.so.6 (0x0000007fa53ea000)
libgcc_s.so.1 => /lib/aarch64-linux-gnu/libgcc_s.so.1 (0x0000007fa53c9000)
libpulse-simple.so.0 => /usr/lib/aarch64-linux-gnu/libpulse-simple.so.0 (0x0000007fa53b4000)
libcaca.so.0 => /usr/lib/aarch64-linux-gnu/libcaca.so.0 (0x0000007fa52e1000)
libv4lconvert.so.0 => /usr/lib/aarch64-linux-gnu/libv4lconvert.so.0 (0x0000007fa525c000)
libjson-c.so.2 => /lib/aarch64-linux-gnu/libjson-c.so.2 (0x0000007fa5241000)
libpulsecommon-8.0.so => /usr/lib/aarch64-linux-gnu/pulseaudio/libpulsecommon-8.0.so (0x0000007fa51cb000)
libdbus-1.so.3 => /lib/aarch64-linux-gnu/libdbus-1.so.3 (0x0000007fa5179000)
libslang.so.2 => /lib/aarch64-linux-gnu/libslang.so.2 (0x0000007fa4fdf000)
libncursesw.so.5 => /lib/aarch64-linux-gnu/libncursesw.so.5 (0x0000007fa4fa5000)
libtinfo.so.5 => /lib/aarch64-linux-gnu/libtinfo.so.5 (0x0000007fa4f6f000)
libjpeg.so.8 => /usr/lib/aarch64-linux-gnu/libjpeg.so.8 (0x0000007fa4f28000)
libsystemd.so.0 => /lib/aarch64-linux-gnu/libsystemd.so.0 (0x0000007fa4ea5000)
libwrap.so.0 => /lib/aarch64-linux-gnu/libwrap.so.0 (0x0000007fa4e8c000)
libsndfile.so.1 => /usr/lib/aarch64-linux-gnu/libsndfile.so.1 (0x0000007fa4e22000)
libasyncns.so.0 => /usr/lib/aarch64-linux-gnu/libasyncns.so.0 (0x0000007fa4e0b000)
libselinux.so.1 => /lib/aarch64-linux-gnu/libselinux.so.1 (0x0000007fa4dde000)
libgcrypt.so.20 => /lib/aarch64-linux-gnu/libgcrypt.so.20 (0x0000007fa4d44000)
libnsl.so.1 => /lib/aarch64-linux-gnu/libnsl.so.1 (0x0000007fa4d1f000)
libFLAC.so.8 => /usr/lib/aarch64-linux-gnu/libFLAC.so.8 (0x0000007fa4cbf000)
libvorbisenc.so.2 => /usr/lib/aarch64-linux-gnu/libvorbisenc.so.2 (0x0000007fa4c0f000)
libresolv.so.2 => /lib/aarch64-linux-gnu/libresolv.so.2 (0x0000007fa4bea000)
libpcre.so.3 => /lib/aarch64-linux-gnu/libpcre.so.3 (0x0000007fa4b79000)
libgpg-error.so.0 => /lib/aarch64-linux-gnu/libgpg-error.so.0 (0x0000007fa4b57000)
libogg.so.0 => /usr/lib/aarch64-linux-gnu/libogg.so.0 (0x0000007fa4b40000)
libvorbis.so.0 => /usr/lib/aarch64-linux-gnu/libvorbis.so.0 (0x0000007fa4b0a000)

You could also try to install some dev packages:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential

and also, can you try this and write down the results (backup your SD CARD before)?
sudo apt-get install libopencv-dev python-opencv
  Reply
#44
turned out to be an issue with repository. changed the one i was using and got all of the proper packages and some separate libraries installed. i did a few runs to test and it seems to be working correctly so i just need to learn commands for ffmpeg. but i was able to get this working. thank you for getting the camera operational on debian. i need to get a better monitor now for further testing.
  Reply
#45
I have been developing a simple local video player with GStreamer at https://github.com/z25/gstcam (works on RPi and laptop) Can you guys build and run it on PINE64 and what are your findings? does it work or is it or GST missing something?
  Reply
#46
(10-19-2016, 10:33 AM)@lex Wrote: Today i got the pine64 camera driver fixed and working fine (s54kec). Thanks to TLim for the necessary info.
I will publish the driver on github and if Longsleep and/or Igor (Armbian) accept it (someone can make a patch) you can have HW encoding with the Pine camera (currently 640x480).

Guvcview (mind it is a WiP) can show video for the following win sizes:

- 640x480
- 1280x720
- 1280x960
- 1920x1080
- 2048x1536
- 2592x1936

Maybe motion can grab images at these resolutions too, i have not tested it yet.

You can test the new driver with Pine camera with HW encoding installing this deb Package: https://github.com/avafinger/ffmpeg-3.1....64_A64_deb
You may need to install some extra libs if you have a different Image or distro. This was taken on Ubuntu Xenial but should work on latest Jessie (not tested)

If anyone is interested in this subject, please post your findings, fix, comments or experience here (good or bad), so others can try without fear.

You can expect this quality:
a) https://drive.google.com/file/d/0B7A7OPB...sp=sharing
b) https://drive.google.com/file/d/0B7A7OPB...sp=sharing

You can change quality using the -qp parameter [1,..,47]

I think it is a good start and is in pair with Android.

Hope you find it usefull.

I needed on longsleep's Ubuntu Xenial:

Code:
wget https://github.com/avafinger/ffmpeg-3.1.4_cedrus264_A64_deb/blob/master/ffmpeg-3.1.4_1.0-1_arm64.deb?raw=true
sudo apt-get install libmp3lame-dev libx264-dev libpulse-dev libv4l-dev libv4l2rds0
sudo dpkg -i ffmpeg-3.1.4_1.0-1_arm64.deb?raw=true
sudo apt-get install libva-drm1 libva-x11-1 libsndio6.1
ffmpeg-3.1.4

So some dependencies need to be added to the DEB file.

Where do I find the latest guvcview for longsleep's Ubuntu Xenial to install (or build)?
  Reply
#47
(10-22-2016, 07:48 AM)Pander Wrote:
(10-19-2016, 10:33 AM)@lex Wrote: Today i got the pine64 camera driver fixed and working fine (s54kec). Thanks to TLim for the necessary info.
I will publish the driver on github and if Longsleep and/or Igor (Armbian) accept it (someone can make a patch) you can have HW encoding with the Pine camera (currently 640x480).

Guvcview (mind it is a WiP) can show video for the following win sizes:

- 640x480
- 1280x720
- 1280x960
- 1920x1080
- 2048x1536
- 2592x1936

Maybe motion can grab images at these resolutions too, i have not tested it yet.

You can test the new driver with Pine camera with HW encoding installing this deb Package: https://github.com/avafinger/ffmpeg-3.1....64_A64_deb
You may need to install some extra libs if you have a different Image or distro. This was taken on Ubuntu Xenial but should work on latest Jessie (not tested)

If anyone is interested in this subject, please post your findings, fix, comments or experience here (good or bad), so others can try without fear.

You can expect this quality:
a) https://drive.google.com/file/d/0B7A7OPB...sp=sharing
b) https://drive.google.com/file/d/0B7A7OPB...sp=sharing

You can change quality using the -qp parameter [1,..,47]

I think it is a good start and is in pair with Android.

Hope you find it usefull.

I needed on longsleep's Ubuntu Xenial:

Code:
wget https://github.com/avafinger/ffmpeg-3.1.4_cedrus264_A64_deb/blob/master/ffmpeg-3.1.4_1.0-1_arm64.deb?raw=true
sudo apt-get install libmp3lame-dev libx264-dev libpulse-dev libv4l-dev libv4l2rds0
sudo dpkg -i ffmpeg-3.1.4_1.0-1_arm64.deb?raw=true
sudo apt-get install libva-drm1 libva-x11-1 libsndio6.1
ffmpeg-3.1.4

So some dependencies need to be added to the DEB file.

Where do I find the latest guvcview for longsleep's Ubuntu Xenial to install (or build)?

Just updated Guvcview to fix the GUI GTK3 interface and start correctly, updated the deb packages as well.

Please, remove any previously installed stock version or installed version from source code.
Usually with: 
sudo apt-get purge guvcview (ubuntu package)
and 
sudo make uninstall if you compiled and installed from source.

You also need to compile the new driver: https://github.com/avafinger/s5k4ec
Igor (Armbian) has already pushed a patch if you are unable to build the driver.  

Get the latest Guvcview and Device Tree for S5K4EC here: https://github.com/avafinger/pine64_camera

Please, post the missing dependencies here, so i can update on github.
  Reply
#48
Thanks @lex; very nice work !
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
  Reply
#49
(10-23-2016, 08:09 AM)MarkHaysHarris777 Wrote: Thanks @lex;  very nice work !

FYI, i have updated the Guvcview 2.0.4 and you can save your video with Mkv, SW encoder for the moment. You have to compile and install it from source code until a deb package is ready.

Instructions: https://github.com/avafinger/guvcview_2.0.4
  Reply
#50
See https://github.com/avafinger/guvcview_2.0.4/issues/1
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Anyone get the camera to work yet? Havensal 16 28,476 09-13-2022, 03:31 AM
Last Post: harryaxe31
  camera port details? gourmand007 6 15,750 03-07-2021, 05:29 PM
Last Post: DippingMyToesIn
  About the camera robopo 11 22,847 03-06-2021, 12:28 AM
Last Post: DippingMyToesIn
  CSI / Camera Module Compatibility? vade 8 18,009 04-03-2020, 05:39 AM
Last Post: Ellesar Dragon
  13MP Camera cable extension saviod 2 5,617 06-21-2019, 06:05 AM
Last Post: saviod
  Camera Sasank 15 28,535 12-13-2018, 09:08 PM
Last Post: Mutani
  Himax 5 Megapixel Camera Module cannot fit into 7″ LCD Touch Screen Panel themyshop 3 7,688 05-10-2018, 04:28 PM
Last Post: tllim
  Webcam vs camera module on pine64+ fkpkot 4 10,690 02-27-2017, 03:57 PM
Last Post: MarkHaysHarris777
  camera module and lcd integration jodybrown99 5 9,691 10-11-2016, 11:35 AM
Last Post: hikaricore

Forum Jump:


Users browsing this thread: 3 Guest(s)