Results 1 to 4 of 4

Thread: mencoder multiple flv to avi

Hybrid View

  1. #1
    Join Date
    Jan 2010
    Location
    Andorra
    Beans
    35
    Distro
    Ubuntu

    mencoder multiple flv to avi

    I'm using mecoder to encoder multiple flv to avi, using

    for file in *.flv; do mencoder -oac mp3lame -ovc lavc "$file" -o "$file".avi"; done

    ... and I'm getting *****.flv.avi and have to use gprename to get rid of the .flv (i've seen another nautilus-script that is doing the same thing also)

    ..can you please help me make this command work properly?

  2. #2
    Join Date
    Sep 2009
    Beans
    401
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: mencoder multiple flv to avi

    Code:
    for file in *.flv; do mencoder -oac mp3lame -ovc lavc "$file" -o "`echo $file | sed -e 's/\.flv$/\.avi/'`"; done

  3. #3
    Join Date
    Jan 2010
    Location
    Andorra
    Beans
    35
    Distro
    Ubuntu

    Re: mencoder multiple flv to avi

    That's great, thanx!

    cd flvs/
    for file in *.flv; do mencoder -oac mp3lame -ovc lavc "$file" -o done/"`echo $file | sed -e 's/\.flv$/\.avi/'`"; done

    moves them too, I'd better google sed huh?

  4. #4
    Join Date
    Dec 2006
    Beans
    7,317

    Re: mencoder multiple flv to avi

    Hi Linton,

    Quote Originally Posted by LintonHanes View Post

    Code:
    for file in *.flv; do mencoder -oac mp3lame -ovc lavc "$file" -o "$file".avi"; done
    ... and I'm getting *****.flv.avi and have to use gprename to get rid of the .flv (i've seen another nautilus-script that is doing the same thing also)
    An alternative is to use:

    Code:
    for f in *.flv
      do 
      mencoder -oac mp3lame -ovc lavc "$f" -o "${f%.flv}.avi"     
    done
    All the best,

    Andrew
    You think that's air you're breathing now?

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •