[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Extra juicy! | Home]

Pls halp me /g/ I've been trying to write a batch script

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 19
Thread images: 6

File: aTAxcBT.webm (956KB, 852x462px) Image search: [iqdb] [SauceNao] [Google]
aTAxcBT.webm
956KB, 852x462px
Pls halp me /g/

I've been trying to write a batch script to convert a directory of GIFs to WebMs.

So far I got:
for %%F IN (*.gif) DO ffmpeg -i "%%F" -an -c:v libvpx -qmax 4 "%%F.webm"


So far it works but it renames the output files with .gif.webm

How do I force the output to be renamed to .webm only? I've been trying to find a solution on google for almost an hour but to no avail.
>>
File: 1446020571754s.jpg (2KB, 124x106px) Image search: [iqdb] [SauceNao] [Google]
1446020571754s.jpg
2KB, 124x106px
If they work just write another script to rename them.

Otherwise I'd say you need to tweak the last string of your script which is telling it to just append webm to the whole file name. I don't know or care enough about batch scripting to help you with that part though. Shouldn't be too hard though.
>>
Bump, I've had this issue as well. Eventually I just gave up and renamed the output files manually. I'd love to see the solution to this.
>>
File: 1430878150794.webm (179KB, 600x450px) Image search: [iqdb] [SauceNao] [Google]
1430878150794.webm
179KB, 600x450px
#! /bin/sh

parallel -j 100% '

ffmpeg -i {} -pix_fmt yuv444p -f yuv4mpegpipe - 2>/dev/null |
vpxenc --codec=vp8 --webm --best --end-usage=cq --cq-level=4 --min-q=0 --max-q=8 -o {.}.webm - 2>/dev/null
printf "finished:\t{.}.webm\n"

' ::: [email protected]

exit $?
>>
>>51428618
I need the windows batch script not the bash one to do gif to webm.
>>
File: 1416172948405.webm (331KB, 346x367px) Image search: [iqdb] [SauceNao] [Google]
1416172948405.webm
331KB, 346x367px
>>51428701
way to pleb this thread up senpai
go back to /v/
>>
Wait I think I got it.
>>
for %%F IN (*.gif) do (
ffmpeg -i "%%~nf.gif" -an -c:v libvpx -qmax 4 "%%~nf.webm"
)
pause


Try that, this makes the script ignore the file extensions.
>>
>>51428618
not sure but I think parallel defaults to -j 100%

and you don't need exit $?, that's default behavior
>>
>>51428898
It doesn't work m8
>>
File: 1447461275684.jpg (17KB, 354x238px) Image search: [iqdb] [SauceNao] [Google]
1447461275684.jpg
17KB, 354x238px
>>51428985
lol, whoops forgot this shit is case sensitive.

for %%f IN (*.gif) do (
ffmpeg -i "%%~nf.gif" -an -c:v libvpx -qmax 4 "%%~nf.webm"
)
pause


Try it now.
>>
>>51429061
Holy shit it worked, it fucking worked! Thank you so much! I was about to fucking lose my mind here.
>>
>>51429061
>~n
It was that fucking simple? Wow.
>>
>>51428776
>thread was about a batch script
>shitposts his bash script on thread
Where did it all go wrong anon?
>>
>>51429237
It's not a bash script it's a shell script.
Bash is not a language in and of itself, but rather a unix shell interpreter that supports some useless extensions.
>>
>>51429299
Ergo, bash script.
>>
File: 019283729387.gif (487KB, 425x315px) Image search: [iqdb] [SauceNao] [Google]
019283729387.gif
487KB, 425x315px
>>51429205
interesting
>>
Bump so other helpless anons can see.
>>
Is there anything I can do for the below code to output on 1 line? The 1st to items are ok, but a newline is inserted for the 3rd item. Trying to make it appear like table columns.

for %%x in (%server_farm%) do ECHO|SET /P="\\%%x        Service1  " & (sc \\%%x query Service1 | FIND "STATE") & (sc \\%%x qc Service1 | FIND "START_TYPE")
Thread posts: 19
Thread images: 6


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]
Please support this website by donating Bitcoins to 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
If a post contains copyrighted or illegal content, please click on that post's [Report] button and fill out a post removal request
All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site. This means that 4Archive shows an archive of their content. If you need information for a Poster - contact them.