HI
I'm trying to write a TXT file with the luma level frame by frame of a MPEG file.
Is possible with FFMPEG or another software?
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 17 of 17
Thread
-
-
Of course but you may try something else too: http://forum.doom9.org/showthread.php?t=174951 (ffmpeg links at bottom).
-
AviSynth's ColorYUV(analyze=true) will show the min, max, and average luma for each frame. It also shows the "loose min/max" values which excludes a small fraction of the lowest and highest values (typically noise). It also reports all those values for the U and V channels.
But you'll have to install AviSynth, a third party source filter (LSmash or DGMpegDec), and learn some basic scripting -- it's a plain text based scripting language. A simple script may look like:
Code:LWlibavVideoSource("filename.mpg") # open the video ColoryUV(analyze=true) # show statistics
I don't know exactly what your purpose is but a waveform monitor is generally more useful once you know what it means:
See: https://forum.videohelp.com/threads/340804-colorspace-conversation-elaboration#post2121568
Most video editors have such a display. Sony Vegas, for example.Last edited by jagabo; 18th Oct 2017 at 07:45.
-
Yes, a script like:
Code:LWlibavVideoSource("filename.mpg") # open the video WriteFile("log.txt", "current_frame", """ ": " """, "YPlaneMin()", """ " " """, "AverageLuma()", """ " " """, "YPlaneMax()")
Code:0: 18 43.566303 76 1: 18 44.037815 77 2: 18 44.120975 77 3: 18 44.077927 76 4: 18 44.195461 76 5: 18 44.211269 73 6: 18 44.253765 74 7: 18 44.409962 71 8: 18 44.315586 66 9: 18 44.463371 67 10: 18 44.581181 61 11: 18 44.803864 61 12: 18 44.746212 65 13: 18 44.508266 63 14: 18 44.228722 63 15: 18 44.386868 62
-
-
Thanks for help
I'm trying a result like this, not for audio but for video:
ffmpeg -i input.mov -af astats=metadata=1:reset=1,ametadata=print:key=lavf i.astats.Overall.RMS_level:file=log.txt -f null -
A file log.txt with video valuesLast edited by barabba2005; 19th Oct 2017 at 02:54.
-
-
https://www.ffmpeg.org/ffmpeg-filters.html#signalstats-1
Code:@ffmpeg -v quiet -stats -i "%1" -vf:? "signalstats,metadata=print:key=lavfi.signalstats.YAVG:file='v.%~n1.txt'" -af:? "astats=metadata=1:reset=1,ametadata=print:key=lavfi.astats.Overall.RMS_level:file='a.%~n1.txt'" -f null -
Last edited by pandy; 19th Oct 2017 at 07:33.
-
You welcome, btw i've modified slightly provided example - by adding ':?' to '-vf' i.e. '-vf:?' and '-af' i.e. '-af:?' - this create more flexible/universal ffmpeg behaviour (audio/video, audio only and video only files can be analysed within single ffmpeg - good for some automated file processing).
-
-
Honestly i've discovered this today trying to verify above example - without this ffmpeg was able to calculate signal statistic if both components (audio and video) was present at the input (as there is video and audio filtering involved), without one of components ffmpeg ended with error - as i've used before selective filtering (you can filter only selected audio or video track by explicitly calling filter only for component such as -vf:3 ".." -af:7 ".." etc) so tried to use general '?' which allow ffmpeg to ignore missing component and it works - currently you can call vf for audio only input and it will be ignored by ffmpeg.
This is very nice as seem lot of people struggle with ffmpeg on missing component behaviour - personally i think it should be some global option (flag?) implemented to ignore missing components .
Seem this is more or less in-line with https://ffmpeg.org/ffmpeg-all.html#Advanced-options (need to check if it works for output mapping if component is not present on input - seem there is issue that in such case first component is reused on output).
Sorry for above explanation - i'm not a programmer and ffmpeg is frequently "undocumented"...
Similar Threads
-
Avisynth, Change Chroma not Luma
By lolman in forum EditingReplies: 4Last Post: 18th Oct 2015, 11:33 -
H.263 Profile 3 Level 10 (video) and MPEG-4 AAC
By mfm_14 in forum Newbie / General discussionsReplies: 0Last Post: 21st Jul 2014, 06:32 -
U-Matic Luma Smearing?
By John97 in forum RestorationReplies: 14Last Post: 22nd Jun 2014, 12:25 -
batch reencoding level 5 to level 4.2 mkv
By d_unbeliever in forum Video ConversionReplies: 6Last Post: 9th Aug 2013, 06:30 -
Best luma brightening filter for VirtualDub?
By callmebc in forum EditingReplies: 19Last Post: 27th Jan 2013, 14:25