如何将MP4格式转换成AVI格式,谢谢

解决方案 »

  1.   

    WinAVI All in One Converter
      

  2.   

    代码的话,可以用苦力的ffvcl,ffmpeg
      

  3.   

    调用外部命令行 ffmpeg 行不? 
      

  4.   

    --经过验证,失败了,压缩率小不了多少,而且也不能直接播放,需要h264
    ffmpeg -i test.mp4 -threads 4 -vcodec mpeg4 -b:v 1000k test_A1.mp4
    ffmpeg -i test.mp4 -threads 8 -vcodec mpeg4 -b:v 800k  test_A2.mp4
    ffmpeg -i test.mp4 -threads 8 -vcodec mpeg4 -b 200k  test_A3.mp4--效果和上面A差不多,废弃。开启8个线程,压缩码率-crf越小清晰度越高
    ffmpeg -i test.mp4 -threads 8 -crf 22 -y  -vcodec mpeg4 -strict experimental test_B1.mp4
    ffmpeg -i test.mp4 -threads 8 -crf 26 -y  -vcodec mpeg4 -strict experimental test_B2.mp4
    ffmpeg -i test.mp4 -threads 8 -crf 28 -y  -vcodec mpeg4 -strict experimental test_B3.mp4
    ffmpeg -i test.mp4 -threads 8 -crf 30 -y  -vcodec mpeg4 -strict experimental test_B4.mp4
    --压缩生成flv,压缩率不高,甚至压缩完比原来的文件还大1/3
    ffmpeg -i test.mp4 -threads 8 -ab 56 -ar 22050  -r 15 -s 640x360 test_F1.flv
    ffmpeg -i test.mp4 -threads 8 test_F2.flv
    ffmpeg -i test.mp4 -b 300k test_F3.flv
    --生成缩略图
    ffmpeg -i test.mp4 -y -f image2 -ss 8 -t 0.001 -s 320x240 test.jpg--转h264。-s 640*360,-moveflags faststart的把moov都前置了,就支持边下载边播放。
    --老吴用的:ffmpeg -i  test.mp4  -c:v libx264 -b 600k -r 25 -s 640*360 -ab 48k -strict -2 test_ok.mp4  
    ffmpeg -i  test.mp4 -threads 8 -c:v libx264 -movflags faststart -b 200k -r 25 -ab 48k -strict -2 test_C1.mp4
    ffmpeg -i  test.mp4 -c:v libx264 -movflags faststart -b 600k -r 25 -ab 48k -strict -2 test_C2.mp4
    ffmpeg -i  test.mp4 -threads 2 -c:v libx264 -movflags faststart -b 600k -r 25 -ab 48k -strict -2 test_C3.mp4--发现threads加了没什么用,反而感觉有点慢似的
    ffmpeg -i  test.mp4 -c:v libx264 -movflags faststart -b 600k -r 25 -s 640*360 -ab 48k -strict -2 test_C4.mp4
    ffmpeg -i  C:\Users\guestAdmin\Desktop\K空文件夹\A00000592C0B5B\20180610\IMG_20180610104643.mp4 -c:v libx264 -b 600k -r 25 -s 1280*720 -ab 48k -strict -2 test_C5.mp4
    ffmpeg -i  DreamItPossible.mp4 -c:v libx264 -movflags faststart -b 300k -r 25 -s 640*360 -ab 48k -strict -2 test_C5.mp4
    ffmpeg -i  DreamItPossible.mp4  -threads 8 -c:v libx264 -movflags faststart -b 300k -r 25 -s 320*240 -ab 48k -strict -2 test_C6.mp4
    --支持边下载边放:
    qt-faststart test_c4.mp4 test_D1.mp4qt-faststart DreamItPossible.mp4 test_D2.mp4-- -movflags faststart 
    -- http://saas.ihaihong.cn/YinShiPin/upload/FTP/862107034362822/20180615/filesIMG_20180615193440.mp4
    ffmpeg -i  862107034362822\20180615\filesIMG_20180615193440-old.mp4 -c:v libx264 862107034362822\20180615\filesIMG_20180615193440-264.mp4
    qt-faststart 862107034362822\20180615\filesIMG_20180615193440-264.mp4 862107034362822\20180615\filesIMG_20180615193440.mp4
    ffmpeg -i  test.mp4 -c:v libx264 -movflags faststart -y test_E1.mp4
    --转h264,300M的变形金刚压缩后69M,分辨率不变,码率降下来了,太模糊
    ffmpeg -i  test.mp4 -c:v libx264 -movflags faststart -b 300k -y test_E2.mp4
    --转h264,分辨率没变,码率加到600
    ffmpeg -i  test.mp4 -c:v libx264 -movflags faststart -b 600k -y test_E3.mp4
    --转h264,分辨率缩小,码率也缩小到300
    ffmpeg -i  test.mp4 -c:v libx264 -movflags faststart -b 300k -s 640x360 -y test_E4.mp4
    --测试转执法仪
    ffmpeg -i  C:\Users\guestAdmin\Desktop\K空文件夹\执法仪原生.mp4 -c:v libx264 -movflags faststart -b 300k -y test_E5.mp4
    ffmpeg -i  海康.mp4 -c:v libx264 -movflags faststart -b 300k -y test_E6.mp4
    --转出来没声音,解决声音问题。高版本的ffmpeg支持
    ffmpeg -i  hk.mp4 -c:v libx264 -movflags faststart -b 300k -y test_F2.mp4--转带空格的文件
    ffmpeg.exe -i "D:\音视频\a 1 2 345.wmv" -c:v libx264 -movflags faststart -y -b 300k "D:\音视频\a 1 2 345.mp4"--这个用屏幕录像专家录的avi,转成mp4之后只有声音没有图像
    ffmpeg.exe -i "xp-ip.avi" -c:v libx264 -movflags faststart -y -b 300k "xp-ip.mp4"
    ffmpeg.exe -i "xp-ip.avi" -c:v libx264 -strict -2 -movflags faststart -y -b 300k "xp-ip.mp4"