News:

--

Main Menu

Aspect ratio won't budge from 4:3

Started by butts123, November 29, 2013, 11:53:03 PM

Previous topic - Next topic

butts123

Hi,
When I open my .m2ts files in Avidemux, which are originally 1440x1080, they're always displayed at a 4:3 aspect ratio. I've googled solutions and  tried to change it to a 16:9 ratio so many times and in so many ways (going through Video ->Filter, configuring it as x264 output) , but the image remains at 4:3. I really don't know what to do! Am I missing something? Should I convert the videos to another file type (I tried .avi and .mp4, still no luck)?. I'm sort of a noob when it comes to this stuff, but I really need the program to display the videos correctly (it's for my Master's project).

Any help would be very appreciated.

zakk

Avidemux display ratio is one thing, but what exactly do you want at the end ? Remuxing ? changing container ? Reduce size ?

butts123

I'm not editing the videos or fooling around with them in any way, Avidemux is useful for my project because it gives me useful time/frame information and I can analyze videos frame by frame very easily. I just want to be able to watch them in in 16:9. I hope that answers your question? As I said, I'm a noob :P

AQUAR

#3
Your .m2t must have a stored aspect ratio of 1440pixels/1080pixels = 4/3
Avidemux displays with a pixel aspect ratio of 1:1, to match the square pixels on computer monitors.
Display aspect is therefore 4:3 for your clip and that is as expected.

If your .m2t is supposed to have a display aspect ratio of 16:9, then its pixel aspect ratio is not supposed to be 1:1.

On top of that - you always need to consider the pixel aspect ratio of the intended display screen.
Avidemux doesn't know what kind of display is intended for the end use of playing the video.
But you can manually set it up to encode for say 'fat pixels' to adjust for the thin pixels on a traditional analog TV.
With media players you can usually define the display type and hopefully it all works out, aspect wise, via a scaling engine.
But avidemux is not a media player but a video editor - transcoder.

Its a confusing topic. 

The avidemux display ratio could be scaled if: 
1) code was present to analyse meta-data for aspect ratios (might not exist!).
2) avidemux had a build in a scaling engine to deal with the result.

Since the majority of displays are now "digital" with a 1:1 pixel geometry,
such scaling complexity may cause more problems than it re-solves.

Doesn't help with you're issue, but maybe helps with why it is the way it is.

I don't know if the developers are intending to enhance Avidemux in this regard.


 

zakk

Quote from: butts123 on November 30, 2013, 12:31:29 AMI just want to be able to watch them in in 16:9.
OK, I just did some tests and it's not your fault ;). I installed Avidemux 2.5 (and older version) and it worked.

butts123

#5
Ok, so the metadata for my video files says 1440x1080 (aka 4:3, thanks to the user who pointed this out), but the image is quite clearly distorted when viewed in this way, especially when compared to when the video file is played in VLS of WMP. When I play it in those media players, it's presented in a widescreen format, and the proportions of the objects/animals within the video clearly look normal/more accurate than a 4:3 representation. I have no idea what's going on!!

Just to show: this one is the Avidemux 4:3 display


And this one is the VLC 16:9 (more normal-looking) display



And I actually downloaded an earlier version of Avidemuz (2.5.something) and it wouldn't play my .m2ts file. Did earlier versions not accept this file type?

AQUAR

#6
@ zakk
Interesting - which version did you use as I still get each stored pixel to be mapped to a square pixel?

@ butss123
Its not the meta data but the actual number of horizontal and vertical pixels stored/recreated for each video frame ie 1440 : 1080.
The meta data tells what pixel geometry that stored pixel is to be displayed at.
That is done by virtue of the geometry of the pixel of the display device OR
by scaling to create new pixels to match a different display pixel geometry.
Media players will make the correction to match the display type from the meta data info plus display type info.
The versions of avidemux I tried do not scale in that way but simply maps stored pixel to screen/monitor pixel. 
In your case I think the picture will look a bit squashed because the content of these pixels are not for square pixels.
Probably the source is from an anamorphic dvd hence the 4:3 look.
Why don't you feed your .m2ts file into mediainfo and discover the relationships btw display/pixel/stored aspect ratios.
The understanding of such relationships would be good for your masters project, would it not?
   

