以下是一些关于视频录制的链接:
如何在Android上捕获视频录制? https://github.com/churnlabs/android-ffmpeg-sample
还有许多链接讲述视频录制,但没有任何线索如何使用远程IP摄像机录制视频.通过在stackoverflow上使用不同的样本,我可以拍摄照片并保存在SD卡上但无法录制视频.
如果任何人有任何想法或代码以及所需文件,我将感激不尽.
例如,我正在使用IP摄像头可用的网址如下:
这是布局代码:
<RelativeLayout
android:id="@+id/LinearLayout02"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/logo"
android:layout_alignParentTop="true"
android:layout_weight="1" >
<ImageButton
android:id="@+id/btnCam"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:src="@drawable/camera_icon" >
</ImageButton>
<ImageButton
android:id="@+id/btnVideo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:src="@drawable/camera_icon" >
</ImageButton>
</RelativeLayout>
<LinearLayout
android:id="@+id/LinearLayout03"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_above="@+id/LinearLayout01"
android:layout_below="@+id/LinearLayout02"
android:layout_weight="1" >
<RelativeLayout
android:id="@+id/RelativeLayout01"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:background="#ffffff" >
<view
android:id="@+id/mv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
class="com.apps.GrahamConst.MjpegView" />
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/LinearLayout01"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_weight="1"
android:background="@drawable/navbar" >
<ImageButton
android:id="@+id/btnPrevious"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center_horizontal"
android:layout_weight="1"
android:background="@null"
android:src="@drawable/previous" > …Run Code Online (Sandbox Code Playgroud) android ×1