Hi all
I have this command:
ffmpeg -i C:\Users\HP-620\Desktop\Eventi\59\444.mov -af astats=metadata=1:reset=1,ametadata=print:key=lavf i.astats.Overall.RMS_level:file=log.txt -f null -
the result is a log.txt file.
In the command prompt there are a lot of good info:
[Parsed_astats_0 @ 00000000028d98a0] Channel: 1
[Parsed_astats_0 @ 00000000028d98a0] DC offset: -0.003863
[Parsed_astats_0 @ 00000000028d98a0] Min level: -0.070119
[Parsed_astats_0 @ 00000000028d98a0] Max level: 0.009016
[Parsed_astats_0 @ 00000000028d98a0] Min difference: 0.000000
[Parsed_astats_0 @ 00000000028d98a0] Max difference: 0.042524
[Parsed_astats_0 @ 00000000028d98a0] Mean difference: 0.000214
[Parsed_astats_0 @ 00000000028d98a0] Peak level dB: -23.083313
[Parsed_astats_0 @ 00000000028d98a0] RMS level dB: -36.112468
[Parsed_astats_0 @ 00000000028d98a0] RMS peak dB: -36.112468
[Parsed_astats_0 @ 00000000028d98a0] RMS trough dB: -36.112468
[Parsed_astats_0 @ 00000000028d98a0] Crest factor: 4.481854
[Parsed_astats_0 @ 00000000028d98a0] Flat factor: 0.000000
[Parsed_astats_0 @ 00000000028d98a0] Peak count: 2
[Parsed_astats_0 @ 00000000028d98a0] Bit depth: 40
[Parsed_astats_0 @ 00000000028d98a0] Channel: 2
[Parsed_astats_0 @ 00000000028d98a0] DC offset: -0.003863
[Parsed_astats_0 @ 00000000028d98a0] Min level: -0.070119
[Parsed_astats_0 @ 00000000028d98a0] Max level: 0.009016
[Parsed_astats_0 @ 00000000028d98a0] Min difference: 0.000000
[Parsed_astats_0 @ 00000000028d98a0] Max difference: 0.042524
[Parsed_astats_0 @ 00000000028d98a0] Mean difference: 0.000214
[Parsed_astats_0 @ 00000000028d98a0] Peak level dB: -23.083313
[Parsed_astats_0 @ 00000000028d98a0] RMS level dB: -36.112468
[Parsed_astats_0 @ 00000000028d98a0] RMS peak dB: -36.112468
[Parsed_astats_0 @ 00000000028d98a0] RMS trough dB: -36.112468
[Parsed_astats_0 @ 00000000028d98a0] Crest factor: 4.481854
[Parsed_astats_0 @ 00000000028d98a0] Flat factor: 0.000000
[Parsed_astats_0 @ 00000000028d98a0] Peak count: 2
[Parsed_astats_0 @ 00000000028d98a0] Bit depth: 40
[Parsed_astats_0 @ 00000000028d98a0] Overall
[Parsed_astats_0 @ 00000000028d98a0] DC offset: -0.003863
[Parsed_astats_0 @ 00000000028d98a0] Min level: -0.070119
[Parsed_astats_0 @ 00000000028d98a0] Max level: 0.009016
[Parsed_astats_0 @ 00000000028d98a0] Min difference: 0.000000
[Parsed_astats_0 @ 00000000028d98a0] Max difference: 0.042524
[Parsed_astats_0 @ 00000000028d98a0] Mean difference: 0.000214
[Parsed_astats_0 @ 00000000028d98a0] Peak level dB: -23.083313
[Parsed_astats_0 @ 00000000028d98a0] RMS level dB: -36.112468
[Parsed_astats_0 @ 00000000028d98a0] RMS peak dB: -36.112468
[Parsed_astats_0 @ 00000000028d98a0] RMS trough dB: -36.112468
[Parsed_astats_0 @ 00000000028d98a0] Flat factor: 0.000000
[Parsed_astats_0 @ 00000000028d98a0] Peak count: 2.000000
[Parsed_astats_0 @ 00000000028d98a0] Bit depth: 40
[Parsed_astats_0 @ 00000000028d98a0] Number of samples: 1024
I would write it into the same txt file.
Thanks in advance.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 4 of 4
Thread
-
-
Redirect with "2>" (without qoutation marks"
Code:ffmpeg -i C:\Users\HP-620\Desktop\Eventi\59\444.mov -af astats=metadata=1:reset=1,ametadata=print:key=lavf i.astats.Overall.RMS_level:file=log.txt -f null - 2> logfile.txt
-
you can get all the values into real variables:
Code:@echo off SETLOCAL ffmpeg -i C:\Users\HP-620\Desktop\Eventi\59\444.mov -af astats=metadata=1:reset=1,ametadata=print:key=lavf i.astats.Overall.RMS_level:file=log.txt -f null - 2> logfile.txt for /f "tokens=*" %%a in (logfile.txt) do call :parse "%%a" ENDLOCAL pause exit :parse <a line from txt file> set line=%~1 set line=%line:*]=% set line=%line: =% for /f "tokens=1,2 delims=:" %%x in ("%line%") do call :channel_or_overall %%x %%y goto :eof :channel_or_overall <name of variable> <its value> if /i "%1"=="channel" set "prefix=channel_%2"&goto :eof if /i "%1"=="overall" set "prefix=overall"&goto :eof echo %prefix%_%1=%2 set %prefix%_%1=%2 goto :eof
Code:channel_1_DCoffset=-0.003863 channel_1_Minlevel=-0.070119 channel_1_Maxlevel=0.009016 channel_1_Mindifference=0.000000 channel_1_Maxdifference=0.042524 channel_1_Meandifference=0.000214 channel_1_PeakleveldB=-23.083313 channel_1_RMSleveldB=-36.112468 channel_1_RMSpeakdB=-36.112468 channel_1_RMStroughdB=-36.112468 channel_1_Crestfactor=4.481854 channel_1_Flatfactor=0.000000 channel_1_Peakcount=2 channel_1_Bitdepth=40 channel_2_DCoffset=-0.003863 channel_2_Minlevel=-0.070119 channel_2_Maxlevel=0.009016 channel_2_Mindifference=0.000000 channel_2_Maxdifference=0.042524 channel_2_Meandifference=0.000214 channel_2_PeakleveldB=-23.083313 channel_2_RMSleveldB=-36.112468 channel_2_RMSpeakdB=-36.112468 channel_2_RMStroughdB=-36.112468 channel_2_Crestfactor=4.481854 channel_2_Flatfactor=0.000000 channel_2_Peakcount=2 channel_2_Bitdepth=40 overall_DCoffset=-0.003863 overall_Minlevel=-0.070119 overall_Maxlevel=0.009016 overall_Mindifference=0.000000 overall_Maxdifference=0.042524 overall_Meandifference=0.000214 overall_PeakleveldB=-23.083313 overall_RMSleveldB=-36.112468 overall_RMSpeakdB=-36.112468 overall_RMStroughdB=-36.112468 overall_Flatfactor=0.000000 overall_Peakcount=2.000000 overall_Bitdepth=40 overall_Numberofsamples=1024 Press any key to continue . . .
Last edited by _Al_; 24th Oct 2017 at 16:18.
Similar Threads
-
batch to return the last item in a .txt file
By marcorocchini in forum Newbie / General discussionsReplies: 1Last Post: 8th Sep 2017, 18:53 -
findstring inside a .txt file
By marcorocchini in forum Newbie / General discussionsReplies: 3Last Post: 27th Sep 2014, 20:07 -
can copy file from ftp in dos-prompt?
By marcorocchini in forum Newbie / General discussionsReplies: 1Last Post: 19th May 2014, 05:50 -
How to convert .txt file back to .srt file
By lauramae08 in forum SubtitleReplies: 14Last Post: 28th Jan 2013, 10:26 -
How to convert .txt file back to .srt file
By lauramae08 in forum Newbie / General discussionsReplies: 1Last Post: 27th Jan 2013, 22:39