vague memory

うろ覚えを無くしていこうともがき苦しむ人の備忘録

MacOS コマンドラインで「選択したビデオファイルをエンコード」

選択したビデオファイルをエンコード(Encode Selected Video Files)

f:id:htnosm:20201231032200p:plain

上の様にFinderから実行できますが、 コマンドライン実行したかったので調査。 Mac OS X 10.7 Lion から追加された基本機能とのこと。

avconvert

  • オーディオのみ メニューと同等のコマンド例
$ avconvert --preset PresetAppleM4A --source test.mov --output test.m4a

avconvert completed with error:0.

$ file test.*
test.m4a:     ISO Media, Apple iTunes ALAC/AAC-LC (.M4A) Audio
test.mov:     ISO Media, Apple QuickTime movie, Apple QuickTime (.MOV/QT)

オプション

usage: avconvert [--param <value> ...]

    Required parameters:
        --preset (or -p)          <presetName>  Use --help to list all available preset names.
        --source (or -s)          <source media file>
        --output (or -o)          <output movie file>

    Optional parameters:
        --disableFastStart        Disable fast-start movie creation.  Reduces disk accesses if fast-start is not required.
        --disableMetadataFilter   Disable the metadata filter.  Use with caution.  This will allow privacy sensitive source metadata to be preserved in the output file.  Refer to the man page for more details.
        --duration <duration>     Trim the output movie to duration seconds (decimal allowed).  Default is end of file.
        --help (or -h)            Print command usage and list available preset names.
        --multiPass               Perform a higher quality multi-pass encode in the conversion, if supported by the codec.
        --progress (or -prog)     Display progress information.
        --replace                 Overwrite the output file, if it already exists.
        --start <startTime>       Skip the first startTime seconds (decimal allowed) of the source movie.  Default is beginning of file.
        --verbose (or -v)         Print additional information about the conversion.

参考