The rest are fine but this one is being gay and refuses to have its aspect ratio changed. Original is 960x720 but it should display 1280x720. Every other MKV is easily editted by the Header editor from MKVMergeGUI but this one isn't budging. I tried extracting raw streams from it and re-muxing but it still fails.
What's a robust way I can force a 16:9 aspect ratio?
+ Reply to Thread
Results 1 to 13 of 13
-
-
Haggard one:
Code:General Unique ID : 204113466707373420429179307909926146859 (0x998ED2E1D54F2AAE92880E4BA2A4D32B) Complete name : M:\0f.mkv Format : Matroska Format version : Version 4 / Version 2 File size : 83.8 MiB Duration : 21mn 37s Overall bit rate : 541 Kbps Encoded date : UTC 2010-02-22 21:41:31 Writing application : mkvmerge v5.9.0 ('On The Loose') built on Dec 9 2012 15:37:01 Writing library : libebml v1.3.0 + libmatroska v1.4.0 Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High@L5.0 Format settings, CABAC : Yes Format settings, ReFrames : 16 frames Muxing mode : Header stripping Codec ID : V_MPEG4/ISO/AVC Width : 960 pixels Height : 720 pixels Display aspect ratio : 16:9 Original display aspect ratio : 4:3 Frame rate mode : Variable Original frame rate : 23.976 fps Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Writing library : x264 core 129 r2230 1cffe9f Encoding settings : cabac=1 / ref=16 / deblock=1:1:1 / analyse=0x3:0x133 / me=umh / subme=11 / psy=0 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=0 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=16 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=240 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=200 / rc=crf / mbtree=1 / crf=20.0 / qcomp=0.70 / qpmin=10 / qpmax=51 / qpstep=4 / ip_ratio=1.40 / aq=2:1.00 Language : English Default : Yes Forced : No Audio ID : 2 Format : AAC Format/Info : Advanced Audio Codec Format profile : HE-AAC / LC Codec ID : A_AAC Duration : 21mn 37s Channel(s) : 2 channels Channel positions : Front: L R Sampling rate : 44.1 KHz / 22.05 KHz Compression mode : Lossy Delay relative to video : 33ms Default : Yes Forced : No Text ID : 3 Format : UTF-8 Codec ID : S_TEXT/UTF8 Codec ID/Info : UTF-8 Plain Text Default : Yes Forced : No
Code:General Unique ID : 199766914292520660782223221370785709467 (0x9649B54D78DB6B59992E296EDFED3D9B) Complete name : M:\0e.mkv Format : Matroska Format version : Version 4 / Version 2 File size : 83.6 MiB Duration : 21mn 39s Overall bit rate : 540 Kbps Encoded date : UTC 2010-02-22 21:41:31 Writing application : mkvmerge v5.9.0 ('On The Loose') built on Dec 9 2012 15:37:01 Writing library : libebml v1.3.0 + libmatroska v1.4.0 Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High@L5.0 Format settings, CABAC : Yes Format settings, ReFrames : 16 frames Muxing mode : Header stripping Codec ID : V_MPEG4/ISO/AVC Width : 960 pixels Height : 720 pixels Display aspect ratio : 16:9 Frame rate mode : Variable Original frame rate : 23.976 fps Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Writing library : x264 core 129 r2230 1cffe9f Encoding settings : cabac=1 / ref=16 / deblock=1:1:1 / analyse=0x3:0x133 / me=umh / subme=11 / psy=0 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=0 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=16 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=240 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=200 / rc=crf / mbtree=1 / crf=20.0 / qcomp=0.70 / qpmin=10 / qpmax=51 / qpstep=4 / ip_ratio=1.40 / aq=2:1.00 Language : English Default : Yes Forced : No Audio ID : 2 Format : AAC Format/Info : Advanced Audio Codec Format profile : HE-AAC / LC Codec ID : A_AAC Duration : 21mn 39s Channel(s) : 2 channels Channel positions : Front: L R Sampling rate : 44.1 KHz / 22.05 KHz Compression mode : Lossy Delay relative to video : 33ms Default : Yes Forced : No Text ID : 3 Format : UTF-8 Codec ID : S_TEXT/UTF8 Codec ID/Info : UTF-8 Plain Text Default : Yes Forced : No
-
I'm pretty sure "original aspect ratio" is the aspect ratio as it was written to the video stream. Display aspect ratio is the aspect ratio set at the container level.
The problem is, some players give preference (or only pay attention to) the video stream aspect ratio, while others ignore it if there's an aspect ratio written to the MKV. I'm pretty sure my Sony Blu-ray player is big on the video stream aspect ratio so changing it with MKVMergeGUI doesn't helpt. If memory serves me correctly (I haven't had to think about it for a long time) MPC-HC (or maybe LAV filters these days) lets you choose. If you happen to use MPC-HC, try right clicking on the video and under "Video Frame" uncheck "keep aspect ratio". I think that'll get it to use the container aspect ratio. Or.....
Look in Video Decoder under Internal Filters. There's an aspect ratio option there. -
If you want to change the stream aspect ratio and don't mind battling with a command line tool:
http://forum.doom9.org/showthread.php?t=152419&highlight=ffmpeg+Bitstream+Modifier+Muxer
I've used it myself to change the stream aspect ratio on the odd occasion. I can't remember if it also creates a file with a container aspect ratio. If not you can always remux the MKV it creates with MKVMergeGUI. -
hello_hello explained it well --- the correct/intended aspect ratio also depends on the decoder (software or firmware), and under some circumstances, a buggy video driver might be "the root of all evil" ^_^
Last edited by El Heggunte; 13th Nov 2013 at 09:02. Reason: add link
-
If it is a decoding error, it only happens on this vid out of 100 of similar ones so I don't know what went wrong. Even if this can be fixed by fiddling with ffdshow/LAV, the common viewer these videos are intended for wouldn't know how to do that. My rule of thumb is that if I can't figure out, I shouldn't expect most people downloading my stuff to be able to either.
hello_hello, ok I looked at the thread but what bitstream filter do I use in the command line just to change sar?
Script: ffmpeg1 -i "0f (2).mkv" -vcodec copy -acodec copy -vbsf h264_changesps=sar=16:9 "0f (3).mkv"
I don't know what the -vbsf is for either. -
-
And which filter do I need to type in, it's not accepting sar by itself.
You're probably right that I should enter 4:3 but it said SAR was already 4:3 so I assumed this had to be changed since the video wasn't displaying 16:9. -
What do you mean by it said SAR was already 4:3 ? ffmpeg said or something else ?
That is the filter. "h264_changesps=sar=16:9" , you have it correct except for the value should be 4:3
ffmpeg1 -i "0f (2).mkv" -vcodec copy -acodec copy -vbsf h264_changesps=sar=4:3 "0f (3).mkv"
You need to use that specific binary from roozhou, other ffmpeg builds won't do it -
IF it's still not behaving, demux it, use the ffmepg command on the elementary video stream, remux streams with mkvmerge and set the DAR as well . That way both the bitstream and container AR flags are set. Those are the only 2 places AR information is stored and read by media players
-
Okay I got it to work. First, every AR works with that modded ffmpeg except 4:3. When I set it to 16:9 the AR was 24:10 when I played the video, setting to 4:3 made it 4:3, setting it to 4000:2999 made it 16:9. So every value worked except the one that I needed. Love it when this shit happens!
I just set SAR to 4:3 whether or not it really changed anything, then set the DAR with MKVMerge and it's finally 16:9 like it's supposed to be. I operated on the MKV not raw stream.
Thanks guys. I put a hiatus on a new TV show I was ripping and encoding back in late 2012 which I only resumed today so I forgot what happened with this SAR-screwed episode. I set the display aspect ratio on MeGUI before encoding but I thought this set the DAR not SAR so I'm confused. Meh. -
You're not confusing Storage Aspect Ratio (resolution) with Sample Aspect Ratio (pixel aspect ratio) are you? I'm not sure if there's any real distinction between sample aspect ratio and pixel aspect ratio or whether a new SAR was introduced just to cause confusion with storage aspect ratio.
I'm pretty sure ffmpeg's SAR is Sample Aspect Ratio, so it makes sense if a 4:3 SAR produced a 16:9 DAR.... I think. If MediaInfo only reports Display Aspect Ratio and Original Aspect Ratio is gone, the stream and container aspect ratio should be the same.
How did you set the DAR in MeGUI? MeGUI uses DAR in the script which it converts to SAR for the x264 command line, but I think it does it's calculating when the script is loaded. Changes to the DAR in the script without reloading it might have no effect.
Similar Threads
-
Changing Aspect Ratio for .avi
By Sizdar in forum Newbie / General discussionsReplies: 5Last Post: 3rd Aug 2012, 19:09 -
Converting MKV for use in non-linear editor; also changing aspect ratio
By noctrine in forum Video ConversionReplies: 5Last Post: 9th Feb 2012, 10:49 -
Changing aspect ratio on an mkv?
By vato76 in forum Newbie / General discussionsReplies: 15Last Post: 14th May 2011, 10:11 -
Changing aspect ratio.
By Lyceum in forum EditingReplies: 5Last Post: 28th May 2009, 12:19 -
Changing aspect ratio?
By Marlow in forum Video ConversionReplies: 2Last Post: 5th Apr 2009, 05:40