Article 6R5ZD ffmpeg / ffprobe fast section volume bash

ffmpeg / ffprobe fast section volume bash

by
blumenwesen
from LinuxQuestions.org on (#6R5ZD)
I'm looking for a quick way to measure the volume of a section with ffmpeg or ffprobe.

The command
Code:ffmpeg -hide_banner -nostats -ss "0:2:43.163" -to "0:2:55.173" -i "VIDEO.mp4" -af volumedetect -vn -f null - 2>&1outputs a lot of superfluous information without any prior option for abbreviation and the information "max_volume: -??.??" is sometimes missing, which makes calculations impossible.

With the command
Code:ffprobe -v error -hide_banner -show_entries frame=pkt_pts_time:frame_tags=lavfi.astats.Overall.RMS_level -of default=noprint_wrappers=1:nokey=1 -f lavfi amovie="VIDEO.mp4",asetnsamples=$(ffprobe -i "VIDEO.mp4" -v error -hide_banner -show_entries stream=sample_rate -of default=noprint_wrappers=1:nokey=1),astats=metadata=1:reset=1,atrim=15000:15060,aselect="between(n\,15001\,1003)"it takes forever to read if the file is larger, even from one section, i didn't want to save an extra file.

How is it possible to safely and quickly produce output similar to "mean_volume: -08.15" or "max_volume: -24.10", eventualy without having to cut off with "sed" or "awk" afterwards?
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments