Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have several video files in a directory and I want to convert all of them into other video formats.
Is there any way that I can convert all of them in just one go using FFMPEG. I mean without having to make a shell script for doing so.

share|improve this question
5  
What about a simple for loop? for i in *.mkv;do ffmpeg -i "$i" …;done –  Marco Jul 22 '12 at 15:14
add comment

1 Answer

up vote 3 down vote accepted

The easiest way would be to use a for loop of your shell of choice. This task is so simple, you can just use the prompt, there's no need to create a shell script.

Here is the one-liner as an example for the widely-used bash (and compatible):

for i in *.mkv; do ffmpeg -i "$i" … ;done
share|improve this answer
    
Thanks, that's what I did. –  Hamed Momeni Jul 22 '12 at 18:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.