Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using the following code to convert a video to an image:

ffmpeg -i foo.avi -r 1 -s 640x480 -f image2 foo-%03d.jpeg

However when I use it in my c program the % is causing problems even if I escape it. Is there any way to do it without the %. Also what exactly does the % mean in the above program?

share|improve this question
    
How you run this code in your programm? –  Dador Jul 28 '12 at 11:24
    
%03d means 3-digit numbers padded with zeroes: 001, 002 ... Sorry, are you running ffmpeg command line from within a c? –  Art Shayderov Jul 29 '12 at 12:25
    
Yep.Using the system() to call it! Anyway I figured it out. So no worries! –  Sab Aug 1 '12 at 6:47
    
If you've figured it out, please post your answer so someone else can benefit. –  Assad Ebrahim Aug 28 '12 at 20:31
add comment

1 Answer

  1. Try write this code to file and then execute file.
  2. Try double escape, such as "\%".
share|improve this answer
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.