Re: normalize audio in mp4s

2020-04-07 Thread Emanuel Berg
Jonas Smedegaard wrote: > Maybe your system simply treats multi-channel > audio wrongly. > > A simpler alternative to recoding audio with > fine-tuned values could be something like this to > force use only stereo: > > mpv --audio-channels=stereo ... Yes, I've done that, in

Re: normalize audio in mp4s

2020-03-11 Thread David Wright
On Thu 12 Mar 2020 at 02:38:28 (+0100), Emanuel Berg wrote: > Reco wrote: > > >>> Personally I just reencode audio in such cases. > >>> For instance (0:1 is the first audio track, use 0:2 for > >>> english): > >>> > >>> ffmpeg -i ford-v-ferrari-2019.mkv -map 0:0 -map 0:1 \ > >>> -c:v copy \ -c:a

Re: normalize audio in mp4s

2020-03-11 Thread Jonas Smedegaard
Quoting Emanuel Berg (2020-03-11 17:15:08) > Jonas Smedegaard wrote: > > > Try check if the audio stream of that movie is AC-3, and if > > so then try use mpv with the option --ad-lavc-ac3drc (read > > the man page for valid values). > > OK, I'll try this... > > > If you experience similarly

Re: normalize audio in mp4s

2020-03-11 Thread Jonas Smedegaard
Quoting Emanuel Berg (2020-03-12 03:07:23) > Reco wrote: > > > FL = FL + 0.707 * FC + 0.707 * BL > > With mediainfo(1) as recommended by Mr. Smedegaard, I got > this > > $ mediainfo ford-v-ferrari-2019.mkv | grep -i channel > Channel(s) : 6 channels > Channel

Re: normalize audio in mp4s

2020-03-11 Thread Emanuel Berg
Reco wrote: > FL = FL + 0.707 * FC + 0.707 * BL With mediainfo(1) as recommended by Mr. Smedegaard, I got this $ mediainfo ford-v-ferrari-2019.mkv | grep -i channel Channel(s) : 6 channels Channel layout : L R C LFE Ls Rs Channel(s)

Re: normalize audio in mp4s

2020-03-11 Thread Emanuel Berg
Reco wrote: > Your typical movie has dialogue on center channel, gunfire > & cars' sounds come from the front channels, ambient comes > from the back ones. > > So, what's needed is to gain volume on dialogues OK, so that's -clev 1.414 since dialog comes from the center. > while downplaying

Re: normalize audio in mp4s

2020-03-11 Thread Emanuel Berg
Reco wrote: >>> Personally I just reencode audio in such cases. >>> For instance (0:1 is the first audio track, use 0:2 for >>> english): >>> >>> ffmpeg -i ford-v-ferrari-2019.mkv -map 0:0 -map 0:1 \ >>> -c:v copy \ -c:a libopus -b:a 128k -ac 2 -clev 1.414 >>> -slev .5 \

Re: normalize audio in mp4s

2020-03-11 Thread Reco
Hi. On Wed, Mar 11, 2020 at 01:51:26PM -0500, David Wright wrote: > > Personally I just reencode audio in such cases. > > For instance (0:1 is the first audio track, use 0:2 for english): > > > > ffmpeg -i ford-v-ferrari-2019.mkv -map 0:0 -map 0:1 \ > > -c:v copy \ > > -c:a

Re: normalize audio in mp4s

2020-03-11 Thread David Wright
On Wed 11 Mar 2020 at 19:33:59 (+0300), Reco wrote: > On Wed, Mar 11, 2020 at 05:00:21PM +0100, Emanuel Berg wrote: > > Stream #0:1(por): Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s > > (default) > > Or this, dependent on your preferred language > > > Stream #0:2(eng): Audio: ac3,

Re: normalize audio in mp4s

2020-03-11 Thread Emanuel Berg
Reco wrote: > Personally I just reencode audio in such cases. For instance > (0:1 is the first audio track, use 0:2 for english): > > ffmpeg -i ford-v-ferrari-2019.mkv -map 0:0 -map 0:1 \ > -c:v copy \ > -c:a libopus -b:a 128k -ac 2 -clev 1.414 -slev .5 \ >

