반응형
■ avi 파일을 플래쉬 파일 포맷인 flv로 변환할때 사용하는 명령어
# ffmpeg -i filename.avi -ar 22050 -ab 32 -f flv -s 320x240 filename.flv
ffmpeg command options
ffmpeg Video Option
- `-b bitrate'
- Set the video bitrate in bit/s (default = 200 kb/s).
- `-vframes number'
- Set the number of video frames to record.
- `-r fps'
- Set frame rate (Hz value, fraction or abbreviation), (default = 25).
- `-s size'
- Set frame size. The format is `wxh' (ffserver default = 160x128, ffmpeg default = same as source). The following abbreviations are recognized:
- `sqcif'
- 128x96
- `qcif'
- 176x144
- `cif'
- 352x288
- `4cif'
- 704x576
- `16cif'
- 1408x1152
- `qqvga'
- 160x120
- `qvga'
- 320x240
- `vga'
- 640x480
- `svga'
- 800x600
- `xga'
- 1024x768
- `uxga'
- 1600x1200
- `qxga'
- 2048x1536
- `sxga'
- 1280x1024
- `qsxga'
- 2560x2048
- `hsxga'
- 5120x4096
- `wvga'
- 852x480
- `wxga'
- 1366x768
- `wsxga'
- 1600x1024
- `wuxga'
- 1920x1200
- `woxga'
- 2560x1600
- `wqsxga'
- 3200x2048
- `wquxga'
- 3840x2400
- `whsxga'
- 6400x4096
- `whuxga'
- 7680x4800
- `cga'
- 320x200
- `ega'
- 640x350
- `hd480'
- 852x480
- `hd720'
- 1280x720
- `hd1080'
- 1920x1080
- `-aspect aspect'
- Set aspect ratio (4:3, 16:9 or 1.3333, 1.7777).
- `-croptop size'
- Set top crop band size (in pixels).
- `-cropbottom size'
- Set bottom crop band size (in pixels).
- `-cropleft size'
- Set left crop band size (in pixels).
- `-cropright size'
- Set right crop band size (in pixels).
- `-padtop size'
- Set top pad band size (in pixels).
- `-padbottom size'
- Set bottom pad band size (in pixels).
- `-padleft size'
- Set left pad band size (in pixels).
- `-padright size'
- Set right pad band size (in pixels).
- `-padcolor hex_color'
- Set color of padded bands. The value for padcolor is expressed as a six digit hexadecimal number where the first two digits represent red, the middle two digits green and last two digits blue (default = 000000 (black)).
- `-vn'
- Disable video recording.
- `-bt tolerance'
- Set video bitrate tolerance (in bits, default 4000k). Has a minimum value of: (target_bitrate/target_framerate). In 1-pass mode, bitrate tolerance specifies how far ratecontrol is willing to deviate from the target average bitrate value. This is not related to min/max bitrate. Lowering tolerance too much has an adverse effect on quality.
- `-maxrate bitrate'
- Set max video bitrate (in bit/s). Requires -bufsize to be set.
- `-minrate bitrate'
- Set min video bitrate (in bit/s). Most useful in setting up a CBR encode:
ffmpeg -i myfile.avi -b 4000k -minrate 4000k -maxrate 4000k -bufsize 1835k out.m2v
It is of little use elsewise. - `-bufsize size'
- Set video buffer verifier buffer size (in bits).
- `-vcodec codec'
- Force video codec to codec. Use the
copy
special value to tell that the raw codec data must be copied as is. - `-sameq'
- Use same video quality as source (implies VBR).
- `-pass n'
- Select the pass number (1 or 2). It is used to do two-pass video encoding. The statistics of the video are recorded in the first pass into a log file (see also the option -passlogfile), and in the second pass that log file is used to generate the video at the exact requested bitrate. On pass 1, you may just deactivate audio and set output to null, examples for Windows and Unix:
ffmpeg -i foo.mov -vcodec libxvid -pass 1 -an -f rawvideo -y NULffmpeg -i foo.mov -vcodec libxvid -pass 1 -an -f rawvideo -y /dev/null
- `-passlogfile prefix'
- Set two-pass log file name prefix to prefix, the default file name prefix is "ffmpeg2pass". The complete file name will be `PREFIX-N.log', where N is a number specific to the output stream.
- `-newvideo'
- Add a new video stream to the current output stream.
http://ffmpeg.mplayerhq.hu/ffmpeg-doc.html
ffmpeg 명령 테스트 >
#ffmpeg -i LOLLIPOP.wmv -ar 22050 -ab 32 -b 4000k -minrate 4000k -maxrate 4000k -bufsize 1835k -s 400x300 LOLLIPOP.flv
네이버 사이즈 500x370 (bitrate 4000k)
ffmpeg -i LOLLIPOP.wmv -ar 22050 -ab 32 -b 4000k -minrate 4000k -maxrate 4000k -bufsize 1835k -s 500x370 LOLLIPOP2.flv
네이버 사이즈 500x370 (bitrate 2000k)
ffmpeg -i LOLLIPOP.wmv -ar 22050 -ab 32 -b 2000k -minrate 2000k -maxrate 2000k -bufsize 1835k -s 500x370 LOLLIPOP3.flv
동영상 타입 | 동영상 SIZE | 동영상 용량 | 동영상 Bitrate | |
LOLLIPOP.wmv | WMV | 600x400 | 47.1 MB | 2088 kbps |
LOLLIPOP2.flv | FLV | 500x370 | 89.3 MB | 4000 kbps |
LOLLIPOP3.flv | FLV | 500x370 | 47.1 MB | 2000 kbps |
* 이번 작업을 통한 결과
1. Bitrate에 따른 동영상의 파일의 용량의 차이가 크다.
2. 화질 또한 큰 영향을 받게된다.
반응형
'IT공부방' 카테고리의 다른 글
[펌]에디트 플러스 사용자 파일 적용하는 방법 (0) | 2010.07.07 |
---|---|
[동영상]안철수 KAIST석좌교수 "개발자가 성공하는 길" (0) | 2010.06.30 |
[알고리즘] The for Statement (for 명령문) (0) | 2010.06.04 |
[액셀]막대형차트 + 꺾은 선형차트 결합하기 (0) | 2009.12.16 |
[알고리즘] 이미지 추출하기 함수 (0) | 2008.12.23 |
[알고리즘] 10이하 숫자 없애기(123->120으로 만들기) (0) | 2008.12.22 |
[오픈소스][펌]20 Amazing jQuery Plugins and 65 Excellent jQuery Resources (0) | 2008.11.27 |
MS08-067 취약점을 이용한 악성코드 피해 주의요망 (0) | 2008.11.26 |
도움이 되셨다면 하트모양의 "♡ 공감"을 눌러주시면 큰 격려가 됩니다.
(로그인하지 않으셔도 가능)
(로그인하지 않으셔도 가능)