rt3x.de NoPaste

Convert OGG files to MP3 incl. metadata

This is a nopaste service, powered by Flying Paste.

Author: Malte Bublitz
Language/File type: Bash script

Description

This for loop converts every OGG file to MP3, and preserves the metadata.

Code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
for file in *.ogg; do
	ffmpeg \
		-i "$file" \
		-vn \
		-c:a libmp3lame \
		-qscale:a 4 \
		-map_metadata 0 \
		-map_metadata 0:s:0 \
		-id3v2_version 3 \
		"${file%.*}.mp3"
		
done