bash - Problems when batch converting .aea files using ffmpeg

07
2014-07
  • zanfona

    I'm running into a problem when using a bash for loop to convert all .aea files in a directory using ffmpeg (in this case, to .wav). I'm using the following:

     for f in *.aea; do ffmpeg -i "$f" “${f%.aea}.wav"; done
    

    I immediately receive:

    >
    >
    

    And can issue no further commands. Conversion file-by-file using, e.g.:

     sudo ffmpeg -i "Track 19.aea" Track019.wav
    

    works just fine.

  • Answers
  • slhck

    Your third quote is a typographic opening quote instead of a standard typewriter ".

    That could very well cause the problems you're experiencing, making Bash wait for you to enter a closing quote.


  • Related Question

    How to convert .flv file to .3gp using ffmpeg?
  • Questioner

    I have converted any video format to 3gp file format using ffmpeg on one server. But on another server it not works.

    Following is my script:

    exec("ffmpeg -i test.flv -sameq -acodec libmp3lame -ar 22050 -ab 96000
        -deinterlace -nr 500 -s 320x240 -aspect 4:3 -r 20 -g 500 -me_range 20
        -b 270k -deinterlace -f flv -y test.3gp ");
    

    Can anyone tell me what is wrong in script?

    Following is my ffmpeg setting:

    root@ninja [~]# ffmpeg -formats ffmpeg version CVS, build 3277056, Copyright (c) 2000-2004 Fabrice Bellard configuration: --enable-mp3lame --enable-libogg --enable-gpl --disable-mmx --enable-shared built on Jun 17 2009 10:51:43, gcc: 4.1.2 20080704 (Red Hat 4.1.2-44)


  • Related Answers
  • David

    The "-f flv" isn't right. You're encoding to 3gp, not flv. I think the acodec should be aac, and vcodec should be h263, unless the 3gp codec is broader than I thought.

    A third thing is that at some version they changed the naming of the codecs. If you have an old version of ffmpeg (it says 2004), it might be "mp3" instead of "libmp3lame", unless my memory is backwards.

    You have some conflicting parameters too, but ffmpeg probably just goes with the last. -sameq (match quality of source) conflicts with -b (adjust quality for constant bitrate), and you have -deinterlace twice.

  • Colin Pickard

    Are you not able to capture any error messages from your script?

    I assume that output is from your first server? check that the version of ffmpeg on the second server supports flv and 3gp, I know some versions of linux ship with a crippled version of ffmpeg due to patent concerns in some countries.