Correct aspect ratio without re-encoding video file
There is a difference between Sample Aspect Ratio (SAR) and Display Aspect Ratio (DAR). If you want to change the video to display at 4:3, you will need to resize the image.
If you want to use FFmpeg to resize without re-encoding, try:
ffmpeg -i [INPUT] -s 720x540 -c copy [OUTPUT]
You can also try changing just the DAR with:
ffmpeg -i [INPUT] -aspect 720:540 -c copy [OUPTPUT]
키워드 : 가로세로비, 비율
검색어 : mp4 ratio
Showing posts with label FFmpeg. Show all posts
Showing posts with label FFmpeg. Show all posts
Wednesday, February 17, 2016
Sunday, May 31, 2015
FFmpeg으로 동영상에서 image sequence 뽑아내는 법
ffmpeg -i video.format image%03d.jpg
-> 원래 이렇게 하는데 이렇게 디폴트 옵션으로 하면 저해상도로 깨져 나와서 이상하다
-> 이를 해결하는 방법은 다음과 같이 퀄리티 옵션을 주면 된다.
ffmpeg -i myVideo.avi -q:v 1 %d.jpg
-q:v 1 이 바로 퀄리티 옵션을 준 것으로 숫자값은 1~31 범위다. 1이 가장 높은 퀄리티.
키워드 : image sequence 만드는 법, capture, frame by frame
레퍼런스 : Improve quality of ffmpeg created jpgs
-> 원래 이렇게 하는데 이렇게 디폴트 옵션으로 하면 저해상도로 깨져 나와서 이상하다
-> 이를 해결하는 방법은 다음과 같이 퀄리티 옵션을 주면 된다.
ffmpeg -i myVideo.avi -q:v 1 %d.jpg
-q:v 1 이 바로 퀄리티 옵션을 준 것으로 숫자값은 1~31 범위다. 1이 가장 높은 퀄리티.
키워드 : image sequence 만드는 법, capture, frame by frame
레퍼런스 : Improve quality of ffmpeg created jpgs
Labels:
FFmpeg
Saturday, May 30, 2015
OS X 에서 FFmpeg 까는 법
1. 우선 XCode 가 깔려 있어야 한다.
Xcode 는 How to install FFmpeg on Mac OS 를 참조하여 Mac App Store 에서 다운받아 인스톨한다.
2. Homebrew 를 인스톨한다.
http://brew.sh/ 로 가서 거기 써진 대로
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
를 터미널에서 실행하면 된다.
3. FFmpeg 을 인스톨한다.
FFmpeg 홈페이지에서 소스코드를 다운받는다.
압축 파일을 풀면 소스코드 폴더가 생성된다.
//터미널에서 cd 명령을 실행해 그 폴더로 들어간 후
터미널에서 다음을 실행한다.
brew install ffmpeg
//brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-frei0r --with-libass --with-libvo-aacenc --with-libvorbis --with-libvpx --with-opencore-amr --with-openjpeg --with-opus --with-rtmpdump --with-schroedinger --with-speex --with-theora --with-tools
이를 실행하면 컴파일이 되고 FFmpeg 이 설치된다.
키워드 : 인스톨, install
출처 : How to install FFmpeg on Mac OS X
Xcode 는 How to install FFmpeg on Mac OS 를 참조하여 Mac App Store 에서 다운받아 인스톨한다.
2. Homebrew 를 인스톨한다.
http://brew.sh/ 로 가서 거기 써진 대로
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
를 터미널에서 실행하면 된다.
(Homebrew 사용법은 OS X 에서 ImageMagick 까는 법 에도 있음)
3. FFmpeg 을 인스톨한다.
FFmpeg 홈페이지에서 소스코드를 다운받는다.
압축 파일을 풀면 소스코드 폴더가 생성된다.
//터미널에서 cd 명령을 실행해 그 폴더로 들어간 후
터미널에서 다음을 실행한다.
brew install ffmpeg
//brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-frei0r --with-libass --with-libvo-aacenc --with-libvorbis --with-libvpx --with-opencore-amr --with-openjpeg --with-opus --with-rtmpdump --with-schroedinger --with-speex --with-theora --with-tools
이를 실행하면 컴파일이 되고 FFmpeg 이 설치된다.
키워드 : 인스톨, install
출처 : How to install FFmpeg on Mac OS X
Labels:
FFmpeg
Subscribe to:
Posts (Atom)