If I use ffprobe to output the duration of a video file with:
ffprobe -i input.mkv -show_entries format=duration -v quiet -of csv="p=0"
I will get something like
How can I get the output in second only without the decimals? I do not mind if ffmpeg or Mediainfo has a better function for this. I just need to get the output in seconds.
I am using CMD in Win10.
ffprobeto do what you want, but you can truncate or round the duration value using your preferred shell or scripting language.
[math]::round(x). Note that you'll have to extract the number from ffprobe's output somehow.
[math]::round((ffprobe 'input.mkv' -show_entries format=duration -v quiet -of csv="p=0"))works in powershell. Note the double brackets.