Re: normalize audio in mp4s

2020-03-11 Thread Jonas Smedegaard
Quoting Emanuel Berg (2020-03-11 17:15:08) > Jonas Smedegaard wrote: > > > Try check if the audio stream of that movie is AC-3, and if > > so then try use mpv with the option --ad-lavc-ac3drc (read > > the man page for valid values). > > OK, I'll try this... > > > If you experience similarly

Re: normalize audio in mp4s

2020-03-11 Thread Reco
Hi. On Wed, Mar 11, 2020 at 05:00:21PM +0100, Emanuel Berg wrote: > Reco wrote: > > > Can you provide an output of (you may need to install ffmpeg > > package): > > > > ffprobe -hide_banner Perfect, thanks. This: > Stream #0:1(por): Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s

Re: normalize audio in mp4s

2020-03-11 Thread Emanuel Berg
Jonas Smedegaard wrote: > Try check if the audio stream of that movie is AC-3, and if > so then try use mpv with the option --ad-lavc-ac3drc (read > the man page for valid values). OK, I'll try this... > If you experience similarly expanded dynamic range also for > differently encoded audio

Re: normalize audio in mp4s

2020-03-11 Thread Emanuel Berg
deloptes wrote: > why don't you check if you have the right profile selected > (input/output, pulse audio etc) How do you do that? I use mpv $ mpv --version mpv 0.29.1 Copyright © 2000-2018 mpv/MPlayer/mplayer2 projects built on UNKNOWN ffmpeg library versions:

Re: normalize audio in mp4s

2020-03-11 Thread Emanuel Berg
Reco wrote: > Can you provide an output of (you may need to install ffmpeg > package): > > ffprobe -hide_banner $ ffprobe -hide_banner ford-v-ferrari-2019.mkv Input #0, matroska,webm, from 'ford-v-ferrari-2019.mkv': Metadata: title :

Re: normalize audio in mp4s

2020-03-10 Thread David Wright
On Mon 09 Mar 2020 at 14:23:54 (-0600), ghe wrote: > > > Please note that the subject of this conversation is mp4 (not mp3). > > It's claimed that sox will handle mp4: > > https://stackoverflow.com/questions/2666425/how-to-i-configure-sox-to-work-on-mp4 > > (You do have to install LAME.) All

Re: normalize audio in mp4s

2020-03-10 Thread Nicolas George
Reco (12020-03-10): > I disagree. You don't do support on the ffmpeg-user mailing lists. -hide_banner is very annoying there; please don't give bad habits to unsuspecting users. Regards, -- Nicolas George signature.asc Description: PGP signature

Re: normalize audio in mp4s

2020-03-10 Thread Reco
Hi. On Tue, Mar 10, 2020 at 01:06:10PM +0100, Nicolas George wrote: > Reco (12020-03-10): > > ffprobe -hide_banner > > Please don't advise -hide_banner. It makes it harder to notice obvious > issues like bogus or prehistoric versions. I disagree. In this case the problem lies with the

Re: normalize audio in mp4s

2020-03-10 Thread Nicolas George
Reco (12020-03-10): > ffprobe -hide_banner Please don't advise -hide_banner. It makes it harder to notice obvious issues like bogus or prehistoric versions. Regards, -- Nicolas George signature.asc Description: PGP signature

Re: normalize audio in mp4s

2020-03-10 Thread Jonas Smedegaard
Quoting Emanuel Berg (2020-03-10 09:54:07) > deloptes wrote: > > > but my question here is - why the subject with mp4s - do only > > they suffer this problem or it is just a case among others? > > It is probably a case among others, at least when I wrote it the > intention was to raise this

Re: normalize audio in mp4s

2020-03-10 Thread deloptes
Emanuel Berg wrote: > deloptes wrote: > >> but my question here is - why the subject with mp4s - do only >> they suffer this problem or it is just a case among others? > > It is probably a case among others, at least when I wrote it the > intention was to raise this issue in general. > > Today

