Giter Site home page Giter Site logo

rockcarry / v4l2test Goto Github PK

View Code? Open in Web Editor NEW
63.0 9.0 26.0 11.81 MB

v4l2 camera test for android platform.

License: GNU General Public License v3.0

Makefile 0.24% C++ 9.67% C 89.46% Shell 0.16% Java 0.31% Objective-C 0.16%
android ffmpeg allwinner camera v4l2 video-recording

v4l2test's People

Contributors

rockcarry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

v4l2test's Issues

any plan to simplify the build steps?

Hi,

your project looks very interesting. However, we were not able to build it, except for the ffmpeg/x264 part.

Could you elaborate more on the dependencies? The infrastructure you have, A33 sdk, is hardly available. I stopped after cloning 6 different git repos from the original google android git and going back to tag android-4.4.4_r2.0.1, but still no luck. It seems to be almost impossible to build it without the A33 SDK.

Best
Clemens

context-aware encoding

Hi, thanks for the release. I'm currently working on context-aware video encoding which aims at setting different QPs for different area within frame to be encoded according to grayscale saliency map where white areas indicate ROI areas. Now I'm struggling at how to implement context-aware encoding in V4L2. Any advices would be very appritiated.

Preview video is delayed and interlaced

Hello CK,
as discussion with you via email before. Now i can stream video and capture to .jpg file in 720*480. But preview video is delayed and interlaced when capture moving object. My input format is YUV422 from isl79985 (Intersil's video decoder). If i use application "mxc_v4l2_tvin" to test video, i can render video to LCD screen without delay time and interlaced line.

Here is my log:
D/camdev: VIDIOC_S_FMT
D/camdev: ------------------
D/camdev: width: 720
D/camdev: height: 480
D/camdev: pixfmt: 0x56595559
field: 0
bytesperline: 1440
sizeimage: 691200
colorspace: 0
current camera frame rate: 30/1 !
assume camera frame rate is 30fps !

and capture image as attached file.

Please give me any suggestion!

Thanks!
Phi
a_img_19700101_055020

ffmpeg问题

我执行:./build_ffmpeg_for_android.sh
Cloning into 'x264'...
remote: Counting objects: 21253, done.
remote: Compressing objects: 100% (4652/4652), done.
remote: Total 21253 (delta 17598), reused 20107 (delta 16558)
Receiving objects: 99% (21084/21253), 5.00 MiB | 3.00 KiB/s

一直不动,不知道为什么,您能帮助解答一下吗?

How to detect lost connection from Camera?

Hi CK,
in CameraDVR app, does any way to detect lost connection from camera? eg. i use CVBS camera, when unplug camera, the preview window is blue color, i want to detect lost connection and show notice message "Video Loss".

Thanks!

Build Errors

Hi Kai,

This is a great initiative to test an android camera without using the android.hardware.Camera apis.
I am trying to build the the examples, but I get the following attached errors.
screenshot from 2017-02-09 15-04-18

The application.mk file is.
APP_ABI := armeabi APP_PLATFORM := android-19

And the android.mk file is.
`LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := v4l2test

LOCAL_MODULE_TAGS := optional

LOCAL_MODULE_PATH := $(TARGET_OUT)/bin

LOCAL_SRC_FILES :=
v4l2test.cpp
ffjpeg.cpp
camdev.cpp

LOCAL_SHARED_LIBRARIES :=
libutils
libcutils
libui
libgui
libandroid_runtime

#++ for ffmpeg library
LOCAL_CFLAGS +=
-D__STDC_CONSTANT_MACROS

LOCAL_C_INCLUDES +=
$(LOCAL_PATH)/ffmpeg/include

LOCAL_C_INCLUDES += /AOSP/frameworks/native/include/
LOCAL_C_INCLUDES += /AOSP/system/core/include/
LOCAL_C_INCLUDES += /AOSP/hardware/libhardware/include

LOCAL_LDFLAGS += -ldl
$(LOCAL_PATH)/ffmpeg/lib/libavformat.a
$(LOCAL_PATH)/ffmpeg/lib/libavcodec.a
$(LOCAL_PATH)/ffmpeg/lib/libswresample.a
$(LOCAL_PATH)/ffmpeg/lib/libswscale.a
$(LOCAL_PATH)/ffmpeg/lib/libavutil.a
$(LOCAL_PATH)/ffmpeg/lib/libx264.a
#-- for ffmpeg library

LOCAL_MULTILIB := 32

include $(BUILD_EXECUTABLE)

include $(CLEAR_VARS)

LOCAL_MODULE := encodertest

LOCAL_MODULE_TAGS := optional

LOCAL_MODULE_PATH := $(TARGET_OUT)/bin

LOCAL_SRC_FILES :=
ffjpeg.cpp
ffencoder.cpp
encodertest.cpp

LOCAL_SHARED_LIBRARIES :=
libutils
libcutils

#++ for ffmpeg library
LOCAL_CFLAGS +=
-D__STDC_CONSTANT_MACROS

LOCAL_C_INCLUDES +=
$(LOCAL_PATH)/ffmpeg/include

LOCAL_C_INCLUDES += /AOSP/frameworks/native/include/
LOCAL_C_INCLUDES += /AOSP/system/core/include/
LOCAL_C_INCLUDES += /AOSP/hardware/libhardware/include

LOCAL_LDFLAGS += -ldl
$(LOCAL_PATH)/ffmpeg/lib/libavformat.a
$(LOCAL_PATH)/ffmpeg/lib/libavcodec.a
$(LOCAL_PATH)/ffmpeg/lib/libswresample.a
$(LOCAL_PATH)/ffmpeg/lib/libswscale.a
$(LOCAL_PATH)/ffmpeg/lib/libavutil.a
$(LOCAL_PATH)/ffmpeg/lib/libx264.a
#-- for ffmpeg library

LOCAL_MULTILIB := 32

include $(BUILD_EXECUTABLE)

include $(CLEAR_VARS)

LOCAL_MODULE := recordertest

LOCAL_MODULE_TAGS := optional

LOCAL_MODULE_PATH := $(TARGET_OUT)/bin

LOCAL_C_INCLUDES := /AOSP/external/tinyalsa/include

LOCAL_SRC_FILES :=
micdev_tinyalsa.cpp
ffjpeg.cpp
camdev.cpp
ffencoder.cpp
ffrecorder.cpp
recordertest.cpp

LOCAL_SHARED_LIBRARIES :=
libutils
libcutils
libui
libgui
libandroid_runtime
libtinyalsa

#++ for ffmpeg library
LOCAL_CFLAGS +=
-D__STDC_CONSTANT_MACROS

LOCAL_C_INCLUDES +=
$(LOCAL_PATH)/ffmpeg/include
LOCAL_C_INCLUDES += /AOSP/frameworks/native/include/
LOCAL_C_INCLUDES += /AOSP/system/core/include/
LOCAL_C_INCLUDES += /AOSP/hardware/libhardware/include

LOCAL_LDFLAGS += -ldl
$(LOCAL_PATH)/ffmpeg/lib/libavformat.a
$(LOCAL_PATH)/ffmpeg/lib/libavcodec.a
$(LOCAL_PATH)/ffmpeg/lib/libswresample.a
$(LOCAL_PATH)/ffmpeg/lib/libswscale.a
$(LOCAL_PATH)/ffmpeg/lib/libavutil.a
$(LOCAL_PATH)/ffmpeg/lib/libx264.a
#-- for ffmpeg library

LOCAL_MULTILIB := 32

include $(BUILD_EXECUTABLE)
`

What platform SDK was this built on? I am using the newest NDK from android studio. I am building your examples through nkd-build.

Thanks in advance.

Release proposal

Hi, I'm really excited about your project, but unfortunately I couldn't manage to build it, there are always some unresolved dependency issues, probably because of ndk versions incompatibility.

So the question is, could you please build your project in your environment for all architectures and upload the binaries as release?

It would be so much helpful for all the folks(like me) stumbling upon your project and having hard time trying to build the binaries.

Thank you for your work!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.