preserve vorbis comments when downsampling
authorRudolf Polzer <divverent@alientrap.org>
Sat, 14 Aug 2010 20:00:27 +0000 (22:00 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 14 Aug 2010 20:00:27 +0000 (22:00 +0200)
misc/tools/cached-converter.sh

index ccbe0bb862a507b41b0b85d1cf905b0e5408d636..d6fd4424230037993a8e0dea1db41fd6747f806d 100755 (executable)
@@ -105,8 +105,10 @@ reduce_ogg_ogg()
 {
        i=$1; shift; shift
        o=$1; shift; shift
 {
        i=$1; shift; shift
        o=$1; shift; shift
+       tags=`vorbiscomment -R -l "$i"`
        oggdec -o "$tmpdir/x.wav" "$i" && \
        oggenc -q"$1" -o "$o" "$tmpdir/x.wav"
        oggdec -o "$tmpdir/x.wav" "$i" && \
        oggenc -q"$1" -o "$o" "$tmpdir/x.wav"
+       echo "$tags" | vorbiscomment -R -w "$o"
 }
 
 reduce_wav_ogg()
 }
 
 reduce_wav_ogg()