View Full Version : Cropping Video w/o encoding (MKV)
samukas
28th October 2007, 20:17
Hi everyone! I was wondering if it's possible to "crop" a movie inside a matroska container...
I ask this because running one file trought mkvverify's full summary, there is a line like "Crop <0,0>" ...
So I was wondering if there's some option to "trick the player" in hiding the black bars automatically (on a letterboxed video).
Many thanks in advance!
unskinnyboy
29th October 2007, 14:53
No. The 'cropped' values in the mkvverify output refers to the actual resolution of the frame. For e.g., you could have the actual resolution as 640x432, but can set the display resolution to 800x432 when creating the mkv file. Then the mkvverify output would look like:
Resolution :
Pixels : 640x432
cropped : (0,0)-(640,432)
Display : 800x432
Unit : pixel
If you really must, you can crop on the fly using ffdshow. But if you hide the black bars, what are you going to replace it with? If you take away the black bars and then fill the screen with the frame, you are going to have a vertically stretched video. Is that what you want? The black bars are there for a reason, which is to maintain the proper aspect ratio.
samukas
29th October 2007, 22:37
I have a widescreen monitor, so the point is not having to "zoom" the image each time I play the file... Because the way it was encoded, I have 4 black bars (top,bottom,left and right)... And even zooming isn't easy, since Vista EVR Render doesn't support it... I have to use VLC Player to do it (and I kinda prefer MPC) =/
Dark Shikari
29th October 2007, 23:33
Doesn't mkvmerge have a commandline that adds in-stream cropping to the video? I checked it in the help command and it seems to support it.
unskinnyboy
31st October 2007, 13:38
Digging deeper, Dark Shikari, you are right. I must apologize for the wrong information. I tested this a bit and it works.
You can do the cropping by adding the line −−cropping x:left,top,right,bottom to mkvmerge, where x is the track id. e.g: 0:10,10,10,10. Whilst the resultant cropped values weren't respected by Haali's Media Splitter v1.7.189.11, VLC Media Player do recognize it.
Uncropped:
Resolution :
Pixels : 352x240
cropped : (0,0)-(352,240)
Display : 352x240
Unit : pixel
Cropped:
Resolution :
Pixels : 352x240
cropped : (10,10)-(342,230)
Display : 352x240
Unit : pixel
Nicholi
1st November 2007, 21:18
Haali's will work with the crop values, it is actually the decoder used which will limit what you can do. As I recall ffdshow will only allow you to crop the bottom and right sides during playback, whereas CoreAVC should work on all 4 sides.
Lancerevo
3rd November 2007, 12:19
Hey guys, I was wondering whether is there any program that can edit/cut/trim a .mkv video without reencoding?
bond
4th November 2007, 10:45
it is possible to crop mpeg video streams independantly of the container used, by setting crop values in the video streams header. every compliant decoder has to crop the picture according to that
i dont know if trahalds tool already supports these cropping flags
samukas
4th November 2007, 17:56
It's exactly a MPEG stream I'd like to "crop"... It doesn't seem to work with the --crop command inside mkv (using MPC or VLC). Also, I seem to get a stream error of some kind running it trough MkvVerify =/
It would be great if there was a tool to flag croping values into the MPG stream , like you say bond... I honestly don't know what trahalds tool you are refering to...:helpful:
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.