【问题标题】:convert .mov to .m4v with mac terminal使用 mac 终端将 .mov 转换为 .m4v
【发布时间】:2010-10-14 11:01:04
【问题描述】:

我需要在 mac 终端中输入什么才能将我的 .mov 文件转换为 .m4a

【问题讨论】:

    标签: macos terminal


    【解决方案1】:

    我想我在游戏中有点晚了,但是今天研究同样的主题,我发现现在 MacOS 附带avconvert

    AVCONVERT(1)              BSD General Commands Manual             AVCONVERT(1)
    
    NAME
         avconvert -- movie conversion tool
    
    SYNOPSIS
         avconvert [-hvq] --p <preset_name> --s <source_media> --o <output_movie>
    
    DESCRIPTION
     avconvert can be used to compress video media to different types for sharing on the
     web or loading onto devices.
    
     -h       prints usage information and available presets
    
     -v       sets the console output to verbose
    
     -q       sets the console output to quiet
    
     -prog    shows progress during the export (default with -v)
    
     -p | --preset name
              converts the source media to an output file using the specified preset. Use
              --listPresets to get the full list. Common presets are:
    
              PresetAppleM4VCellular
              PresetAppleM4ViPod
              PresetAppleM4VWiFi
              PresetAppleM4VAppleTV
              PresetAppleM4V480pSD
              PresetAppleM4V720pHD
              PresetAppleM4V1080pHD
              PresetAppleM4A
    

    【讨论】:

    • 这是使用标准 macOS 工具的正确答案。
    • 这个答案需要一些严肃的搜索引擎优化。当我搜索“mac native tool convert video formats”时,这实际上是我在互联网上唯一能找到avconvert的地方。
    • 很棒的发现。谢谢。
    【解决方案2】:

    安装 ffmpeg:

    ffmpeg -i input.mov -acodec copy -vcodec copy output.m4v

    这会将音频和视频流精确复制到新文件中。

    【讨论】:

    • 如何安装 ffmpeg?我下载了文件,但没有安装。它只是开发人员的库
    • 最简单的方法是安装 Homebrew (mxcl.github.com/homebrew) 然后从命令行执行 brew install ffmpeg
    • 或者你可以从端口安装:$ port install ffmpeg
    • 此命令总是导致错误。下面对我有用。 ffmpeg -I input.MOV output.mp4
    • 这很奇怪,因为即使man ffmpeg 显示用于输入文件的小写-i
    【解决方案3】:

    1. 冲泡

    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

    2. 获取 ffmpeg

    brew install ffmpeg

    3a.仅使用 ffmpeg 转换音频

    ffmpeg -i input.mov -acodec copy output.m4a

    3b. 使用 ffmpeg 转换视频和音频

    ffmpeg -i input.mov -acodec copy -vcodec copy output.m4v

    【讨论】:

      猜你喜欢
      • 2012-01-16
      • 2016-03-07
      • 1970-01-01
      • 1970-01-01
      • 2019-06-03
      • 1970-01-01
      • 2016-11-28
      • 1970-01-01
      • 2011-10-03
      相关资源
      最近更新 更多