Hello Members
I am trying to Watermark my videos using Batch Script,
I Had Previously Created a .bat Files Which is almost Good
and Now i am trying to add burn subtitle cmd but Getting error When i Run Batch File
but i tried to print the final cmd, and When I Manually copy paste cmd and run then, it Worked For me
Please Guide Me the exact issue, and How to Set subtitle Path on cmd
I had added option to Crop (Top and Bottom)
Please See Below
But when i Directly Run Cmd then i am Getting ErrorCode:@echo off set %1 set /p x=crop on Top (px): set /p y=crop on Button (px): set /a z = x + y echo %z% IF NOT DEFINED Title SET "Title=encoded" :MENU SET /P M= Choose Quality : Press [1] : IF %M%==1 GOTO 480 :480 echo "C:\Users\Alone\Downloads\Video\Screenshots\ffmpeg.exe" -i %1 -vf "ass=subtitle.ass, crop=w=iw:h=ih-0%z%:x=0:y=0%x%, scale=720:-4" -c:v libx264 -b:v 375k -minrate 375k -maxrate 375k -bufsize 375k -preset medium -c:a aac -b:a 48k "%~dpn1-%Title%-480p.mkv" Pause exit
Please Help me to Fix this issue
Thanks
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 4 of 4
Thread
-
-
Hi.
I did only 1 test. It worked for me.
Code:@echo off :: Output goes into the \New folder. if not exist New\ md New Title "%~n1" set /p x=crop on Top (px): set /p y=crop on Button (px): set /a z = x + y echo %z% :MENU SET /P M= Choose Quality : Press [1] : IF %M%==1 GOTO 480 :480 "C:\Users\Alone\Downloads\Video\Screenshots\ffmpeg.exe" -i "subtitle.ass" -i %1 -vf crop=w=iw:h=ih-0%z%:x=0:y=0%x%,scale=720:-4 -c:v libx264 -b:v 375k -minrate 375k -maxrate 375k -bufsize 375k -preset medium -c:a aac -b:a 48k -c:s ass "New\%~n1-encoded-480p.mkv" Pause exit
Code:"C:\Users\Alone\Downloads\Video\Screenshots\ffmpeg.exe" -i "subtitle.ass" -i %1 -vf crop=w=iw:h=ih-0%z%:x=0:y=0%x%,scale=720:-4 -c:v libx264 -preset medium -crf 22 -c:a aac -b:a 128k -ar 48000 -c:s ass -threads 0 "New\%~n1-480p.mkv"
This requires several changes to your batch file.
Perhaps this might be a better way to go.
https://arccoder.medium.com/ffmpeg-add-a-logo-on-video-bf1f4652792a
CheersLast edited by pcspeak; 11th Jun 2021 at 17:35. Reason: Forgot the 'k' on audio bitrate :(
-
Don't know if it was a finger check or not but the original example is missing the final quote after .ass
"ass=subtitle.ass, crop=w=iw:
. -
Hi Budman1.
Don't know if it was a finger check or not but the original example is missing the final quote after .ass
Code:-vf "ass=subtitle.ass, crop=w=iw:h=ih-0%z%:x=0:y=0%x%, scale=720:-4"
It's just another thing for me to get wrong.
Cheers.Last edited by pcspeak; 12th Jun 2021 at 14:50.
Similar Threads
-
Batch Script for FFMPEG TIFF Conversion
By Jolly Green in forum ProgrammingReplies: 5Last Post: 30th Sep 2020, 14:11 -
Useful FFmpeg Windows Batch Script
By Guanadon in forum Newbie / General discussionsReplies: 0Last Post: 22nd Sep 2020, 10:48 -
FFMPEG Batch Script wanted for H265 Remux
By VideoFanatic in forum Video ConversionReplies: 5Last Post: 21st Jan 2018, 10:38 -
FFmpeg Subtitle not taking sub.ass file path
By shahid109 in forum SubtitleReplies: 7Last Post: 12th Jun 2017, 23:36 -
Need help with ffmpeg script to batch convert audio in MKV files
By mikeveli20 in forum AudioReplies: 5Last Post: 18th Nov 2016, 13:21