Re: normalize audio in mp4s

2020-03-10 Thread Reco
Hi. On Tue, Mar 10, 2020 at 09:54:07AM +0100, Emanuel Berg wrote: > deloptes wrote: > > > but my question here is - why the subject with mp4s - do only > > they suffer this problem or it is just a case among others? > > It is probably a case among others, at least when I wrote it the >

Re: normalize audio in mp4s

2020-03-10 Thread Emanuel Berg
deloptes wrote: > but my question here is - why the subject with mp4s - do only > they suffer this problem or it is just a case among others? It is probably a case among others, at least when I wrote it the intention was to raise this issue in general. Today I saw "Ford v Ferrari" from last

Re: normalize audio in mp4s

2020-03-10 Thread deloptes
ghe wrote: >> Please note that the subject of this conversation is mp4 (not mp3). > > It's claimed that sox will handle mp4: > > https://stackoverflow.com/questions/2666425/how-to-i-configure-sox-to-work-on-mp4 > > (You do have to install LAME.) > >> If you only process uncompressed audio

Re: normalize audio in mp4s

2020-03-09 Thread David Wright
On Mon 09 Mar 2020 at 19:38:06 (+0100), Jonas Smedegaard wrote: > All that said, you are of course quite welcome to look at my script, and > even critisize it if you like (no doubt there are things in there worthy > of pointing fingers at). Before I do, I thought I'd try my hand at one myself.

Re: normalize audio in mp4s

