HydrogenAudio

Digital Audio/Video => Movie/Multichannel audio => Topic started by: JabbaThePrawn on 2016-09-10 22:21:01

Title: Replaygain for video files?
Post by: JabbaThePrawn on 2016-09-10 22:21:01
This probably has a thread already, so please point me in the right direction if this is the case.

I have a fairly large library of video files - mostly MP4, but also WMV, MKV, AVI and others - and the volume difference between them is pretty big at times.

Is there a video equivalent of MP3Gain for video files? Preferably without decoding/re-encoding, of course, as that takes ages.
Title: Re: Replaygain for video files?
Post by: greynol on 2016-09-10 22:28:12
Preferably without decoding/re-encoding, of course, as that takes ages.
You can't demux the audio, process it and then remux?
Title: Re: Replaygain for video files?
Post by: Apesbrain on 2016-09-10 23:12:27
^ You can, but wouldn't it be a lot easier if there were a RG for movies!  Or even if a server like PLEX had a real-time "normalize" function*.

I found this time-saving app the other day:
http://www.dvdavitools.com/free-video-volume-booster/

Note that it loads some adware which I thought I'd switched off during installation but later found it with Malwarebytes.

*EDIT, Ok, maybe it does:
https://forums.plex.tv/discussion/95371/how-to-enable-replaygain

How do you apply the tags?  Is it as eahm hints below: can fb2k write RG tags directly to an MP4 or MKV?  Have to go try this....
Hey, that's great!  fb2k can write RG tags directly to MP4 and MKV video files.  Will have to check later if PLEX acknowledges it.
Title: Re: Replaygain for video files?
Post by: eahm on 2016-09-10 23:14:14
I ReplayGain scan and apply the data to all my son's MP4 cartoons with foobar2000. Directly from foobar2000.
Title: Re: Replaygain for video files?
Post by: greynol on 2016-09-10 23:54:02
Will have to check later if PLEX acknowledges it.
It won't have to acknowledge if you do what I am interpreting what eahm is saying literally: apply the data; IOW, alter the gain of the actual audio data.

I didn't go so far as to do anything but scan and cancel, but I did notice that I had to rename an .m4v to .mp4 for fb2k to recognize the video as a supported format.  Also, my file contained both AAC and AC3.  I'm not sure what can be done if the audio is just AC3 (or DTS, for that matter).
Title: Re: Replaygain for video files?
Post by: kode54 on 2016-09-11 00:51:06
AC3 can be altered by manipulating the dynamic gain control fields, I think. At least, I sort of assumed that the DRC was handled by interpolating per-frame volume levels that were pre-calculated by the encoder and included by the vendor, rather than requiring a proper DRC algorithm in the player.
Title: Re: Replaygain for video files?
Post by: greynol on 2016-09-11 00:55:08
Sure, though dialnorm might be a better choice.  The question is, what can fb2k do with them at present?
Title: Re: Replaygain for video files?
Post by: JabbaThePrawn on 2016-09-11 10:03:11
I ReplayGain scan and apply the data to all my son's MP4 cartoons with foobar2000. Directly from foobar2000.
I hadn't thought of using Foobar2000 for videos.

Edit: I'm trying it now, on a folder of RiffTrax short films. Despite them all being created by, and downloaded from, the same website, volume levels vary quite a bit with these.
Title: Re: Replaygain for video files?
Post by: Apesbrain on 2016-09-11 13:22:48
I ReplayGain scan and apply the data to all my son's MP4 cartoons with foobar2000. Directly from foobar2000.
eahm, can you explain how to apply the data directly from foobar2000?  I can write the RG tags to the file but don't have an option on the RG menu to "apply RG gain to data".  Otherwise, I can have fb2k write a new audio track with RG-altered data, but getting this back into the original MP4/MKV requires it be re-muxed using another application in a separate process.
Title: Re: Replaygain for video files?
Post by: smok3 on 2016-09-12 11:25:20
As long as one is not obsessed with taging or baking audio it should be simple enough for any player to implement that:
a. Scan the file (or parts of it)
b. store the loudness value (but leave my files alone)
c. play with correction.