video asset writer 관련 참조 링크들

2023. 2. 3. 14:14iOS

https://medium.com/samkirkiles/swift-using-avassetwriter-to-compress-video-files-for-network-transfer-4dcc7b4288c5

 

[Swift] Using AVAssetWriter to compress video files for network transfer

To quote someone from stack overflow, you pretty much need a PHD to use AVAssetWriter. This is unfortunate because you can do some pretty…

medium.com

 

https://gist.github.com/algal/d071a5c0e7f7d2be8e0adc23b4f5358e

 

MP4Writer.swift

GitHub Gist: instantly share code, notes, and snippets.

gist.github.com

텀플러에 쓰이는 image / video editor

https://github.com/tumblr/kanvas-ios/search?q=compositor 

 

GitHub - tumblr/kanvas-ios: Kanvas: a creation tool for iOS

Kanvas: a creation tool for iOS. Contribute to tumblr/kanvas-ios development by creating an account on GitHub.

github.com

 

IMG.LY - 비디오 오디오 편집 SDK 회사 좋은 글 많음, 비디오 Trim 및  Crop
FFmpeg에 대한 기초 지식이 없을 때 이 기술블로그에 있는 ffmpeg 글 읽어보면 좋음

https://img.ly/blog/trim-and-crop-video-in-swift/

 

How to Trim and Crop Video in Swift

Learn how to use Swift and AVKit to crop a video clip and trim a video timeline.

img.ly

Video Asset Configuration Helper Library - 뜯어보면서 이해하기

https://github.com/VideoFlint/VIExportSession/blob/master/VIExportSession/Source/VIExportSession.swift

 

GitHub - VideoFlint/VIExportSession: A AVAssetExportSession drop-in replacement with customizable audio&video settings.

A AVAssetExportSession drop-in replacement with customizable audio&video settings. - GitHub - VideoFlint/VIExportSession: A AVAssetExportSession drop-in replacement with customizable audio&...

github.com

 

 

 

MP4와 M4V의 차이

https://www.tunefab.com/ko/tutorials/m4v-vs-mp4.html

 

M4V vs MP4 : 차이점과 알아야 할 모든 것

M4V와 MP4는 일반적인 비디오 파일 형식이지만 그 차이점은 무엇입니까? 이 기사에서는 포괄적 인 M4V와 MP4 비교를 보여줍니다.

www.tunefab.com

압축 백그라운드 Task와 Cancellable하게 조절할 수 있음 속도 너무 느림
설명글과 깃헙 주소
코드 그 자체보다 영상 인코딩(압축)을 어떤 식으로 하는지 얻을 수 있음(예 - 사람이 찍은 건 카메라의 급격한 앵글 변화가 없기 때문에 픽셀의 대부분이 비슷함)

https://testfairy.com/blog/fine-tuned-video-compression-in-ios-swift-4-no-dependencies/

https://github.com/testfairy-blog/VideoCompressionTutorial

 

GitHub - testfairy-blog/VideoCompressionTutorial: iOS - Fine tuned video compression in Swift 4

iOS - Fine tuned video compression in Swift 4. Contribute to testfairy-blog/VideoCompressionTutorial development by creating an account on GitHub.

github.com

 

기타 유튜브 동영상 업로드 가이드

여기서 화질 별 비트레이트, 프레임레이트 참조하기

 

To Do

  • ExportSession을 이용하여 bitrate 조절이 가능한지 찾아보기
  • ExportPreferredPreset의 한계 알아보기
  • 앨범에서 비디오를 가져올 때 default Video Edit ViewController를 사용하면 폰으로 찍은 영상(HEVC format)은 가져올 때 압축 딜레이가 거의 없지만, 외부 영상을 앨범에서 가져오면 압축해서 가져와야함 -> Custom Video Edit 만들기

 

남은 질문들

  • 샘플 버퍼가 아닌 픽셀 버퍼를 추가로 왜 사용하느냐? -> 이미지를 추가한 비디오일 경우에 사용? efficient하다는데 잘 모르겠음
  • exportSession과 assetReader/Writer를 혼용하는 경우는 무슨 경우인가?

 

'iOS' 카테고리의 다른 글

인프콘 - FLO 커피챗  (0) 2023.08.16
iOS SPM local package 추가하기 RangeSeekSlider  (0) 2022.02.14