➜ brew install ffmpeg
Overwrite output files without asking.
-y
옵션이 없으면 output 파일이 이미 존재하면
File 'subtitles/subtitle.ass' already exists. Overwrite? [y/N]
이렇게 묻지만
-y
옵션이 있으면 묻지 않고 바로 기존 파일을 새로운 output 파일로 덮어쓴다.
input file url
-i input파일
➜ ffmpeg -y -i input 파일 ouput 파일
ouput 파일
은 input 파일
의 확장자만 바꾸면 된다. 그럼 바뀐 확장자로 코덱을 알아서 판단하고 변환한다.
➜ ffmpeg -y -i subtitles/subtitle.srt subtitles/subtitle.vtt
1
00:00:00,498 --> 00:00:02,827
- Here's what I love most
about food and diet.
2
00:00:02,827 --> 00:00:06,383
We all eat several times a day,
and we're totally in charge
3
00:00:06,383 --> 00:00:09,427
of what goes on our plate
and what stays off.
[Script Info]
; Script generated by FFmpeg/Lavc58.91.100
ScriptType: v4.00+
PlayResX: 384
PlayResY: 288
ScaledBorderAndShadow: yes
[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,Arial,16,&Hffffff,&Hffffff,&H0,&H0,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,0
[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:00.50,0:00:02.83,Default,,0,0,0,,- Here's what I love most\Nabout food and diet.
Dialogue: 0,0:00:02.83,0:00:06.39,Default,,0,0,0,,We all eat several times a day,\Nand we're totally in charge
Dialogue: 0,0:00:06.38,0:00:09.42,Default,,0,0,0,,of what goes on our plate\Nand what stays off.
WEBVTT
00:00.498 --> 00:02.827
- Here's what I love most
about food and diet.
00:02.827 --> 00:06.383
We all eat several times a day,
and we're totally in charge
00:06.383 --> 00:09.427
of what goes on our plate
and what stays off.
변환하면 시간이 미묘하게 달라진다 .. 흠