[MEncoder-users] What's wrong with this script (encoding x264 in mkv-container)

Kerry Kirk my1kwords at gmail.com
Mon Mar 23 23:59:38 CET 2009


On Mon, Mar 23, 2009 at 12:38 PM, Moritz Barsnick <barsnick at gmx.net> wrote:

> On Sun, Mar 22, 2009 at 16:51:55 -0400, Kerry Kirk wrote:
> > The first thing I would try is changing *.mpg to `ls *.mpg`.
>
> Would you be so kind to let this advanced shell user (myself) know what
> difference you think this makes?
>
> Thanks,
> Moritz
>
> P.S.: What I'm meaning to say: Except for perhaps very special cases,
> the latter is a very complicated way to express the same thing as the
> former.
> _______________________________________________
> MEncoder-users mailing list
> MEncoder-users at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
>

He said that the former didn't work in his situation.
>If I replace *.mpg with 1 existing filename, the script works.

I haven't tested mencoder with *.mpg so I don't know if it should work but
didn't in his case for some yet undiscovered reason.  I do know that I have
used the latter and it works fine.

Where I have used it... Say I create/convert a number of videos by calling
mencoder in a loop with the ultimate goal of combining some or all of them.
The latter is one way to do it without having to list out all of the
filenames individually.  Alternately I suppose you could just create a
string variable containing the names as you iterate through the loop and
then replace the `ls` statement with the variable.  I've never worked with
arrays in bash but perhaps that could also be a way to go if you are so
inclined.

If there is a better way I am all ears.


More information about the MEncoder-users mailing list