Announcement

Collapse
No announcement yet.

batch convert wmv

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    batch convert wmv

    I am looking to convert tons of wmv files to a divx compatible avi file. I have been reading about mencoder and ffmpeg and they seem to both do what I want however I would have to do one at a time which is to time consuming for all the files I have. I basically want to ready my 200gb of wmv to work on my dvd player.

    Oh what kind of quality loss will I face when I convert?

    #2
    Re: batch convert wmv

    the new preview version of avidemux can open/decode wmv to any other format and i think it has a batch mode/feature, but i'm not sure...
    <br />

    Comment


      #3
      Re: batch convert wmv

      This seems to work:

      Make text file (convert.sh) and put there:
      Code:
      #!/bin/bash
      
      FLIST=`ls -1 $1 | grep wmv`
      for F in $FLIST
      do
        mencoder $F -ovc xvid -xvidencopts pass=1 -oac copy -o /dev/null
        mencoder $F -ovc xvid -xvidencopts pass=2:bitrate=1000 -fps 23 -oac mp3lame -lameopts cbr:br=96:mode=0 -o $F.avi
      done
      Put it at the same folder as the wmv's are. In the konsole:
      Code:
      sh convert.sh
      This script will do two pass conversion from wmv to avi (xvid, mp3).

      Tried this with four wmv clips (15 sec, 640x480, 1,8 M) VLC told:
      Sound codec wma2
      Bitrate 96 kbps
      Windows Media Audio 9
      Video codec WMV 3
      Windows Media Video 9
      Frame rate 23fps

      After conversio i have four avi (xvid, 2,0 M)
      Audio codec MP3
      Bitrate 96 kbps
      Video codec XVID
      Frame rate 23 fps

      Note
      This doesn't remove original wmv's.
      New avi's are named as: interesting.wmv -> interesting.wmv.avi.

      More:
      man mencoder

      Mplayer/mencoder home
      http://www.mplayerhq.hu/design7/news.html
      Before you edit, BACKUP !

      Why there are dead links ?
      1. Thread: Please explain how to access old kubuntu forum posts
      2. Thread: Lost Information

      Comment


        #4
        Re: batch convert wmv

        Is it just me, or did you write a Bash script and execute it with sh?
        For external use only.

        Comment


          #5
          Re: batch convert wmv

          Is it just me, or did you write a Bash script and execute it with sh?
          Do you mean something like this ?

          http://www.linuxforums.org/forum/lin...nnoyances.html
          It annoys the hell outta me when people write bash scripts with #!/bin/sh! sh is not bash! Many systems (mine included) have /bin/sh as sh and not bash, so when bash scripts call /bin/sh and start using bash only features, it doesn't work. Took me a little while to figure out why some init scripts I got weren't working, until I realized that.

          So, if you are writing a bash script, use #!/bin/bash please. Assuming everyone has /bin/sh linked to bash is wrong. If you're writing a sh script, please test it with sh and not bash.

          Note
          In Dapper /bin/sh is symlink pointing to bash
          In Feisty /bin/sh is symlink pointing to dash

          In Dapper:
          ~$ whatis sh
          sh (1) - GNU Bourne-Again SHell
          :~$ whatis bash
          bash (1) - GNU Bourne-Again SHell
          :~$ whatis dash
          dash (1) - command interpreter (shell)
          And in Feisty:
          :~$ whatis sh
          sh (1) - command interpreter (shell)
          :~$ whatis bash
          bash (1) - GNU Bourne-Again SHell
          :~$ whatis dash
          dash (1) - command interpreter (shell)

          So In the konsole:
          Code:
          bash convert.sh
          Or convert.sh starts
          Code:
          #!/bin/sh
          ...
          and in the konsole:
          Code:
          sh convert.sh

          Link:
          DashAsBinSh
          https://wiki.ubuntu.com/DashAsBinSh
          Before you edit, BACKUP !

          Why there are dead links ?
          1. Thread: Please explain how to access old kubuntu forum posts
          2. Thread: Lost Information

          Comment

          Working...
          X