diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-02-16 02:55:27 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-02-16 02:55:27 +0900 |
| commit | fff6db48740662230ccda7f3ab00038a53186665 (patch) | |
| tree | 99bbdc1bb1b005f9965b854d42434c43efdb8acd /ar/.local/bin/v2m | |
| parent | 719ddcc17b24a928458cbe15f3a92d2e49decbc2 (diff) | |
modified shell/aliasrc, modified tmux/tmux.conf, created bin/ddb, created bin/v2m
Diffstat (limited to 'ar/.local/bin/v2m')
| -rwxr-xr-x | ar/.local/bin/v2m | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/ar/.local/bin/v2m b/ar/.local/bin/v2m new file mode 100755 index 0000000..eda5d86 --- /dev/null +++ b/ar/.local/bin/v2m @@ -0,0 +1,38 @@ +#!/bin/bash + +# 동영상에서 MP3 추출 스크립트 + +if [ $# -eq 0 ]; then + echo "사용법: video2mp3 <입력파일> [출력파일]" + echo "예시: video2mp3 video.mp4" + echo "예시: video2mp3 video.mp4 audio.mp3" + exit 1 +fi + +INPUT="$1" + +# 파일 존재 확인 +if [ ! -f "$INPUT" ]; then + echo "오류: 파일을 찾을 수 없습니다: $INPUT" + exit 1 +fi + +# 출력 파일명 설정 +if [ $# -eq 2 ]; then + OUTPUT="$2" +else + # 입력 파일에서 확장자를 제거하고 .mp3 추가 + OUTPUT="${INPUT%.*}.mp3" +fi + +echo "변환 중: $INPUT -> $OUTPUT" + +# ffmpeg로 mp3 추출 (고품질: 320kbps) +ffmpeg -i "$INPUT" -vn -acodec libmp3lame -b:a 320k "$OUTPUT" + +if [ $? -eq 0 ]; then + echo "✓ 완료: $OUTPUT" +else + echo "✗ 오류 발생" + exit 1 +fi |
