[MPlayer-dev-eng] [SURVEY] change mencoder's default ofilename extension?

The Wanderer inverseparadox at comcast.net
Tue Dec 13 19:06:39 CET 2005


Reynaldo H. Verdejo Pinochet wrote:

> On Tue, Dec 13, 2005 at 12:03:23AM -0500, The Wanderer wrote:
> 
>> Reynaldo H. Verdejo Pinochet wrote:

>>> Wait.. this has a bad gotcha, mencoder -of mpeg with no explicit
>>> -o will fire the warning, mencoder will complain for something he
>>> did wrong, choosing test.avi.
>> 
>> This (the default output filename having the wrong extension for
>> anything but -of avi) is exactly the problem the thread was
>> originally about fixing!
> 
> ;) I agree, thats why I finaly updated the patch.

I still don't think that either a) the two problems should be fixed in a
combined way or b) the 'force -o' option is the ideal solution to the
original problem... although I'll admit that, if the documentation makes
it explicitly clear that 'o=' can validly go into the config file,
'force -o' is probably the second best solution available.

>> As I've said, I believe that these are essentially two separate
>> problems, with their own separate solutions. Oded appears to
>> disagree, but I haven't heard anyone else weigh in on that
>> question.
> 
> the two problems are closely related, we may just fix both of them
> with a single commit. give it a try, think about it a little, anyway
> youre the one who most activelly followed this thread, Ill not commit
> this if you or any other dev dont like it. Id rater call it closed
> without solution.

I don't think that any available single solution fixes both problems; at
best it would fix one problem and insert a workaround for the other.
Your currently pending patch does both in a single commit, yes, but that
doesn't change the basic situation.

The ideal solution as I see it would be to automatically select a valid
extension for the container format used if no output filename was
specified (and, perhaps, print such a warning message if the extension
in '-o' does not match the container - but *no* message if no extension
exists), based on the value of '-of' (and, in the case of -of lavf,
-lavfopts format). I can design the correct procedure in my head, but I
don't know the code well enough to know how hard it would be to actually
implement.

>>> solution: mix this with the force -o option. see patch below
>> 
>>> +#define MSGTR_MencoderWrongFormatAVI "\nWARNING: OUTPUT FILE FORMAT IS _AVI_. see -of help.\n"
>>> +#define MSGTR_MencoderWrongFormatMPG "\nWARNING: OUTPUT FILE FORMAT IS _MPEG_. see -of help.\n"
>>> +#define MSGTR_MissingOutputFilename "Output filename (-o) is now mandatory\n"
>> 
>> In any case, this phrasing is not very good in my opinion (and
>> certainly would become obsolete in the long run) - something like
>> "No output file specified" (with perhaps a mention of the -o
>> option, I'm a little too tired at the moment to come up with good
>> phrasing from scratch) might be better.
> 
> You know my english is barely understandable. you will probably lol
> if I told you that I rewrote that at last 4 times. I'm missing the
> documentation patch too ;)

Even now that I've rested, I'm still not being able to come up with
anything better than close variants of "No output file specified, please
see the -o option".


In reference to your other post: yes, strcasecmp is less portable than
strcmp, but as Reimar said we already use it all over the place so why
not use it again here?

If we care that much about portability (as we may), it shouldn't be
impossible to implement our own basic strcasecmp to be used in
environments where it is not provided externally... but I'm a little bit
reluctant to go in that direction, since I don't think people were more
than about half joking when they suggested an mplibc some time ago.

-- 
       The Wanderer

Warning: Simply because I argue an issue does not mean I agree with any
side of it.

Secrecy is the beginning of tyranny.




More information about the MPlayer-dev-eng mailing list