Skip to content

Instantly share code, notes, and snippets.

@hyunjun
Last active April 3, 2024 13:25
Show Gist options
  • Save hyunjun/cf75a8a9367b272c5707 to your computer and use it in GitHub Desktop.
Save hyunjun/cf75a8a9367b272c5707 to your computer and use it in GitHub Desktop.
OS X

OSX에서 인코딩을 하기위한 최소한의 유틸리티 모음

  • MOV -> mp4 size 감소

    • ffmpeg -n -loglevel error -i <MOV> -vcodec libx264 -crf 28 -preset faster -tune film <mp4> test에서 11.1MB가 5.2MB로 감소
  • mp4에서 소리 제거

  • mp4에서 mp3 추출

    • ffmpeg -i <mp4> [-ss 00:00:00 -to 00:11:26] -b:a 320K -vn <mp3>
  • images -> mp4 병합

    • ffmpeg -f image2 -framerate 25 -pattern_type sequence -start_number 214 -r 3 -i IMG_0%03d.JPG -s 3840x1774 test.avi
      • -start_number는 filename에 쓸 image들의 시작 번호. 즉 -start_number 214와 IMG_0%03d.JPG는 IMG_0214.JPG부터 만들기 시작
      • -r이 frame rate, 즉 -r 3는 초당 3장
      • 해상도(3840x1774)는 사진 해상도에 맞춰서
  • mp3 file 합치기

    ❯ cat list.txt
    file 'start_volume.mp3'
    file 'end_volume.mp3'
    ...
    ❯ ffmpeg -f concat -safe 0 -i list.txt -c copy merged.mp3
    
  • mp3 volume 조정

  • iMovie 동영상에 음악 더하기(동영상에 이미 존재하는 음악/음성을 놔둔채 더하는 것)

Personal

  • 2023.04 2022.03 기준

Reference

기본 설정

Daily update & upgrade

  • brew cleanup && brew update && brew upgrade && /opt/homebrew/anaconda3/bin/conda update --all --yes && /opt/homebrew/anaconda3/bin/conda update conda --all --yes && /opt/homebrew/anaconda3/bin/conda update anaconda --all --yes && omz update && asdf plugin update --all
  • https://www.clien.net/service/board/lecture/9678315

  • 시에라 및 예전 버전도 모두 가능

  • 한영 전환 단축키를 shift + space로 변경

  • 파인더에서 command+shift+G 키를 눌러 ~/Library/Preferences/com.apple.symbolichotkeys.plist를 copy & paste

  • 텍스트 편집기로 <key>61</key>를 찾음

    <key>61</key>
    <dict>
      <key>enabled</key>
      <true/>
      <key>value</key>
      <dict>
        <key>parameters</key>
        <array>
        <integer>32</integer>
        <integer>49</integer>
        <integer>131072</integer> // <integer> 3번째에 다른 숫자가 써 있는데 131072로 변경, 저장 후 리부팅
    
  • shift+space가 아니라 command+space로 하려면 1048576

    • Shift : 131072
    • Control : 262144
    • Option : 524288
    • Command : 1048576
@hyunjun
Copy link
Author

hyunjun commented May 8, 2023

github

@hyunjun
Copy link
Author

hyunjun commented May 9, 2023

Screenshot 2023-05-09 at 4 57 06 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment