Home > OS >  Batch file HH:MM:SS convert to seconds Youtube-DL get-duration
Batch file HH:MM:SS convert to seconds Youtube-DL get-duration

Time:10-06

So I am using Youtube-DL and I made the following method to get a duration output of a video but the issue i have is the time returned is in Hours Minutes and seconds when i need it to be seconds only.

SET root_path=%~dp0

For /f "delims=" %%x in ('
%root_path%youtube-dl.exe --get-duration "https://youtu.be/hRgcgcTP7nM"
') do set "data=!data!%%x"
echo Video Length is            
  • Related