From 3ef58d85bab853365689ea2b76b539f9edccd6f7 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Mon, 18 Mar 2013 13:22:39 +0100 Subject: encoding-example-profiles: for Nokia N900, avoid upscaling This yields generally smaller files, by avoiding upscaling at all times. This method may or may not be useful for iOS, needs testing there. Note: this uses three instances of vf_scale: 1. Scale to target dimensions, ONLY if both are <= original video dimensions. 2. Failing that, scale to width*, ONLY if <= original video height. 3. Failing that, scale to *height. When the test before failed, we KNOW that <= original video width. So basically, only one of the three scalers should ever be active, as the last two scalers only can ever have an effect if the aspect ratio mismatches the video. As for danger of roundoff errors: If scaler 1 succeeded, we have won. Scalers 2 and 3 will never do anything, because display resolution == video resolution. Here it is crucial that no rounding of video size to display size takes place; in other words, the target display size already MUST be even, which it is because we pass 2 to the rounding parameter of the dsize filter. Scaler 2 and 3 are obviously mutually exclusive, as they depend on opposite aspect ratio conditions. We later should put this functionality directly into vf_scale... --- etc/encoding-example-profiles.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/encoding-example-profiles.conf b/etc/encoding-example-profiles.conf index d05adab9a1..3348804e61 100644 --- a/etc/encoding-example-profiles.conf +++ b/etc/encoding-example-profiles.conf @@ -156,7 +156,7 @@ ovcopts-add = maxrate=1500k,bufsize=1000k,rc_init_occupancy=900k,refs=1,profile= [enc-to-nok-n900] profile-desc = "MP4 for Nokia N900" profile = enc-f-mp4 -vf-add = dsize=800:480:0:2,scale=w=0:h=0,dsize=-1:-1 # native screen res, letterbox +vf-add = dsize=800:480:0:2,scale=w=0:h=0:noup=1,scale=w=-1:h=-2:noup=1,scale=w=-2:h=-1:noup=1,dsize=-1:-1 # native screen res, letterbox ovcopts-add = profile=baseline,level=30 [enc-to-nok-6300] -- cgit v1.2.3