Skewing / distortion of produced MP4

Hans123 wrote on 3/20/2014, 6:17 AM
Hi all, I have Movie Studio HD Platinum 11.0. I generally edit MOD files captured by a reasonably old JVC Everio camera that films at 720x576 (PAL DV). I'm careful to define the project settings and select rendering options to match the source video configurations. This week, I had to zoom in on some clips (maintaining aspect ration) down to 600x480. I also added several still images on an overlay layer which I zoomed in on, not maintaining aspect ratio but just so that they would fill up the screen (the image quality for them is less important - each one is only on for a few seconds, and they fade in and out as it is). However, when I rendered the project and created a 600x480 MP4, the produced video came out skewed somewhat. Any idea why that might have happened - and what I might to to improve the result?
Thanks

Comments

Warper wrote on 3/20/2014, 9:27 AM
What is pixel aspect ratio for output? Source has 16:9 or 4:3 display aspect ratio depending on your camera settings, but sample aspect ratio (number of pixels in horizontal and vertical picture sizes) is different, it's 5:4.
Sometimes players don't recognize set pixel aspect ratio for mp4 (16:9/4:3 flag for mpeg-2).
For computer video files it's more convenient to use square pixel fixing aspect ratio in input stage. I think it might be better to make 640*480 project with PAR 1,000 if your input is in 4:3 DAR.
musicvid10 wrote on 3/20/2014, 1:06 PM
1. 600x480 is not the same display aspect ratio as EITHER 4:3 or 16:9 PAL source (you didn't say which)..
So it will be squeezed or letterboxed. No mystery about it.
If your display aspect is not correct, then neither is your output.

2. Your stills are 1:1, again not the same display aspect as your video.
They must be set to maintain source aspect in order to display correctly in the same project as your anamorphic video.

Plenty of guidance here, on Wikipedia, and elsewhere. It boils down to a simple ratio. Best of luck.
Hans123 wrote on 3/20/2014, 4:27 PM
Warper / musicvid10 - thanks for your responses. When I right-click the MOD source file in the Vegas Project Media bin and select Properties, the General tab lists the pixel aspect ratio as 1.0926 (PAL DV). The video stream attributes are listed by Vegas as 720x576x32.
As far as the camera settings are concerned - I have it set for 16:9 recording and "TV type" if that's relevant.
Re the output settings - after playing with settings quite a bit, I seem to have received the best results by rendering an MP4 at a size of 640x360 (16:9), using a pixel aspect ratio of 1.0926 (PAL DV) and selecting "Stretch video to fill output frame size (do not letterbox)".

Re the 600x480 rendering size - that's the same proportion (5:4) as the original size of the clip. Since I had zoomed in to that smaller proportion, I thought it wiser to render to that size. I understand from you both that that reasoning is faulty (I'm guessing because of the 16:9 aspect ratio issue), but I don't quite understand why. If you could point me to some of the guidance you mentioned, I'd appreciate it. Thanks.
vkmast wrote on 3/20/2014, 7:57 PM
Hans,
The .mod files from older JVC/Canon/Panasonic SD camcorders may be problematic when importing. Depending on how you transferred them into your PC, they may show 4:3 in VMS even though you filmed 16:9.
In File Properties, try changing Pixel aspect ratio into 1.4568 (PAL DV Widescreen) and see what happens.
videoITguy wrote on 3/20/2014, 8:41 PM
this is an older version SD Widescreen that really is not that - but squeezed off the frame of SD normal chip for pseudo presentation
vkmast wrote on 3/20/2014, 8:49 PM
The .mod files are really just MPEG2 files with a different extension, at least in my Canon SD camcorder from some years back.
musicvid10 wrote on 3/20/2014, 10:09 PM
"Re the 600x480 rendering size - that's the same proportion (5:4) as the original size of the clip."

Hans,
PAR x SAR = DAR.
You are completely overlooking a step. That's why I "suggested" Wikipedia as a starting point..

720x576 or 600 x 480 (5:4) is not the display aspect, it is the source aspect. By itself, that number is completely meaningless for display purposes.
" By contrast, a 720 x 576 D-1 PAL image has a SAR of 720/576 = 5:4, but is displayed on a 4:3 display (DAR = 4:3)."
http://en.wikipedia.org/wiki/Pixel_aspect_ratio
Therefore, the correct display width, and assuming your "chosen" height of 480 pixels, is 640x480, plus or minus a few pixels to account for the slight difference between PAL DV and PAL DVD pixel aspect. If you end up with very thin black bars, use "Stretch to fill output."

