I am trying to convert m3u8 files to an mp4 file using FFmpeg, I wrote a batch script that asks the user to enter the URL for the m3u8 file, when I enter the URL for the first time the variable %url%
states empty when I enter the value for the second time it holds the input from the first input and ignore the new input
@echo off
setlocal
:while
set /p "choice=Enter q to quit , e to continue : "
if %choice% == e (
set /p "url=Enter file url ( .m3u8 ) : "
echo "%url%"
ffmpeg -i %url% -c copy "%random%.mp4"
pause
cls
goto :while
) else (
if not "%choice%" == "q" goto :while
)
cls
endlocal
e.g if I enter for the first time "example.m3u8" it will print and use an empty string when I enter for the second time "example2.m3u8" it will print and use "example.m3u8".
I hope someone will have an explanation for this problem and thank you for your time.