croptop filter giving strange results

About encoding, codec settings, muxers and filter usage
Steerpike
Blank Cone
Blank Cone
Posts: 32
Joined: 21 Mar 2007 06:06
Location: Bay Area, CA

croptop filter giving strange results

Postby Steerpike » 31 Mar 2007 03:42

Source is 720x480 ntsc mpeg2, captured from TV by a Hauppauge WinTV encoder card. File plays fine in a variety of players, including VLC.

I transcode this to WMV using either of the following two commands, both work fine:

:sout=#transcode{width=240,vcodec=WMV3,vb=192,scale=1,acodec=wma,ab=64,channels=2}:duplicate{dst=std{access=file,mux=asf,dst="C:\MIM-CUT-w240-lobit.wmv"}}

:sout=#transcode{width=320,vcodec=WMV3,vb=192,scale=1,acodec=wma,ab=64,channels=2}:duplicate{dst=std{access=file,mux=asf,dst="C:\MIM-CUT-w320-lobit.wmv"}}

One has a width of 240, the other a width of 320 - all else the same. Both play just fine in Windows Media Player.

If I now introduce the 'croptop' filter, croptop=2, into both commands, by inserting after width=, (i.e. ... width=240,croptop=2,vcodec=WMV3, ... ), the filter applied to the 'width=240' version produces good results, while the same filter applied to the 'width=320' version produces an output with a wild and whacky aspect ratio (5x taller than it is wide, or so!)

In windows media player, the 'width=240,croptop=2' version has these relevant properties:

Video size: 240x160
Aspect Ratio: 1.33:1

While the 'width=320,croptop=2' version has these relevant properties:

Video size: 320x212
Aspect Ratio: 0.165:1

If I remove the 'croptop=' filter, the properties become:

Video size: 320x214
Aspect Ratio: 1.33:1

And the output appears normal.

Can anyone explain why 'croptop=' would have this effect? I've tried various values other than 2, and I've also placed the command before and after the width=command, with no effect. Thanks!

Steerpike
Blank Cone
Blank Cone
Posts: 32
Joined: 21 Mar 2007 06:06
Location: Bay Area, CA

Postby Steerpike » 01 Apr 2007 11:28

I can't really explain why, but I decided to try specifying 'height=' instead of 'width=' and that managed to stop the aspect ratio from getting totally crazy.

height=214,croptop=2 produced an aspect ratio of 1.34:1 (good)

However, not all 'height=' values worked; the following one produced equally bad results:

height=212,croptop=2 produced an aspect ratio of 0.165:1 (bad!).


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 5 guests