Closed ghost closed 6 years ago
Thank you! This would also fix #27
That was quick. However, you're requesting the stream duration instead of the format duration which can result in an output of N/A
for some inputs such as Matroska (MKV). If that's a potential issue you can use the command in my first comment, or the "Format (container) duration" example in the FFwiki to get the format duration.
Regarding
scripts/extractClipGetInfo/
and other scripts. The stderr output fromffmpeg
is not meant to be machine parsed. Instead, you can useffprobe
to get a standard, simpler, and machine parseable output. Since it will provide just the duration (in seconds) you can also avoid the additionalgrep
,cut
,sed
, andawk
processes. Example:See the
ffprobe
documentation and FFmpeg Wiki: FFprobe Tips for more info.