把mov的视频转成movie maker能认的格式,用啥软件啊?

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了把mov的视频转成movie maker能认的格式,用啥软件啊?相关的知识,希望对你有一定的参考价值。

我用相机拍的视频,是mov格式,想转换后,用movie maker编辑一下,(我这不能用别的编辑视频)要求转换后清楚的,请介绍个好用的转换软件。我用格式工厂转换时,只能转开头一帧画面,显示转换了100%,其实没转成。有会用的,也可指点一下,谢谢!

参考技术A 把mov的视频转成movie
maker能认的格式,用http://wudanhua.blog.163.com/blog/static/316306022008102610111067/
超级转霸国产优秀视频格式
转换器,专业的转换
软件
,为视频格式文件转换提供终极解决的
方案
,它能够读取各种视频和
音频文件
,并且将他们快速转换为流行的媒体文件格式。拥有非常漂亮
友好的界面.
它几乎涵盖了所有流行的影音
多媒体
文件格式,
包括AVI,
Mpg,
RM,
RMVB,
3GP,
MP4,
AMV,
Mpeg,
Mpeg1,
Mpeg2,
Mpeg4,
VCD,
SVCD,
DVD,
XVID,
DivX,
ASF,
WMV,
SWF,
IPOD,
PSP,
GIF,
MJPEG,
QuickTime,
MOV,
FLV,
MKV,
DV以及所有的
音频格式
.

iOS 录制视频MOV格式转MP4

使用UIImagePickerController系统控制器录制视频时,默认生成的格式是MOV,如果要转成MP4格式的,我们需要使用AVAssetExportSession;

支持转换的视频质量:低,中,高,640*480,720p,1080p等

如下代码片段转换

- (void)mov2mp4:(NSURL *)movUrl
{
    AVURLAsset *avAsset = [AVURLAsset URLAssetWithURL:movUrl options:nil];
    NSArray *compatiblePresets = [AVAssetExportSession exportPresetsCompatibleWithAsset:avAsset];
    /**
     AVAssetExportPresetMediumQuality 表示视频的转换质量,
     */
    if ([compatiblePresets containsObject:AVAssetExportPresetMediumQuality]) {
        AVAssetExportSession *exportSession = [[AVAssetExportSession alloc] initWithAsset:avAsset presetName:AVAssetExportPresetMediumQuality];
        
        //转换完成保存的文件路径
        NSString * resultPath = [NSHomeDirectory() stringByAppendingFormat:@"/Documents/output-%@.mp4",@"cvt"];
        
        exportSession.outputURL = [NSURL fileURLWithPath:resultPath];
        
        //要转换的格式,这里使用 MP4
        exportSession.outputFileType = AVFileTypeMPEG4;
        
        //转换的数据是否对网络使用优化
        exportSession.shouldOptimizeForNetworkUse = YES;
        
        //异步处理开始转换
        [exportSession exportAsynchronouslyWithCompletionHandler:^(void)
         
         {
             //转换状态监控
             switch (exportSession.status) {
                 case AVAssetExportSessionStatusUnknown:
                     NSLog(@"AVAssetExportSessionStatusUnknown");
                     break;
                     
                 case AVAssetExportSessionStatusWaiting:
                     NSLog(@"AVAssetExportSessionStatusWaiting");
                     break;
                     
                 case AVAssetExportSessionStatusExporting:
                     NSLog(@"AVAssetExportSessionStatusExporting");
                     break;
                 case AVAssetExportSessionStatusFailed:
                     NSLog(@"AVAssetExportSessionStatusFailed");  
                     break;
                 case AVAssetExportSessionStatusCancelled:
                     NSLog(@"AVAssetExportSessionStatusCancelled");
                     break;
                  
                 case AVAssetExportSessionStatusCompleted:
                 {
                     //转换完成
                     NSLog(@"AVAssetExportSessionStatusCompleted");
                     
                     //测试使用,保存在手机相册里面
                     ALAssetsLibrary *assetLibrary = [[ALAssetsLibrary alloc] init];
                     [assetLibrary writeVideoAtPathToSavedPhotosAlbum:exportSession.outputURL completionBlock:^(NSURL *assetURL, NSError *error){
                         if (error) {
                             NSLog(@"%@",error);
                         }
                     }];
                     break;
                 }
             }
             
         }];  
        
    }  

}

 

完整的调用以及转换代码

#import <AssetsLibrary/AssetsLibrary.h>
#import <MobileCoreServices/MobileCoreServices.h>
#import <AVFoundation/AVFoundation.h>

