Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8040935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T04:03:25+00:00 2026-06-05T04:03:25+00:00

I have created a little batch file for helping people to convert MP4 video

  • 0

I have created a little batch file for helping people to convert MP4 video to FLV with FFMPEG. A way to make it simple to everyone i know to use it. I was thinking the line i’ve put in was perfect for every situation (converting a MP4 file to FLV), but few days ago, it didn’t work for a file. (audio sample to high for FLV format)

I found with the help of people a other codeline to convert it, but i don’t know how to correctly integrate it, in my batch file.

There is what i use right now :

echo “Enter the name of the file, whitout the extension” : set
/p namefile=

echo “Enter the name you what to give to the destination file” : set /p destinationfile=

ffmpeg -i %namefile%.mp4 -c:v libx264 -crf 19 %destinationfile%.flv

And i want to add a “IF”. Because if that doesn’t work with this line, use that one :

ffmpeg -i %namefile%.mp4 -c:v libx264 -ar 22050 -crf 28
%destinationfile%.flv

How can i do that ?

Thank you very much for your help and if i’m unclear on something, just tell it to me and i will do my best to make it clear.

Thanks !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T04:03:27+00:00Added an answer on June 5, 2026 at 4:03 am

    I’m not sure if FFMPEG returns a standard error code in case of failure, but if it does, you can use the following:

    ffmpeg -i %namefile%.mp4 -c:v libx264 -crf 19 %destinationfile%.flv
    if not errorlevel 1 goto Done
    ffmpeg -i %namefile%.mp4 -c:v libx264 -ar 22050 -crf 28 %destinationfile%.flv
    :Done
    

    If this approach doesn’t work, you can check the existence of the destination file to determine further action:

    ffmpeg -i %namefile%.mp4 -c:v libx264 -crf 19 %destinationfile%.flv
    if exist %destinationfile%.flv goto Done
    ffmpeg -i %namefile%.mp4 -c:v libx264 -ar 22050 -crf 28 %destinationfile%.flv
    :Done
    

    Hope one of these works.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a little program that reads in a Java file and feeds
I have created a few little programs that export data to a text file
I have created a little test project to try to resolve a problem I
I have created a little example,please have a look, http://jsfiddle.net/bWTwL/ I want to have
Hi I have created a little application to move some files around and put
Ok, I have created a little utility with AppleScript and used Automator to turn
I am a little stuck. I have created almost everything in the picture below.
I have a page which contains a jQuery-UI horizontal slider, created using a little
I'm a jQuery newbie, and I have trouble with a little script I created.
I have created a little example(below) on my attempt to safely stop multiple threads

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.