Similar to the first EitanT solution, but without using GOTO.
ffmpeg -i %namefile%.mp4 -c:v libx264 -crf 19 %destinationfile%.flv if errorlevel 1 ffmpeg -i %namefile%.mp4 -c:v libx264 -ar 22050 -crf 28 %destinationfile%.flv
or
Edited - the code has been truncated, now everything is fixed
ffmpeg -i %namefile%.mp4 -c:v libx264 -crf 19 %destinationfile%.flv||ffmpeg -i %namefile%.mp4 -c:v libx264 -ar 22050 -crf 28 %destinationfile%.flv
Similar to EitanT's second solution, but without using GOTO
ffmpeg -i %namefile%.mp4 -c:v libx264 -crf 19 %destinationfile%.flv if not exist %destinationfile%.flv ffmpeg -i %namefile%.mp4 -c:v libx264 -ar 22050 -crf 28 %destinationfile%.flv
source share