Over a million developers have joined DZone.

Win32 Ffmpeg Fetch Video Duration

·
// get video duration through shell using ffmpeg on windows


s = `ffmpeg -i x:\\dir\file.wmv 2>&1`
if s =~ /Duration: ([\d][\d]):([\d][\d]):([\d][\d]).([\d]+)/
  hours = $1
  mins = $2
  seconds =$3
  fractions = $4
end
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}