zakk

Quote from: butts123 on November 30, 2013, 09:40:37 AMAnd I actually downloaded an earlier version of Avidemuz (2.5.something) and it wouldn't play my .m2ts file. Did earlier versions not accept this file type?
I have a Avidemux 2.5.6-1 and it works (july 2012 I think).

pchristy

Apologies if this appears to be hijacking the thread, but I have a related issue.....

Many of the "minor" channels broadcast here in the UK save bandwidth by transmitting 544x576 instead of the more usual 720x576. In both cases, the aspect ratio is 16:9 anamorphic (ie a 16:9 picture in a 4:3 container). MPlayer et al play the original ts files fine with the correct 16:9 aspect ratio.

Now I understand why Avidemux doesn't display these correctly whilst editing, but the problem is that when the files are saved - even when not transcoded - the files are always saved as 4:3! So if I edit the commercial breaks out of a programme, but do not transode it, it goes in as 16:9 but comes out as 4:3!

I can correct this by running it through ffmpeg in copy mode and instructing it that the aspect ratio is, in fact, 16:9. FFMPEG issues a warning about the dangers of doing this, but it works!

It would be *really nice* if Avidemux had a similar option to set the aspect ratio when saving a file, whether it be transcoded or just copied.

;)

--
Pete

butts123

#9
Quote from: AQUAR on November 30, 2013, 10:10:18 AM

Why don't you feed your .m2ts file into mediainfo and discover the relationships btw display/pixel/stored aspect ratios.
The understanding of such relationships would be good for your masters project, would it not?

It would be useful if that information helps me with getting the desired display ratio to show in Avidemux, yes. Will it do that? And if so, how? Thats really all it comes down to lol.

Quote from: zakk on November 30, 2013, 10:12:14 AM
Quote from: butts123 on November 30, 2013, 09:40:37 AMAnd I actually downloaded an earlier version of Avidemuz (2.5.something) and it wouldn't play my .m2ts file. Did earlier versions not accept this file type?
I have a Avidemux 2.5.6-1 and it works (july 2012 I think).

So I downloaded this exact version. Whenever I try to open a file with this version I get the whole H.264 and B-frames message, and no matter what I do it crashes :/



AQUAR

#10
@ pchristy

Yes it would be good to have an option in the encode process to specify the display aspect ratio of the output video.
I talked about this before, and mean did add pixel aspect ratios for PAL, NTSC etc in the xvid encoder.
I think that may be for targetting that display type and so it kind of does the reverse of the "scaling" I wanted (like I said its confusing!).

Since the stored aspect ratio is a given for any clip, we need to specify either the pixel aspect ratio (display = stored * pixel) or the display aspect ratio of the output clip. This plus the display type (analog with "virtual" pixels or digital with real pixels) would give the playback device, ie graphics card or TV or media player (thats another scaling layer for this stuff) sufficient information to present the video at the correct aspect ratio. Proportional scaling of the video object by the graphics card is why say a 1920*1080 clip is shrunk on your PC when displayed by the avidemux GUI.

Note that the actual video encoding is not changed in any way, only the meta data that gives geometry information is involved.
For transcoding to XVID's in AVI, I simply use MPEG4Modifier to redefine the aspect.  Very few video's I transcode need this step though.
You use ffmpeg to do the same thing.

Just to be clear:
I am just an enduser with an interest in video coding and have no detailed "nitty gritty" understanding of this.
Input from those with a deeper understanding would be great for the avidemux community. 
It would help me for sure.

@ butts123
Lol, I think we already provided the "why is it so" answer.
Is your masters project about getting avidemux to scale its display?
If not, avidemux is the way it is, and this issue has very little impact on its purpose.
If yes, you need to do some homework on video transport and program coding.

butts123

My master's project is not about Avidemux at all, I'm an animal behaviourist and I'm simply using the program to watch the videos frame by frame and get time information for these frames (which is why I'm not using VLC or whatever else, I don't get the same control or information). I just need Avidemux to display in 16:9, otherwise I'm not getting accurate data from my videos. I don't care about WHY it's showing in 4:3 (although it is annoying), I want to know if it's possible to watch my videos in 16:9, and why I can't seem to change it to that.
You might have answered some of these things, but as I said, I really dont know anything about editing programs and all the stuff they do, so a lot of the lingo goes over my head. I just want to watch my videos in 16:9 :(

pchristy

Aquar: The problem is not solely confined to transcoding. Even when just copying the files, the original aspect ratio information seems to get lost. As I said, broadcast TV has a strange way of achieving widescreen, using much the same trick that cinema did for cinemascope, ie: using an anamorphic method. However, there must be some data in there somewhere which tells the player that this is a 16:9 image even though it looks to the player like a 4:3 one. I assume this is in the metadata or headers somewhere.

For some reason, Avidemux is losing this information, even when simply copying files, with no transcoding involved.

It would be nice to have some kind of manual over-ride to correct this situation when it occurs. I can do it in a separate pass using either ffmpeg or MP4Box. Ffmpeg is my preferred method as it is easier, and I have had occasional problems with my TV / Blu-ray player refusing to play files corrected by MP4Box.

If the source of this problem could be identified, it *might* lead to a solution to the O/Ps issue, and enable Avidemux to display the correct aspect ratio, but I'm reaching the limits of my knowledge of the various container formats and where all this data is stored...!
--
Pete

AQUAR

#13
@ pchristy
I understood your issue. 
The anamorphic video system adds extra lines for a 16:9 display giving the "tall" look on avidemux.
Your DVD player knows about anamorphic DVD's and "stretches" the pixel by scaling if you tell its connected to a 16:9 TV.
I assume digital broadcasts and digital TV's would share a similar relationship.

But avidemux is a video editor not a DVD player with system wise smarts. It decodes the video frames of the extracted vobs and renders the stored pixels with a pixel aspect ratio of 1:1 (ie "RAW"). Perfect for a PC program using a PC monitor, except when the pixel content is mismatched for a 1:1 pixel geometry.

The bad: Avidemux is just going to display and copy the clips "raw".
The good: No video information is lost at all.
More good: some codecs have the option to set user defined pixel ratios. Try 2.5.6 for xvid's and 2.6.6 for AVC's.
The inconvenience: The enduser has to manually add/modify the meta data to specify the display aspect to make these copies/transcodes display correctly by a media player. Inconvenient because with DVD and DVB systems that is a pre-defined automatic process.
The hope: Mean could add user defined display scaling and more meta data options.

@ butts123
I really don't understand what time information you are missing out on.
The frame aspect ratio has nothing to do with time information for each frame.
I think you are just after a better viewing experience for studying the animal behaviour - frame to frame.
Zakk mentioned that avidemux 2.5.6-1 can do it (don't have that version to verify that), but this version is not very good for .h264 encoded video with variable frame rates (as your .m2ts clips are).
So to be blunt - avidemux is just not for you.
But there are video editors that will let you scale the display.
Try sorenson squeese - here the user can select - anamorphic display - 16:9 - 4:3 - or even one that scales to a custom ratio.
       


pchristy

butts123: One of the reasons for the missing time information is that most compressed video files don't transmit every frame. They will transmit whole frames at regular intervals, but the frames in between are "difference" frames, that only contain the difference between this frame and the preceding one. Many media players can only step between "key" frames, and have difficulty displaying the interpolated ones, which don't really exist!

It sounds to me as if one solution to your problem would be to transcode your video to mjpeg. Many people do this for editing purposes, as it gives you frame accuracy. In an mjpeg encoded stream, all the frames are key-frames compressed by jpeg. There are no interpolated frames.

I do this when capturing analogue video. I capture it as mjpeg, which I can then edit with frame accuracy (and TIMING!), before finally transcoding the finished product to a more efficient video compression format. You may find that if you do this, then most media players will give you frame accurate timing information.

Avidemux supports mjpeg encoding.

--
Pete