[FFmpeg-user] Get sample rate in mp3 files

Phil Rhodes phil_rhodes at rocketmail.com
Mon Feb 7 20:28:48 EET 2022


 In an attempt to actually help solve the problem:
Most Windows machines have, for a long time, had the commandline Javascript interpreter cscript.exe which I tend to bust out for moments like this, when batch files become a bit miserable. A lot of people have at least touched Javascript, given its popularity both client and server side on the web, and there's a lot of people and resources out there about it. When my batch files start looking like the below... ugh... is when I tend to start writing .js files.
Happy to help if there's any desire to do something like that.
P
    On Monday, 7 February 2022, 18:14:53 GMT, CMG DiGiTaL <cmarciog at gmail.com> wrote:  
 
 hi Reindl Harald

forgot to send my changed code, follow now, so:

cd\Users\%username%\Desktop\%pasta%
for %%F IN (*) do (ffprobe -i "%%F" -v error -show_entries
stream=sample_rate -of default=noprint_wrappers=1:nokey=1
                    if %%F==48000 (ffmpeg -i "%%F" -map 0:0 -acodec mp3
-b:a 320k -ar:a 44100 "C:\Users\%username%\Desktop\Converted\%%F"
                                  )
                  )

Note: I'm using the for command to execute two commands
          ffmpeg, okay?
          I need one more help from you regarding the If command in
          variable %%F... I don't know how to get only a part of the value
          of the variable to make the if work!

        I send an attachment so I can see the contents of the %%F variable.

Em seg., 7 de fev. de 2022 às 15:08, Reindl Harald <h.reindl at thelounge.net>
escreveu:

>
>
> Am 07.02.22 um 18:55 schrieb Kieran O Leary:
> > I was surprised to see that the code of conduct has no process or contact
> > email for reporting a violation. I’m really reluctant to reply to this
> > thread further as I’ve been called several nasty names already
>
> you should have been reluctant before your first response and nothing
> would have happened at all
>
> learn the difference between "stupid idea" and "you are stupid" given
> that "stupid idea" don't contain any pun even face-to-face as well as
> "this was a stupid idea of me" is a normal conversation outside the
> snowflake world
> _______________________________________________
> 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".
>
_______________________________________________
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