[FFmpeg-user] Fwd: Get sample rate in mp3 files

CMG DiGiTaL cmarciog at gmail.com
Wed Feb 23 06:57:29 EET 2022


hi Clayton,

I understand... rules are rules and if I've broken any, I apologize to
everyone!


thanks a lot for the help, the code has now read the file with the
exclamation mark no problems!

only when recording the file he was converting all to 48000kHz sample rate,
but I made a change in the recording code line and now everything is ok!

Here's the change I made in the file's recording line:

before:
FOR /F "delims=" %%B IN ('ffprobe -v 0 -show_entries stream^=bit_rate -of
default^=nk^=1:nw^=1 "!filename!.mp3"') DO ffmpeg -hide_banner -i
"!filename!.mp3" -af
"loudnorm=linear=true:I=!vluf!:LRA=11:tp=!vpeak!:measured_I=!II!:measured_LRA=!ILRA!:measured_tp=!ITP!:measured_thresh=!IT!:offset=!TO!:print_format=summary"
-c:a libmp3lame -b:a %%B "..\Áudios LUFS ORI\!filename!_LUFS_CONVERTED.mp3"

later:
FOR /F "tokens=1,2 delims=," %%B IN ('ffprobe -v 0 -show_entries
stream^=bit_rate^,sample_rate -of csv^=p^=0 "!filename!.mp3"') DO ffmpeg
-hide_banner -i "!filename!.mp3" -af
"loudnorm=linear=true:I=!vluf!:LRA=11:tp=!vpeak!:measured_I=!II!:measured_LRA=!ILRA!:measured_tp=!ITP!:measured_thresh=!IT!:offset=!TO!:print_format=summary"
-c:a libmp3lame -b:a %%B -ar:a %%C "..\Áudios LUFS
ORI\!filename!_LUFS_CONVERTED.mp3"


thank you very much,
Clamarc

Em ter., 22 de fev. de 2022 às 22:05, Clayton Macleod <cherrytwist at gmail.com>
escreveu:

> > hi Clayton,
>
> That wasn't me.  That was Reino.  I guess they're strict about formatting
> rules around here.  I just joined yesterday, so don't ask me.  Seems a
> little arbitrary to me, but if those are the rules and that's what they
> want, alrighty...
>
> I forgot to mention, you'll need to change one more thing in your loop.
> Anywhere you previously referenced %%G in the loop will have to be changed
> to reference temporary.mp3 instead, since you'll be renaming %%G to
> temporary.mp3 at the start of the loop.
>
>
> --
> Clayton Macleod
> If no one comes from the future to stop you from doing it, then how bad of
> a decision can it really be?
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>


More information about the ffmpeg-user mailing list