[MEncoder-users] Converting wmv to wmv

The Wanderer inverseparadox at comcast.net
Tue Apr 18 10:20:11 CEST 2006


(Quoting reordered for my sanity's sake. Please quote correctly, and
don't top-post.)

Ko Ko wrote:

> The Wanderer <inverseparadox at comcast.net> wrote:
> 
>> Ko Ko wrote:
>> 
>>> Hi,
>>> 
>>> I manage to encode other movie format like avi, mpg and mpeg
>>> without much problems. I am actually trying to shorten the movie
>>> length to make some preview clips for my website. But when it
>>> comes to wmv format i cannot encode wmv to wmv. I can encode wmv
>>> to avi.
>> 
>> That's because that is what MEncoder is intended to encode to. Any
>> other output (container) formats are later additions.
>> 
>>> But this is not exactly what I want. Normally how I encode is
>>> 
>>> mencoder -oac copy -ovc lavc -lavcopts vcodec=msmpeg4v2 $upfile 
>>> -o $imagepath/$filename -endpos 10
>> 
>> This command line does not specify an output format (-of), so it
>> creates a file with the default container type, AVI. You want to
>> add '-of lavf' and make sure that $filename ends in '.wmv'. If that
>> doesn't work, then assuming you're using the latest CVS versions,
>> it's probably not supported and I almost certainly can't help you.
>> 
>>> This codes produce 10 seconds video clip of my uploaded file to
>>> the specified file path on the server. But it doesn't really work
>>> for wmv. Is there any codecs available to encode wmv to wmv and
>>> how?
>> 
>> Codecs are probably not relevant, at least not at this stage. The
>> problem is a matter of container formats.
> 
> Hi
> 
> I tried your -of lavf and it works! But sadly with a bit of problems.
> 
> I tried like
> 
> "mencoder -of lavf -oac mp3lame -ovc lavc -lavcopts vcodec=wmv1 -ofps 
> 100.0 test.wmv output.wmv"
> 
> I can't use wmv2. It doesn't render.

This is not very clear. What happens, exactly? Where does it fail? What
are the error messages?

> I can't use copy for audio. Doesn't matter as well.

This happens sometimes, depending on what information is available about
the audio stream - which generally depends on what container format your
source file is.

> But the movie was playing back too fast. Just like it is being 'fast
> forward'. I am not too sure why. Is it because I -ofps 100.0?

I wouldn't guess so, but I don't know for certain.

> I don't know what is the purpose of using this. But if I don't set
> this it doesn't produce wmv.

Presumably, it is required by the WMV spec. (I would find that
surprising, but you never know.) What exactly happens when you run the
command line without that option?

> Previously I rendered this way
> 
> " mencoder -oac copy -ovc lavc -lavcopts vcodec=wmv2 -ofps 100.0 
> test.wmv output.wmv"
> 
> This produce wmv file as well. But may be it doesn't conform to those
>  wmv standard.

Indeed, it does not conform to the WMV standard - because it is not an
WMV! It is an AVI file, which you have named "output.wmv". If you do not
specify an '-of' option, MEncoder will ALWAYS create an AVI file -
period, no exceptions.

> When I try to play using Windows Media Player, the player prompt me a
> warning message. Only if I click yes to play it played. But it
> doesn't play in fast forward manner and the pictures and sounds in
> the movie are sync.

I'd hazard a guess that the "warning message" (why didn't you actually
tell us what it said? if nothing else, the actual messages from
MEncoder/MPlayer are almost always important) was telling you that the
file was actually an AVI even though it had a .wmv extension.

Looking at your other reply, yes, that appears to be the case. I did
tell you before that your command line was producing an AVI...

> If the first method doesn't output the file in a fast forward way, 
> then I think that should be exactly what I want. Your "-of lavf" 
> option seems to make sure it produce in wmv format. I just don't 
> understand why it is fast-forwarded.

Neither do I, off the top of my head. If you don't provide more
information (at minimum, the FULL copy-and-paste output (no snipping!)
of MEncoder when it is creating the file), I probably won't be able to
help you further.

-- 
       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 MEncoder-users mailing list