@interface ViewController ()<UIImagePickerControllerDelegate,UINavigationControllerDelegate>


@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];


    
}

- (IBAction)startCampVD:(id)sender {
 
    UIImagePickerController *pickerCon = [[UIImagePickerController alloc]init];
    pickerCon.sourceType = UIImagePickerControllerSourceTypeCamera;
    pickerCon.mediaTypes = @[(NSString *)kUTTypeMovie];//设定相机为视频
    pickerCon.cameraDevice = UIImagePickerControllerCameraDeviceFront;//设置相机后摄像头
    pickerCon.videoMaximumDuration = 6;//最长拍摄时间
    pickerCon.videoQuality = UIImagePickerControllerQualityType640x480;//拍摄质量
    pickerCon.allowsEditing = NO;//是否可编辑
    pickerCon.delegate = self;
    
    
    [self presentViewController:pickerCon animated:YES completion:nil];


}

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
    
    NSLog(@"视频录制完成...");
    NSLog(@"%@",info);

    [self mov2mp4:[info objectForKey:UIImagePickerControllerMediaURL]];
    
    [self dismissViewControllerAnimated:YES completion:nil];

    
    


}

- (void)mov2mp4:(NSURL *)movUrl
{
    AVURLAsset *avAsset = [AVURLAsset URLAssetWithURL:movUrl options:nil];
    NSArray *compatiblePresets = [AVAssetExportSession exportPresetsCompatibleWithAsset:avAsset];
    /**
     AVAssetExportPresetMediumQuality 表示视频的转换质量,
     */
    if ([compatiblePresets containsObject:AVAssetExportPresetMediumQuality]) {
        AVAssetExportSession *exportSession = [[AVAssetExportSession alloc] initWithAsset:avAsset presetName:AVAssetExportPresetMediumQuality];
        
        //转换完成保存的文件路径
        NSString * resultPath = [NSHomeDirectory() stringByAppendingFormat:@"/Documents/output-%@.mp4",@"cvt"];
        
        exportSession.outputURL = [NSURL fileURLWithPath:resultPath];
        
        //要转换的格式,这里使用 MP4
        exportSession.outputFileType = AVFileTypeMPEG4;
        
        //转换的数据是否对网络使用优化
        exportSession.shouldOptimizeForNetworkUse = YES;
        
        //异步处理开始转换
        [exportSession exportAsynchronouslyWithCompletionHandler:^(void)
         
         {
             //转换状态监控
             switch (exportSession.status) {
                 case AVAssetExportSessionStatusUnknown:
                     NSLog(@"AVAssetExportSessionStatusUnknown");
                     break;
                     
                 case AVAssetExportSessionStatusWaiting:
                     NSLog(@"AVAssetExportSessionStatusWaiting");
                     break;
                     
                 case AVAssetExportSessionStatusExporting:
                     NSLog(@"AVAssetExportSessionStatusExporting");
                     break;
                 case AVAssetExportSessionStatusFailed:
                     NSLog(@"AVAssetExportSessionStatusFailed");  
                     break;
                 case AVAssetExportSessionStatusCancelled:
                     NSLog(@"AVAssetExportSessionStatusCancelled");
                     break;
                  
                 case AVAssetExportSessionStatusCompleted:
                 {
                     //转换完成
                     NSLog(@"AVAssetExportSessionStatusCompleted");
                     
                     //测试使用,保存在手机相册里面
                     ALAssetsLibrary *assetLibrary = [[ALAssetsLibrary alloc] init];
                     [assetLibrary writeVideoAtPathToSavedPhotosAlbum:exportSession.outputURL completionBlock:^(NSURL *assetURL, NSError *error){
                         if (error) {
                             NSLog(@"%@",error);
                         }
                     }];
                     break;
                 }
             }
             
         }];  
        
    }  

}


- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker {
    [picker dismissViewControllerAnimated:YES completion:^{}];
    
    NSLog(@"视频录制取消了...");
    
}

 

 

以上是关于把mov的视频转成movie maker能认的格式,用啥软件啊?的主要内容,如果未能解决你的问题,请参考以下文章

movie maker是啥软件

Windows Movie Maker是啥软件?

matlab movie函数如何同时在一个figure里播放两个视频

在哪能下到movie maker或和这同类的软件啊?

Windows Essentials Movie Maker 安装失败报错 ——问题解决

CVE-2010-0265分析 Microsoft Movie Maker - Remote Code Execution (MS10-016)