Page 1 of 1

scale option - diffrent resolution as expected

Posted: 04 Apr 2011 20:38
by DsChAeK
I receive a http video stream with 720x576 resolution.
If I stream this into a file using the scale option, I get results I don't understand.

record options
vcodec = h264
acodec = mp3
mux = mkv

example 1
scale: 0,30
orig: 720x576
file: 224x180 (->0,3111)
-> scale is 0,3111 not 0.3?

example 2
scale: 0,40
orig: 720x576
file: 288x230 (->0,4)
-> scale is 0.4, this is correct!

example 3
scale: 0,45
orig: 720x576
vlc file: 320x256 (->0,4444)
-> scale = 0.4444, not 0.45?

example 4
scale: 0,50
orig: 720x576
file: 368x294 (->0,5111)
-> scale = 0.5111, not 0.5?

How can I calculate the expected pixels?

Thx for help!
DsChAeK

Re: scale option - diffrent resolution as expected

Posted: 04 Apr 2011 23:01
by RĂ©mi Denis-Courmont
The video codecs probably pads the resolution to the nearest multiple of its macroblock size (I guess 16x16 pixels).

Re: scale option - diffrent resolution as expected

Posted: 04 Apr 2011 23:38
by DsChAeK
Thx for your quick answer. Well, if I force the width (to my calced scale) there should be no problem with the codecs, it's just how scaling works, right?