Video file conversion with Windows batch file

Recently I had encountered with a video problem and solved it, so thought why not to share this with my readers. This may be very useful for some of you.

Problem: Received one video file in AVI format. Need to do editing as instructed. Video plays fine in VLC player. Actually this video is captured with a hand held camera. So my first thought was how come the video format is in AVI? AVI is uncompressed format and hand held camera generally generate MOV format. I tried to open provided AVI format in Adobe Premier CS5.5….for my surprise it’s failed. I was only getting audio symbol in my Adobe Premier project ??? I tried everything to import and run this file in Adobe Premier  and even in Adobe Auditions etc. but no success. I checked and found that may be this is due to some missing codec or somebody during conversion of AVI done something wrong? Now the problem is if you can’t open this file in any software how can you convert it into another format? I can’t ask client to provide me new file because project had very tight deadline, crucial at that time. Anyhow I need to solve the problem and provide edited video to client next morning.

Solution: I checked internet resources and forums, and found a solution which is worth to share with you. When you are not able to open this AVI in any software than how can you convert it in other format? Yes simple, this will work for Windows users only. Remember this will use VLC so not to forget to install VLC in your system (If that is not already install). Now just open a notepad file, and write this code in it:

@ECHO OFF

for %%a in (*.avi) do “C:\Program Files (x86)\VideoLAN\VLC\vlc” -I dummy “%%a” –sout=#:file{dst=”%%~na”.mp4} vlc://quit

Now save this notepad file with name “avi2mp4.bat” in same location where your video file is located. Notepad file icon gets changed into BAT(Windows batch) file icon. Now drag your AVI video file on to this newly created BAT file. You are done J…Now your AVI file converted into MP4 as mentioned in BAT file script. Remember it’s a simple solution but every time you convert files into MP4 you need to compromise with quality a little. It create generation loss for your video file. Instead of drag and drop you can just double click the BAT file, it will convert all AVI files present in that folder to MP4.

Hope this will helpful for you people…

Keep visiting this site for more information J Have a nice day.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Copy link
Powered by Social Snap