0

I am capturing video from video camera, and I want to view it before uploading. and I'm using SimpleMediaFensterPlayerController. its not playing the video. is it possible to play the video captured and stored in local system . if so then how can it be done.

 <RelativeLayout
        android:id="@+id/videoTextureLayout"
        android:layout_above="@+id/bottomBtnContainer"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/white"
        >
        <com.malmstein.fenster.view.FensterVideoView
            android:id="@+id/play_video_texture"
            android:layout_width="match_parent"
            android:layout_height="300dp"
            android:layout_centerInParent="true"
            android:keepScreenOn="true"
            android:fitsSystemWindows="true" />

        <com.malmstein.fenster.controller.SimpleMediaFensterPlayerController
            android:id="@+id/play_video_controller"
            android:layout_below="@+id/play_video_texture"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:animateLayoutChanges="false"
            android:fitsSystemWindows="true" />

    </RelativeLayout>

The above is my xml to display video captured from local system.

Sauda Sadaf
  • 139
  • 9
  • `its not playing the video` any error messages? – Vladyslav Matviienko Jul 04 '17 at 06:41
  • NO, it is logging as start playing: "/storage/emulated/0/DCIM/20170704_120710-958078617.mp4". But video is not shown. – Sauda Sadaf Jul 04 '17 at 06:46
  • show how you play a video then – Vladyslav Matviienko Jul 04 '17 at 06:46
  • File mVideoFile = ImageUtils.createFileVideo(); if (mVideoFile != null ) { FileOutputStream fos = new FileOutputStream(mVideoFile.getPath()); fos.write(byteArray); fos.close(); if(mVideoFile.length()!= 0) { textureView.setVideo((mVideoFile.getPath())); } This code is working for video downloaded from server. but same is not working for local system video. – Sauda Sadaf Jul 04 '17 at 07:08
  • ok, VideoView is not able to play all the video formats. This means that your camera may take video in format, which can't be played by VideoView. Check in which format does the camera take video, and encoded with which codec – Vladyslav Matviienko Jul 04 '17 at 07:14

0 Answers0