You can futher pipe it to sed ... | sed 's/\sfps//' to keep only the 25, and store it into a variable, so you can use that variable to convert the videos e.g. ffmpeg -r $originalFps.
grep -o will extract the match, instead of the whole line containing the match.
发布评论
评论(1)
要获取原始帧速率:
示例输出:
您可以进一步将其通过管道传输到 sed
... | sed 's/\sfps//'
仅保留25
,并将其存储到变量中,以便您可以使用该变量来转换视频,例如ffmpeg -r $originalFps
。grep -o 将提取匹配项,而不是包含匹配项的整行。
[0-9]\{1,3\}
将匹配一到三位数字\sfps
将匹配后跟“fps”的空格To get the original frame rate:
Example Output:
You can futher pipe it to sed
... | sed 's/\sfps//'
to keep only the25
, and store it into a variable, so you can use that variable to convert the videos e.g.ffmpeg -r $originalFps
.grep -o
will extract the match, instead of the whole line containing the match.[0-9]\{1,3\}
will match one to three digits\sfps
will match a white space followed by 'fps'