There is a bash/batch file script:
ffmpeg -i `youtube-dl https://www.twitch.tv/zero` -vf fps=fps=60, scale=1920x1080 -c
Please, pay attention to some points below:
ffmpeg.exe
in a variable, so it can be accessible to youtube-dl
found it.ffmepg.exe
are in same folder/path = .\\
. I’ll save this code by name yt-DL.cmd
Copy only a specific time by: Only edit _tag_1
value: -t 00:60:00
cls && @echo off & setlocal enableextensions enabledelayedexpansion
:: do some with the bat file, after then, for all links need `call :_yd_dl` %1
call :_yd_dl %1
echo/ is done^^!!
goto :eof
:_yd_dl
set "_tag_00=%1"
set "_tag_01= -t 00:60:00 -v error -stats -vf fps=fps=60,scale=1920x1080 -c:v libx264 -preset superfast -c:a copy "
for /f %%i in ('.\youtube-dl.exe -g !_tag_00! ^<nul ') do .\ffmpeg.exe -i "%%i" !_tag_01! .\output.mp4
exit /b
copy full video by:
cls && @echo off & setlocal enableextensions enabledelayedexpansion
:: do some with the bat file, after then, for all links need `call :_yd_dl` %1
call :_yd_dl %1
echo/ is done^^!!
goto :eof
:_yd_dl
set "_tag_0=%1"
set "_tag_1=--ignore-errors --abort-on-error --ignore-config --flat-playlist --geo-bypass "
set "_tag_2=--restrict-filenames --no-part --no-cache-dir --write-thumbnail --prefer-ffmpeg "
set "_tag_3=--ffmpeg-location .\ --postprocessor-args -i "%%(title)s.%%(ext)s" -vf fps^=fps^=60^,"
set "_tag_4=scale^=1920x1080 -c:v libx264 -b:v 500k -preset superfast -c:a copy -f segment -segment_time "
set "_tag_5=60 %%^(title^)s.mp4"
youtube-dl "!_tag_0!" -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best" -o "%%^(title^)s.%%^(ext^)s" !_tag_1!!_tag_2!!_tag_3!!_tag_4!!_tag_5!
exit /b