Macでffmpegを使ってmov→mp4
環境:macOS Catalina バージョン10.15.4
条件:brewインストール済み
1. brew install ffmpeg
Error: Can't create update lock in /usr/local/var/homebrew/locks!
Fix permissions by running:
sudo chown -R $(whoami) /usr/local/var/homebrew
Errorが起きているので対処:/usr/local/var/homebrew の所有者を自分に変更して実行できるようにしなければならない。
sudo chown -R ユーザ名 /usr/local/var/homebrew
2. もう一度、brew install ffmpeg
Error: The following directories are not writable by your user:
/usr/local/etc/bash_completion.d
/usr/local/lib/pkgconfig
/usr/local/lib/python3.7/site-packages
/usr/local/share/aclocal
/usr/local/share/doc
/usr/local/share/info
/usr/local/share/locale
/usr/local/share/man
/usr/local/share/man/man1
/usr/local/share/man/man3
/usr/local/share/man/man5
/usr/local/share/man/man7
/usr/local/share/zsh
/usr/local/share/zsh/site-functions
またError リストの全てに対して所有者を自分に変更する
sudo chown -R ユーザ名 /usr/local/etc/bash_completion.d
sudo chown -R ユーザ名 /usr/local/lib/pkgconfig
・・・
3. 三度目の正直、brew install ffmpeg
~ $brew install ffmpeg
==> Installing dependencies for ffmpeg: aom, frei0r, gmp, gettext, libunistring, libidn2, libtasn1, nettle, libffi, p11-kit, openssl@1.1, libevent, unbound, gnutls, lame, fribidi, pcre, readline, sqlite, xz, python@3.8, glib, pixman, cairo, graphite2, icu4c, harfbuzz, libass, libbluray, libsoxr, libvidstab, libogg, libvorbis, libvpx, opencore-amr, jpeg, little-cms2, openjpeg, opus, rtmpdump, flac, libsndfile, libsamplerate, rubberband, sdl2, snappy, speex, srt, webp, leptonica, tesseract, theora, x264, x265 and xvid
==> Installing ffmpeg dependency: aom
==> Downloading https://homebrew.bintray.com/bottles/aom-1.0.0.catalina.bottle.1
==> Downloading from https://akamai.bintray.com/1c/1c49d2f8eee438f057d689a3ac68a
######################################################################## 100.0%
==> Pouring aom-1.0.0.catalina.bottle.1.tar.gz
🍺 /usr/local/Cellar/aom/1.0.0: 19 files, 12.4MB
==> Installing ffmpeg dependency: frei0r
==> Downloading https://homebrew.bintray.com/bottles/frei0r-1.7.0.catalina.bottl
==> Downloading from https://akamai.bintray.com/50/5076041b5f3d76b94866ab2b97ad3
######################################################################## 100.0%
< 続く >
うまくいってそう
4.ffmpegを使ってmov→mp4を試す
入力ファイル:input.mov
出力ファイル:output.mp4
コマンド:ffmpeg -i input.mov output.mp4
~ $ffmpeg -i input.mov output.mp4
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
built with Apple clang version 11.0.3 (clang-1103.0.32.59)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.2.2_3 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags=-fno-stack-check --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable-indev=jack
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mov':
< 続く >
5. 無事にmp4が作成された。
この記事が気に入ったらサポートをしてみませんか?