android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal" android:rotation="90" >
videoView = (VideoView) findViewById(R.id.videoView);
          final Uri videoUri = Uri.parse(
               Environment.getExternalStorageDirectory().getAbsolutePath()+"/UnoPlayList/restaurant_menu_pro_mkv.mkv");
       videoView.setVideoPath(Environment.getExternalStorageDirectory().getAbsolutePath()+"/UnoPlayList/restaurant_menu_pro_mkv.mkv");
       //videoView.setRotation(180);
    //  videoView.setVideoURI(videoUri);
      videoView.start();

有什么办法可以旋转视频吗。

https://play.google.com/store/apps/details?id=com.mycall.videorotate&hl=en

请帮助我。

1 个评论
android
Hemantvc
Hemantvc
发布于 2014-03-31
2 个回答
Codemaker
Codemaker
发布于 2014-03-31
已采纳
0 人赞同

使用camera.setDisplayOrientation()recorder.setOrientationHint()methdos来旋转一个视频,同时捕获本身。

    camera = Camera.open();
    //Set preview with a 90° ortientation
    camera.setDisplayOrientation(90);
    camera.unlock();
    recorder = new recorder();
    recorder.setCamera(camera);
    recorder.setAudioSource(recorder.AudioSource.MIC);
    recorder.setVideoSource(recorder.VideoSource.CAMERA);
    recorder.setProfile(CamcorderProfile.get(CamcorderProfile.QUALITY_720P));
    recorder.setPreviewDisplay(mPreview.getHolder().getSurface());
    recorder.setOutputFile(getOutputMediaFile(MEDIA_TYPE_VIDEO).toString());
    //Rotate video by 90 degree
    recorder.setOrientationHint(90);
    
Naveen Kumar Kuppan
Naveen Kumar Kuppan
发布于 2014-03-31
0 人赞同

没有什么,你只是为视频视图设置旋转,这就是全部。

          videoView.setRotation(90f);
<VideoView
    android:id="@+id/videoView1"
    android:layout_width="wrap_content"