Home Variables in batch not behaving as expected
Reply: 0

Variables in batch not behaving as expected

user602
1#
user602 Published in April 24, 2018, 10:27 am

I've been wrestling trying to get the syntax right on this batch file and I can't for the LIFE of me figure out why some things aren't working.

1) The variable 'i' is not getting incremented. and 2) Concatenation on strc doesn't seem to want to...well, concatenate.

set i=0
set "strc=concat:"

for %%f in (*.mp4) do (
    set /a i+=1
    set "str=intermediate%i%.ts"

    set strc="%strc% %str%|"

    ffmpeg -i "%%f" -c copy -bsf:v h264_mp4toannexb -f mpegts "%str%"
)

set strc="%strc:-1%"
ffmpeg -i "%strc%" -c copy -bsf:a aac_adtstoasc Output.mp4
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.497899 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO