Moderator: moderators
feather333 wrote:Can anyone tell me if Replay Gain can be used for video files as well as audio files? I would need to use it for wmv, flv, f4v and mp4. I'm hoping to be able to adjust just the audio on a great number of files with the minimum of hassle and without having to re-encode anything.
Thanks.
#!/usr/bin/env sh
volume=`exiftool -a -All -s "$1" | sed -n '/[rR]eplaygain_\?[aA]lbum_\?[gG]ain/p' | sed -n 's/.*\([-+][0-9]\+\.[0-9]\+\).*/\1/p'`
echo "ReplayGain Album Gain = ${volume}dB" >&2
ffmpeg -i "${1}" -ab "${2}k" -v warning -f mp3 -filter "volume=${volume}dB" -
Nemo157 wrote:Just install exiftool, save the following script as /var/subsonic/transcode/apply_replaygain.sh (chmod a+x) and use a transcoder with step 1: apply_replaygain.sh %s %b
- Code: Select all
#!/usr/bin/env sh
volume=`exiftool -a -All -s "$1" | sed -n '/[rR]eplaygain_\?[aA]lbum_\?[gG]ain/p' | sed -n 's/.*\([-+][0-9]\+\.[0-9]\+\).*/\1/p'`
echo "ReplayGain Album Gain = ${volume}dB" >&2
ffmpeg -i "${1}" -ab "${2}k" -v warning -f mp3 -filter "volume=${volume}dB" -
# find 'replaygainalbumgain' tag, and print its value (3rd string on line)
volume=`exiftool -a -All -s "$1" | awk 'BEGIN{IGNORECASE=1} /replaygainalbumgain/ { print $3 }'`
@echo off
cd c:\subsonic\transcode
exiftool -a -All -s %1 | awk "/(replaygain_track_gain)/ {print \"set vol=\" $4}" >tmp_.bat
call tmp_.bat
del tmp_.bat >NUL
ffmpeg -i %1 -ab %2k -v 0 -f mp3 -af volume=%vol%dB -
Users browsing this forum: No registered users and 6 guests