Page 1 of 1

Rotating the Video

Posted: Sun Jul 22, 2012 3:27 pm
by meRobs
[Updated ...]

I first played with the Rotation feature in build 4740 and it worked for conversions to MPEG1. I had no other cause to look at the issue until a user raised a Topic (viewtopic.php?f=17&t=12101). This led me to repeat my tests with build 4740 and work my way up through 5050, 5150, 5200, 5230, 5260 and 5262. The conclusions are presented below in reverse order, starting with recommendations for the most recent builds.

I. MediaCoder Settings

The following recommendations follow from the use of builds 5260 and 5262 when converting VOB, MP4 and MKV files to MP4 and MPEG2 with a rotation of 90 deg CW. For details of these conversions, see Section 2, below.
Proceed as follows:
(1) select the tab settings to suit the desired output, except for the Picture tab
(2) set Rotation on the Effects panel opposite the Picture tab (or via ‘Settings’ > Video Filters > Rotating > Mode)
(3) on the Picture tab:
* set Frame Rate = Original or whatever
* set Aspect Ratio > Set PAR = 1:1 and Crop = Disabled
* set Resize = Original if the source file had PAR = 1, otherwise, set Resize = W x H where W/H is the Display Aspect Ratio of the source.

As an example of the latter, consider a source file with a resolution (frame size) of 720x480 and displaying 4:3 (hence a PAR = 0.89). In this case, choose a Resize using two values in the ratio 4:3, preferably with each value a multiple of 8. In this case, suitable options are 720x540 or 640x480. This is equivalent to video with the same DAR of 4:3 and a PAR of 1.

2. The Tests

For this study I used four source files:
(1) an MP4 file with AVC video at 768x576 in 16:9 (PAR=1.333) with Resize = 768x432
(2) an FLV file with VP6 video at 600x400 in 3:2 (PAR = 1.00) with Resize = original
(3) an MKV file with AVC video at 852x360 in 2.35:1 (PAR=0.993) with Resize = original
(4) a VOB file with MPEG2 video at 720x480 in 4:3 (PAR=0.889) with Resize = 640x480

They were converted to MPEG2 and to MP4 using the settings in the Encoding Guide except for those on the Picture tab, which were changed to the values given above; and rotation was set via the “Settings” button on the Toolbar. As indicated in the Encoding Guide, the video "Source" is given as Auto for MPEG2 and MEncoder for MP4, yet, as indicated below, if the rotation fails switch to the other 'Source'.

3. Behaviour in earlier Builds

As mentioned above, rotations were successful in builds 5260 and 5262. This was true whether Resize was set at ‘Original’ or adjusted as above to get the correct aspect ratio. So, on trying other builds, I began with Resize equal to ‘Original’ to see what happened.

In builds 5200 and 5230 all four source files gave rotated and gave clear images when Resize was set equal to ‘Original’. However, the MP4 and VOB files had incorrect aspect ratios because the source files had a PAR not equal to one. To correct this, the conversions were repeated with the respective values of 768x432 and 640x480 (see above) and the rotation worked, but, the output images were distorted!

Build 5150, with Resize = ‘Original’, all output files had the same resolutions as their source files. The FLV and MKV source files showed no signs of rotation; the FLV gave a distorted image yet that for the MKV was clear and un-rotated, matching the source! On the other hand, the VOB and MP4 source files gave multiple rotated and distorted images side by side filling the frames. With the latter two repeated using the Resize values given above, they similarly failed. Also, conversions to MPEG2 with rotation failed to work (clear un-rotated image) because the setting for Rotation mode was unstable. Once set, it reverted to ‘Disable’ on closing the Setting window. Hence, all attempts to rotate in 5150 failed!

In build 5050, the MKV source file failed to convert with rotation set – it gave a “Failed to load MEncoder” message even when MEncoder was not set as a source. For the other three files, setting Resize equal to ‘Original’ and PAR = 1 gave clear rotated frames, but at the wrong aspect ratio. Also, the Properties panel in MediaCoder showed a resolution equal to that of the source, not the output! For success, set Resize equal to the desired output resolution, such as 768x576 or 640x480 for 4:3 or 1024x576 for 16:9 and set Aspect Ratio = Keep DAR. In all cases, the Properties panel will show the correct resolution and the video will be rotated to just fill the defined frames.

Build 4740 behaved like 5260 with the settings given in Section 1, resulting in successful rotations for conversions to MP4, except that the MKV source file fails with the “Failed to load MEncoder” message as per 5050. When converting to MPEG2, the encoding stopped with unspecified errors shortly after the start.

Re: Rotating the Video

Posted: Sun Jul 22, 2012 3:30 pm
by meRobs
I have added the above post as a guide under Tips & Guides (link below).

Since there is no test for Rotation in the Test Report, please add a new Post if the above advice fails on a new build.

Also, if you have any other comments or suggestions please PM me or write a Post in Basic Discussions.
Thanks