2020-03-09 Thread David Wright
On Mon 09 Mar 2020 at 19:38:06 (+0100), Jonas Smedegaard wrote: > Quoting David Wright (2020-03-09 19:08:26) > > On Mon 09 Mar 2020 at 12:26:53 (+0100), Jonas Smedegaard wrote: > > > So if high-quality normalization is not important (and you don't > > > want to try play with stripping my script),

Re: normalize audio in mp4s

2020-03-09 Thread Jonas Smedegaard
Quoting ghe (2020-03-09 21:23:54) > > > Please note that the subject of this conversation is mp4 (not mp3). > > It's claimed that sox will handle mp4: > > https://stackoverflow.com/questions/2666425/how-to-i-configure-sox-to-work-on-mp4 > > (You do have to install LAME.) In Debian, install

Re: normalize audio in mp4s

2020-03-09 Thread ghe
> Please note that the subject of this conversation is mp4 (not mp3). It's claimed that sox will handle mp4: https://stackoverflow.com/questions/2666425/how-to-i-configure-sox-to-work-on-mp4 (You do have to install LAME.) > If you only process uncompressed audio then sox is fine. It will do

Re: normalize audio in mp4s

2020-03-09 Thread Jonas Smedegaard
Quoting David Wright (2020-03-09 19:08:26) > On Mon 09 Mar 2020 at 12:26:53 (+0100), Jonas Smedegaard wrote: > > So if high-quality normalization is not important (and you don't > > want to try play with stripping my script), then directly use > > ffmpeg, or use any other of the many many many

Re: normalize audio in mp4s

2020-03-09 Thread David Wright
On Mon 09 Mar 2020 at 12:26:53 (+0100), Jonas Smedegaard wrote: > So if high-quality normalization is not important (and you don't want to > try play with stripping my script), then directly use ffmpeg, or use any > other of the many many many ffmpeg-based tools available. > > ...or use sox

Re: normalize audio in mp4s

2020-03-09 Thread Greg Wooledge
On Sat, Mar 07, 2020 at 03:05:27AM +0100, Emanuel Berg wrote: > get-mp3-normalized () { > local -a files > files=($@) > > local dB=-10 # db/LUFS > > for f in $files; do > ffmpeg-normalize -f -c:a libmp3lame -t $dB -ext mp3 $f > done get-mp3-normalized() { local

Re: normalize audio in mp4s

2020-03-09 Thread Jonas Smedegaard
Quoting David Wright (2020-03-09 04:15:41) > On Sat 07 Mar 2020 at 12:12:18 (+0100), Jonas Smedegaard wrote: > > Quoting David Wright (2020-03-07 04:56:05) > > > On Fri 06 Mar 2020 at 20:33:48 (+0100), Emanuel Berg wrote: > > > > how can I normalize the audio in mp4 video files? both WRT not > >

Re: normalize audio in mp4s

2020-03-08 Thread David Wright
On Sat 07 Mar 2020 at 12:12:18 (+0100), Jonas Smedegaard wrote: > Quoting David Wright (2020-03-07 04:56:05) > > On Fri 06 Mar 2020 at 20:33:48 (+0100), Emanuel Berg wrote: > > > how can I normalize the audio in mp4 video files? both WRT not > > > having to lower the volume when there's a

Re: normalize audio in mp4s

2020-03-07 Thread Jonas Smedegaard
Quoting David Wright (2020-03-07 04:56:05) > On Fri 06 Mar 2020 at 20:33:48 (+0100), Emanuel Berg wrote: > > how can I normalize the audio in mp4 video files? both WRT not > > having to lower the volume when there's a firefight and raise it > > when they start talking again, _and_ WRT playing

Re: normalize audio in mp4s

2020-03-06 Thread David Wright
On Fri 06 Mar 2020 at 20:33:48 (+0100), Emanuel Berg wrote: > how can I normalize the audio in mp4 video files? both WRT not > having to lower the volume when there's a firefight and raise it > when they start talking again, _and_ WRT playing several files, e.g. > music videos, and having them

Re: normalize audio in mp4s

2020-03-06 Thread Emanuel Berg
David Christensen wrote: > It is going to be difficult or impossible to get good results > across many different mp4 files by feeding them all through > a command-line tool with the same set of options. It might be > possible to script a solution that uses command-line tools to > analyze each

Re: normalize audio in mp4s

2020-03-06 Thread Emanuel Berg
> I tried this but it sounds so bad I even had to put a warning in > a comment I used it the wrong way, one is supposed to experiment with dB/LUFS values for a single problematic file, meanwhile I just injected all my mp3s :$ > # first do: > # $ pip install ffmpeg-normalize > # > # but... don't

Re: normalize audio in mp4s

2020-03-06 Thread Jonas Smedegaard
Quoting David Christensen (2020-03-07 03:41:22) > On 2020-03-06 18:05, Emanuel Berg wrote: > > > > > Well, it sounds advanced... Yes, its a stereo alright, that much > > I know. > > > > I tried this but it sounds so bad I even had to put a warning in > > a comment: > > > > # first do: > > # $

Re: normalize audio in mp4s

2020-03-06 Thread David Christensen
On 2020-03-06 18:05, Emanuel Berg wrote: Well, it sounds advanced... Yes, its a stereo alright, that much I know. I tried this but it sounds so bad I even had to put a warning in a comment: # first do: # $ pip install ffmpeg-normalize # # but... don't use, at least not with music, sounds

Re: normalize audio in mp4s

2020-03-06 Thread Emanuel Berg
David Christensen wrote: > You want audio compression. > > Some media editors, such as Audacity, have compression (and many > other features). > > Some media players, such as VLC, have real-time audio compression > during playback. > > I use Xfce. I do not see a compressor in its PulseAudio >

Re: normalize audio in mp4s

2020-03-06 Thread David Christensen
On 2020-03-06 11:33, Emanuel Berg wrote: how can I normalize the audio in mp4 video files? both WRT not having to lower the volume when there's a firefight and raise it when they start talking again, _and_ WRT playing several files, e.g. music videos, and having them have basically the same

normalize audio in mp4s

2020-03-06 Thread Emanuel Berg
how can I normalize the audio in mp4 video files? both WRT not having to lower the volume when there's a firefight and raise it when they start talking again, _and_ WRT playing several files, e.g. music videos, and having them have basically the same volume? if need be, I can set volume