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

The Wanderer inverseparadox at comcast.net
Mon Nov 28 22:06:27 CET 2005


On 11/28/2005 02:52 PM, Oded Shimon wrote:

> On Mon, Nov 28, 2005 at 02:58:41PM -0300, Reynaldo H. Verdejo
> Pinochet wrote:
> 
>> On Mon, Nov 28, 2005 at 12:16:58PM -0500, The Wanderer wrote:
>> 
>>> There is, of course, a fourth possibility, even though it may be
>>> too difficult to code feasibly at this stage: detect the file
>>> type and determine the default filename (or, rather, the default
>>> extension) based on that. I don't expect anyone to support that
>>> unless they're willing to do the work necessary to code it, but
>>> the option does theoretically exist, and it is in principle
>>> probably the most correct way.
>> 
>> lets just add this as '4.-' to the poll, I totally forgot it, weird
>> toh in my first post I suggested this as a solution too.
> 
> I suggest a variant of this idea - keep everything the same, except:
> a BIG FAT warning, when you use an output file extention which
> doesn't math the output file you're giving.
> 
> way too many idiots do 'mencoder -o bla.mpg' and expect an mpeg file.
> making this automatic is NOT a good idea imo, because (for ex.) both
> lavf and mpeg muxer support 'mpg', so, which to choose...

I think you're misinterpreting my description somewhat. I'm not saying
"determine the output format based on the file extension", I'm saying
"determine the file extension based on the output format". In other
words, if someone gives the '-of mpeg' option but doesn't specify an
output file, write to the file (say) output.mpg; if someone gives the
'-of lavf' option but no filename, then choose the extension based on
the value of '-lavfopts format' (or fail if that's empty); if someone
gives '-of avi' or no '-of' at all, write to the file (say) output.avi;
if someone gives '-of rawvideo' or '-of rawaudio', the best thing to do
would probably be give no extension at all.

I was never suggesting determining the container by what extension was
given; for the reasons you cite, I don't think this is a good idea.

-- 
       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