[FFmpeg-user] Get sample rate in mp3 files
CMG DiGiTaL
cmarciog at gmail.com
Mon Feb 7 23:47:29 EET 2022
hi,
So,
I have a folder "General Audios" and I created another one called "Audios
48000 sample rate"
I'm running the ffprobe command that returns the sample rate value of each
song.. but when I try to save the value in a string to be able to use the
IF and copy only the ones with 48000 hz, I get a message that the command
is a command input? what is wrong?... I just want to be able to take
advantage of the if sulted the ffprobe command and you can do the if!...
that's all!
md "C:\Users\%username%\Desktop\48000 sample rates Audio" ---> created
folder
cd\Users\%username%\Desktop\General Audios
---> original folder
ffprobe command that separates only the
sample rate of the songs in the folder:
set var if var
Generate files in folder
for %%F IN (*) do (ffprobe -i "%%F" -v error -show_entries
stream=sample_rate -of default=noprint_wrappers=1:nokey=1 *set* *%%S
if %%S*==48000
("C:\Users\%username%\Desktop\48000 sample rates Audio\%%F")
)
pause
thanks
Clamarc
Em seg., 7 de fev. de 2022 às 16:20, Mark Filipak <
markfilipak.noreply at gmail.com> escreveu:
> On 2022-02-07 13:05, CMG DiGiTaL wrote:
> > Hi
> > I made the changes to my .bat file, and the files are not being written
> for
> > a detail that I also have doubts about
>
> I wrote and use the following batch program, FFPROBE_SHOW_FRAMES.CMD, to
> list a select subset of
> FF-style video metadata. Note the FFprobe commands and the Windows FINDSTR
> command. Perhaps it will
> help you in your task.
>
>
> @ECHO OFF
>
> ECHO Tip: Use "Save As" to save this list.>"%TEMP%\%~nx1 frames.txt"
>
> ECHO.>>"%TEMP%\%~nx1 frames.txt"
>
> ffprobe -sexagesimal -select_streams v -i %1 2>>"%TEMP%\%~nx1 frames.txt"
>
> ffprobe -hide_banner -sexagesimal -select_streams v -show_frames -of flat
> -i %1 | FINDSTR /L
> "key_frame=1 pts dts effort pict_ interlaced top repeat">>"%TEMP%\%~nx1
> frames.txt"
>
> "%TEMP%\%~nx1 frames.txt"
>
> DEL /Q "%TEMP%\%~nx1 frames.txt"
>
>
> Just run
> FFPROBE_SHOW_FRAMES <videofilewithpath>
>
> I put FFPROBE_SHOW_FRAMES.CMD into the Window context menu so I can
> highlight a video file (for
> example, a VOB) and simple right-click and select "FFPROBE_SHOW_FRAMES".
>
> Good luck.
>
> Regards,
> Mark Filipak.
> _______________________________________________
> 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