Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Video 将实时视频保存到android上的sd卡_Video_Save_Real Time_Rtsp_Video Recording - Fatal编程技术网

Video 将实时视频保存到android上的sd卡

Video 将实时视频保存到android上的sd卡,video,save,real-time,rtsp,video-recording,Video,Save,Real Time,Rtsp,Video Recording,我需要将实时视频保存到我的android设备上的SD卡上。没有代码可以做到这一点。我搜索了很多次,但我找到的所有代码都不起作用 我需要流视频从安全摄像头使用实时流 协议 我正在使用视频视图来流式传输视频,它工作成功,但无法将其记录到SD卡 if(isNetworkStatusAvialable (getApplicationContext())) { // Execute StreamVideo AsyncTask // Create a progressba

我需要将实时视频保存到我的android设备上的SD卡上。没有代码可以做到这一点。我搜索了很多次,但我找到的所有代码都不起作用 我需要流视频从安全摄像头使用实时流 协议 我正在使用视频视图来流式传输视频,它工作成功,但无法将其记录到SD卡

if(isNetworkStatusAvialable (getApplicationContext())) {

        // Execute StreamVideo AsyncTask

        // Create a progressbar
        pDialog = new ProgressDialog(MainActivity.this);
        // Set progressbar title
        pDialog.setTitle("Android Video Streaming");
        // Set progressbar message
        pDialog.setMessage("Buffering...");
        pDialog.setIndeterminate(true);
        pDialog.setCancelable(true);
        // Show progressbar
        pDialog.show();
        try {
            // Start the MediaController
            MediaController mediacontroller = new MediaController(
                    MainActivity.this);
            mediacontroller.setAnchorView(videoview);
            // Get the URL from String VideoURL
            Uri video = Uri.parse(url);
            videoview.setMediaController(mediacontroller);
            videoview.setVideoURI(video);

        } catch (Exception e) {
            Log.e("Error", e.getMessage());
            e.printStackTrace();
        }

        videoview.requestFocus();
        videoview.setOnPreparedListener(new OnPreparedListener() {
            // Close the progress bar and play the video
            public void onPrepared(MediaPlayer mp) {
                pDialog.dismiss();
                videoview.start();





            }
        });
    } else {
        showMessage("internet is not avialable", buffer.toString());


    }