Thread: [Encode2mpeg-users] zoom/crop a 16:9 movie to a 4:3
Brought to you by:
encode2mpeg
From: Rob <rh...@se...> - 2007-05-06 09:37:10
|
Hi, I'm having issues trying to convert a movie with the following specs below to a movie that needs to fit on a 4:3 screen - 320x240. I would like the video to be zoomed (sides cut off) such that it fits the full screen (no black bars on the top or bottom). This is the command that I used. It creates the correct aspect ratio, but the size is wrong (doesn't fill the whole 320x240 screen). ./encode2mpeg-0.6.2/encode2mpeg -o "D2-sample.24.s06e18.hr.hdtv.xvid-nbs" -avionly -vfr 1 -encode 2:2:1 -acustom "cbr:br=128" -vf harddup -vbitrate 384 -setaspect 320 -crop 725:544:0:0 "sample.24.s06e18.hr.hdtv.xvid-nbs.avi" Close, but no cigar :( Thanks, Rob P.S. encode2mpeg rocks! :) INPUT FILE: ========================================================= File: sample.24.s06e18.hr.hdtv.xvid-nbs.avi Width: 960 pixels Height: 544 pixels Aspect ratio: 1.76:1 Frames: 1217 Duration: 00:00:50 hours/mins/secs Framerate: 23.976 frames per second Video format: XVID Video bitrate: 1943648 bits per second --------------------------- Audio track 1 (Stream 0.1, AID 0): --------------------------- Codec: ac3 Bitrate: 384000 bits per second Sampling rate: 48000 Hz ========================================================= OUTPUT FILE: ========================================================= File: D2-sample.24.s06e18.hr.hdtv.xvid-nbs.avi Width: 256 pixels Height: 192 pixels Aspect ratio: 1.33:1 Frames: 273 Duration: 00:00:11 hours/mins/secs Framerate: 23.976 frames per second Video format: DX50 Video bitrate: 239968 bits per second --------------------------- Audio track 1 (Stream 0.1, AID 0): --------------------------- Codec: mp3 Bitrate: 128000 bits per second Sampling rate: 48000 Hz ========================================================= |
From: Giacomo C. <enc...@us...> - 2007-05-07 20:36:33
|
On Sun, May 06, 2007 at 02:36:59AM -0700, Rob wrote: > Hi, > > I'm having issues trying to convert a movie with the following specs below to > a movie that needs to fit on a 4:3 screen - 320x240. I would like the video > to be zoomed (sides cut off) such that it fits the full screen (no black bars > on the top or bottom). > > This is the command that I used. It creates the correct aspect ratio, but the > size is wrong (doesn't fill the whole 320x240 screen). > > ./encode2mpeg-0.6.2/encode2mpeg -o "D2-sample.24.s06e18.hr.hdtv.xvid-nbs" -avionly -vfr > 1 -encode 2:2:1 -acustom "cbr:br=128" -vf harddup -vbitrate 384 -setaspect > 320 -crop 725:544:0:0 "sample.24.s06e18.hr.hdtv.xvid-nbs.avi" > > Close, but no cigar :( This is a bug. Please try this fix and report if it solves the problem. Edit the encode2mpeg script: goto line 5129 and add after the line ratio=w/h this line: if (sqrt((ratio-a)*(ratio-a)/(a*a))<0.01) a=ratio+sqrt((ratio-a)*(ratio-a)) Giacomo > > Thanks, > Rob > > P.S. encode2mpeg rocks! :) > > INPUT FILE: > ========================================================= > File: sample.24.s06e18.hr.hdtv.xvid-nbs.avi > Width: 960 pixels > Height: 544 pixels > Aspect ratio: 1.76:1 > Frames: 1217 > Duration: 00:00:50 hours/mins/secs > Framerate: 23.976 frames per second > Video format: XVID > Video bitrate: 1943648 bits per second > --------------------------- > Audio track 1 (Stream 0.1, AID 0): > --------------------------- > Codec: ac3 > Bitrate: 384000 bits per second > Sampling rate: 48000 Hz > ========================================================= > > OUTPUT FILE: > ========================================================= > File: D2-sample.24.s06e18.hr.hdtv.xvid-nbs.avi > Width: 256 pixels > Height: 192 pixels > Aspect ratio: 1.33:1 > Frames: 273 > Duration: 00:00:11 hours/mins/secs > Framerate: 23.976 frames per second > Video format: DX50 > Video bitrate: 239968 bits per second > --------------------------- > Audio track 1 (Stream 0.1, AID 0): > --------------------------- > Codec: mp3 > Bitrate: 128000 bits per second > Sampling rate: 48000 Hz > ========================================================= > |
From: Rob <rh...@se...> - 2007-05-10 16:33:03
|
On Mon, 7 May 2007 16:36:23 -0400 Giacomo Comes <enc...@us...> wrote: > > This is a bug. Please try this fix and report if it solves the problem. > > Edit the encode2mpeg script: > goto line 5129 and add after the line > ratio=w/h > this line: > if (sqrt((ratio-a)*(ratio-a)/(a*a))<0.01) a=ratio+sqrt((ratio-a)*(ratio-a)) > > Giacomo > this is what you wanted, correct? If so, I will try it out when I get home... thx for the proper fix :) === modified file 'encode2mpeg-0.6.2/encode2mpeg' --- old/encode2mpeg-0.6.2/encode2mpeg 2007-05-04 20:33:44 +0000 +++ new/encode2mpeg-0.6.2/encode2mpeg 2007-05-10 16:19:29 +0000 @@ -5127,6 +5127,7 @@ if(a==1.78||a==1.74)a=16/9 if(a==1.33||a==1.30)a=4/3 ratio=w/h + if (sqrt((ratio-a)*(ratio-a)/(a*a))<0.01) a=ratio+sqrt((ratio-a)*(ratio-a)) if(((zoom==1||zoom==-1)&&ratio<a)||((zoom==2||zoom==-2)&&ratio>a)){ CH=ch/ko } |
From: Giacomo C. <enc...@us...> - 2007-05-10 17:01:47
|
On Thu, May 10, 2007 at 09:24:52AM -0700, Rob wrote: > On Mon, 7 May 2007 16:36:23 -0400 > Giacomo Comes <enc...@us...> wrote: > > > > > > This is a bug. Please try this fix and report if it solves the problem. > > > > Edit the encode2mpeg script: > > goto line 5129 and add after the line > > ratio=w/h > > this line: > > if (sqrt((ratio-a)*(ratio-a)/(a*a))<0.01) a=ratio+sqrt((ratio-a)*(ratio-a)) > > > > Giacomo > > > > this is what you wanted, correct? If so, I will try it out when I get home... thx for the proper fix :) > > === modified file 'encode2mpeg-0.6.2/encode2mpeg' > --- old/encode2mpeg-0.6.2/encode2mpeg 2007-05-04 20:33:44 +0000 > +++ new/encode2mpeg-0.6.2/encode2mpeg 2007-05-10 16:19:29 +0000 > @@ -5127,6 +5127,7 @@ > if(a==1.78||a==1.74)a=16/9 > if(a==1.33||a==1.30)a=4/3 > ratio=w/h > + if (sqrt((ratio-a)*(ratio-a)/(a*a))<0.01) a=ratio+sqrt((ratio-a)*(ratio-a)) > if(((zoom==1||zoom==-1)&&ratio<a)||((zoom==2||zoom==-2)&&ratio>a)){ > CH=ch/ko > } > That's correct. Giacomo |