1280x720 vs 1280x724

Hi, I'm new to Kdenlive and I've noticed that videos I render with H.264 and 1280x720 resolution actually come out as 1280x724 (according to mplayer), while other formats such as Xvid4 come out as 1280x720. Is this normal or have I got a problem somewhere?

Forums:

I also tried setting the "Rescale" to 1280x716 (thinking maybe it was adding 4) but it still came out as 1280x724...

I believe what you are seeing in mplayer is the scaled output resolution based on sample aspect ratio or some other factor. If so, that means there could be something wrong in the sample aspect ratio handling of MLT. Look further in the details of the mplayer output to see if you can locate where it says the coded resolution is and then later some info about filters being applied, etc.
What does 'ffmpeg -i the.mp4' say?
Also, what Kdenlive project setting did you use?

Hi, thanks again for your replies and work on these projects! It is really great.

By the way - I'm using ffmpeg SVN-r19891 built yesterday and the older x264 as we discussed in a previous thread.

My project profile is "HD 1080i 60Hz". My input file is this:
Input #0, mpegts, from '20090914184606.M2TS':
Duration: 00:07:07.45, start: 0.767000, bitrate: 15338 kb/s
Program 1
Stream #0.0[0x1011]: Video: h264, yuv420p, 1440x1080 [PAR 4:3 DAR 16:9], 59.94 tbr, 90k tbn, 59.94 tbc
Stream #0.1[0x1100]: Audio: ac3, 48000 Hz, stereo, s16, 256 kb/s

(on a side note, Canon's website claims the camcorder saves 1920x1080 video but it clearly does not!)

I rendered just a few seconds clip in various formats. Here are the "ffmpeg -i" outputs, the DAR for the h264 file jumps out as being different from the others:

H.264 2000k with Rescale to 1280x720:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'h264.mp4':
Duration: 00:00:04.80, start: 0.000000, bitrate: 2038 kb/s
Stream #0.0(und): Video: h264, yuv420p, 1280x724 [PAR 1:1 DAR 320:181], 29.97 tbr, 30k tbn, 59.94 tbc
Stream #0.1(und): Audio: aac, 48000 Hz, 2 channels, s16
Metadata
muxer : Lavf52.38.0

Xvid4 2000k with Rescale to 1280x720:
Input #0, avi, from 'xvid.avi':
Duration: 00:00:04.70, start: 0.000000, bitrate: 2563 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 29.97 tbr, 29.97 tbn, 29.97 tbc
Stream #0.1: Audio: mp3, 44100 Hz, 2 channels, s16, 128 kb/s

Theora 2000k with Rescale to 1280x720:
Input #0, ogg, from 'theora.ogg':
Duration: 00:00:04.77, start: 0.000000, bitrate: 2113 kb/s
Stream #0.0: Video: theora, yuv420p, 1280x720, PAR 1:1 DAR 16:9, 29.97 tbr, 29.97 tbn, 29.97 tbc
Stream #0.1: Audio: vorbis, 44100 Hz, 2 channels, s16

MPEG-4 2000k with Rescale to 1280x720:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'mpeg4.mp4':
Duration: 00:00:04.70, start: 0.000000, bitrate: 2278 kb/s
Stream #0.0(und): Video: mpeg4, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 29.97 tbr, 30k tbn, 30k tbc
Stream #0.1(und): Audio: mp3, 44100 Hz, 2 channels, s16
Metadata
muxer : Lavf52.38.0

MPEG-2 2000k with Rescale to 1280x720:
Input #0, mpeg, from 'mpeg2.mpg':
Duration: 00:00:04.70, start: 0.500000, bitrate: 2590 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 104857 kb/s, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, 2 channels, s16, 384 kb/s

Well, this is strange - took me a little while to figure it out. Something in x264 (or ffmpeg's integration of it) enforces something when doing interlaced coding that caused the vertical resolution to change. Then, it adds 4 lines of bottom cropping in something called the H.264 VUI parameters, but not all decoders support this. MLT automatically uses interlaced coding when you use a Project setting that is not progressive. Merely changing the resolution in the Kdenlive render dialog does not change the progressive flag. Because you used a HD 1080i project setting, it was using interlaced coding. In the Kdenlive Render dialog, if you change the Scanning field to "Force Progressive" then you will get what you expect: 720.

Thank you very much (once again!) for your reply and great info. Indeed I had fully intended to create progressive output and had no desire to make a 720i movie. :) After setting it to "force progressive" like you suggested, I got the desired result:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'untitled.mp4':
Duration: 00:00:04.80, start: 0.000000, bitrate: 2162 kb/s
Stream #0.0(und): Video: h264, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 29.97 tbr, 30k tbn, 59.94 tbc
Stream #0.1(und): Audio: aac, 48000 Hz, 2 channels, s16