In addition, "if" your source is fake 16:9, you will additionally need to crop top and bottom to achieve the correct display aspect without letterboxing. Those display dimensions (DAR) "might" be 640x360 or 720x404* at 1.0 PAR (SAR lost all relevance a while back and anamorphic output confuses a lot of encoders, players, and servers; so don't use it). Also, don't extend vertical display dimension beyond that of the source ( in the case of fake 16:9 PAL, perhaps 440*?), or you likely won't like the results. IOW, I wouldn't use 856x480* as a display output in that case. Best of luck.

*(Don't bother trying to pick those numbers apart. For encoder/player compatibility, an encoding modulus of 4 is assumed in all estimates, as it should be)
;?)
Warper wrote on 3/21/2014, 5:31 AM
Media properties are wrong in your case. A perfect decoder (player) should produce picture similar to 4:3 if all parameters are as you said they are, but your source it 16:9, not 4:3. Your saviour here is pan/crop, it doesn't maintain aspect ratio and stretches video to project picture size.
On the other side, you resulting 640x360 picture with PAR 1.0926 is wrong again. A perfect renderer would produce picture with proportions of 17,5:9 not 16:9. What saves you from seeing it is inability of player to read set properties correctly. Note, that 640*360 picture has 16:9 sample aspect ratio already, so to get proper DAR you only need to set pixel aspect ratio to 1,000 in render settings.

From what I know mpeg-2 stream has settings for sample aspect ratio, it only has a flag for display aspect ratio and this flag has only 2 values: 16:9 or 4:3. Player is supposed to stretch picture to its display (either with letterbox or not).

that's the same proportion (5:4) as the original size
Sometimes it has a meaning during production. It's generally better to work with picture pixel-to-pixel if possible.
vkmast wrote on 3/21/2014, 6:11 AM
Working with JVC Everio MOD & TOD files
Quote:"we got to the problem: the Everio SD camcorders do not set widescreen flag properly when you shoot in widescreen mode. Most Editing tools treat these files as regular 4:3 video, and what you see is horizontally squished picture with unproportionally tall people. This issue is not related to HD video, because HD is always widescreen.
musicvid10 wrote on 3/21/2014, 10:01 AM
Fake wide screen is a cropped image letterboxed on a 4:3 display.
It was a cheap marketing gimmick; Sony used it too.
videoITguy wrote on 3/21/2014, 11:36 AM
The detailed post and comment by musicvid10 is absolutely right-on.
Sony was a leading developer of the pseudo widescreen format. I have used these Sony cameras stateside for many years. I was not aware of the utility mentioned to change a pseudo created camer file to a 16:9 flag in a .mod format. That may perhaps do something for production workflow integration. However the underlying issue notably remains more than just resetting the flag in a header of the file.
Hans123 wrote on 3/23/2014, 2:18 AM
Everyone - thanks for your input. Re the question of how I get files from the camera - I have generally been importing files from the camera by just dragging-and-dropping through Windows Explorer. Since the software that came with the camera (a version of CyberLink for the JVC Everio) is essentially useless for editing, I have been bypassing it entirely for importing as well. Perhaps that's a mistake.
As you suggested vkmast - in File Properties, I changed pixel aspect ratio of the source file to 1.4568 (PAL DV Widescreen). That definitely had a positive impact on the output. I'll look into the SDCopy tool as well.
I've been reading some of the source material (Wikipedia etc.) but I think I have a while until I really internalize it all.
A couple final questions: If I turned off the pseudo/fake widescreen feature in the camera, which I think would then leave it at a 4:3 PAR on the camera, but then after importing to my computer Vegas recognizes the file as PAL DV (720x576) - would I then need to adjust the source file's aspect ratio? And what would be the optimal output settings re video size and aspect ratio - and why?
Thanks again for all your help with this.
vkmast wrote on 3/23/2014, 4:46 AM
Hans,
quite a few threads on these .mod files, when you do a Search on these forums. A couple of the first to mention SDcopy were here and
here in 2008 and 2009. A working d/l link is here.
Still many tutorials on the web re importing .mods into (Vegas)MSP.
I never adjusted the source file's aspect ratio, if the camera was 4:3.
musicvid10 wrote on 3/23/2014, 9:35 AM
Your camera is giving the correct source aspect, I'm almost certain of that.
Unless I've missed something completely, you should not change the source flag in Vegas' media properties.
Your project and render properties do need to be set correctly, as I described above.

If you would be so kind as to upload a short, original camera clip to a fileshare (NOT Youtube), I'll be happy to confirm that for you. I worked with fake widescreen DV for more than a decade, and I see nothing from what you reported that indicates anything out of the ordinary. But until I've seen a native camera clip, I won't commit with 100% certainty.
MOD, like MPG or VOB, is a wrapper, and some native widescreen (not yours) may have been misflagged at one time. Apples and oranges.

PAL 4:3 DVD pixel aspect is specified at 1.0940, your reported 1.0926 is very close (a factor of .0013). That's only one pixel difference!

Nothing is broken. Fake widescreen is nothing more than cropping (letterboxing) on top of that native format. Once you are more familiar with the relation between SAR, PAR, and DAR, you should see that it is far less complicated than you imagine. Post that link, and until then,
Best of luck.

"The first thing one needs to do to get out of a hole is to stop digging."
musicvid10 wrote on 3/23/2014, 6:02 PM
vkmast,
Thanks for the email, but I have no experience with the Canon .mod structure whatsoever, except I've heard they won't open in Vegas. The internet makes no mention of Canon .mod producing FAKE 16:9.

I do have experience with the much older JVC .mod / .mpg like the OP's, which are all 4:3, because that's all their sensors would accommodate ten years ago. I would be surprised if my memory is that faulty. MOD is a container. I'm sure your experience is valid with your files. Best.
musicvid
vkmast wrote on 3/23/2014, 8:35 PM
musicvid, thanks.
My assumption that the OP’s JVC Everio *.mod files would be similar to the Canon ones was based (among others)
on the following post by the developer of SDcopy on a cnet forum, June 2010.

“All the standard-definition camcorders that record mpeg2 files to sd-cards or harddisks have this problem.

Obviously, as you said earlier, one needs to know about the original files of the OP.
Sorry to have made wrong conclusions here.
musicvid10 wrote on 3/23/2014, 9:14 PM
I realize I've acted on presumption, as well.
I'll post back upon receipt of the requested samples.
If the OP's camera is newer than I assumed, I'll cheerfully retract my statements.
Hans123 wrote on 3/24/2014, 8:46 AM
Once again - thanks to everyone for your assistance on this. I recorded a new file using the JVC Everio (with the camera settings as before - 16:9 selected for both recording and TV type) and uploaded it to my Dropbox. Actually, I uploaded two short MOD files - one imported from the camera with simple drag-and-drop using Windows Explorer (this file is denoted with the suffix WE) and one imported using the CyberLink interface to copy from the camera (that file is denoted with the CL suffix). I can play the raw stream of both files using the VLC player, and the default aspect ratio seems to be 4:3. The dimensions of both clips seem to be 720x576.

Here are the links to the two files:
https://www.dropbox.com/s/dsmsrbapd6hkb6z/MOV0E4-CL.MOD
https://www.dropbox.com/s/fstfflbfcpghzqa/MOV0E4-WE.MOD

Thanks again.
musicvid10 wrote on 3/24/2014, 11:05 AM
OK, while I'm wiping a little poo off my face, I'll explain what's going on, and why neither vkmast nor I was that far off.

First of all, the movie is 16:9. Second, the PAR is being misread by Vegas. "Almost-correct" preview and render will occur by changing the media and project properties to widescreen PAL, and other settings accordingly.

That being done, the OP can render an "almost" 16:9 file. If the output is to be for DVD, he can go ahead and render anamorphic using the appropriate DVD Architect template. If he is rendering for computer (software) playback, home theater, or Youtube as MP4, he should render at square pixels. The correct square-pixel aspect is approximately1024x576, or 856x480, or 720x404, or 640x360, or what ever fits a 16:9 aspect (modulus 4). Vegas, on the other hand, tries to render 1049x576, which I assume is closer to PAL w/s DV (not 16:9 DVD).

Now, here's the interesting part, and the reason I made a wrong turn. I inferred from the OP's descriptions, that all players, encoders, and MediaInfo were reporting 4:3, or 1.0926. If true, that gives a compelling case for 4:3 (fake widescreen) source, common to the 10 y/o camcorders I cut my teeth on. As it turns out, Vegas (Pro 8, ymmv) misreports the PAR as 4:3, as do WMP and Gspot. Every other player, encoder, utility on my system gets it right. MediaInfo, VLC (ffmpeg), Handbrake (libav), AVIDemux, VideoRedo, et al, all report or output correctly as16:9. Had I known that, I would have suspected a misreported pixel aspect in Vegas, as I have seen 2-3 times in recent years.

So much for acting without requiring specific, accurate information, and I'll defer to vkmast for getting it more right than I did.

So, for the OP, who is probably not that interested in the nasty little details, here are the steps in Vegas:
1. Change the source media to PAL Widescreen aspect.
2. Change the project to PAL Widescreen aspect.
3. Enable "Simulate device aspect" in preview.
4. Disable "Change source media to match output" or whatever it's called
5. If not making a dvd, render 16:9 at 1.0 PAR (square pixels) following the guidelines above.
-- You should be happy with the results.

Best of luck, and I hope this clears it up. Good work, vkmast, and let's keep future discussions on the forum, as that inbox is maintained primarily for clients.
;?)