Answer the question
In order to leave comments, you need to log in
How can I write 2 expressions to a bat file?
Maybe I didn't express myself correctly in the question (don't throw stones).
I want something to execute first one part of the code, then the other one below.
But I only have 1 piece of code running. The second is ignored.
Can you tell me how can I record it?
PS The line in the code ping -n 1 -w 3000 192.168.254.254 >nul
is not needed, it is for me to see when the 2nd part of the code starts to work. Which doesn't work at all..
color a
@echo off
set a="Your_files\*.mp4"
set b="Result\file-%%03d.jpg"
set c=ffmpeg
set f=-vf fps=10
for %%a in (%a%) do (%c% -y -i "%%a" %f% %b%)
ping -n 1 -w 3000 192.168.254.254 >nul
set a1="Result\file-%%03d.jpg"
set b1="Result\video.mp4"
set c=ffmpeg
set f1=-f image2 -r 3
for %%aa in (%a1%) do (%c% -y -i "%%aa" %f1% %b1%)
Answer the question
In order to leave comments, you need to log in
I want to replace another mistake. Now everything works.
I stuck the %f1% variable in the wrong place, here is a ready-made solution.
color a
@echo off
set a="Your_files\*.mp4"
set b="Result\file-%%03d.jpg"
set c=ffmpeg
set f=-vf fps=10
for %%a in (%a%) do (%c% -y -i "%%a" %f% %b%)
set a="Result\file-%%03d.jpg"
set b="Result\video.mp4"
set c=ffmpeg
set f=-f image2 -r 3
for %%a in (%a%) do (%c% -y %f% -i "%%a" %b%)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question