View Single Post
Old 12th November 2020, 15:46   #915  |  Link
DragonQ
Registered User
 
Join Date: Mar 2007
Posts: 934
Quote:
Originally Posted by Aleksoid1978 View Post
MPC-BE(with internal filters) support.
So it does. Shame it doesn't support madVR out of the box, but I guess that's proof that it does work when properly implemented. It's rather annoying that most players haven't implemented it yet despite some rather old feature tickets being open!

Quote:
Originally Posted by butterw2 View Post
h264/hevc bitstream crop modification with ffmpeg works ok in most software players (tested in mp4).

https://forum.videohelp.com/threads/...e)#post2592742
This looks promising. Unfortunately, it doesn't seem to work for me. I'm trying to crop a 4:3 1920x1080 video to 1440x1080 and have confirmed that the exact centre 1440 columns contain video data and the rest are black. The following should work:

Code:
ffmpeg -i "original.mkv" -codec copy -bsf:v h264_metadata=crop_left=240:crop_right=240 -aspect 1440:1080 "test.mkv"
However, for some reason when I play the resulting video, there's about 48 pixels of black on the left side and 48 pixels of video missing from the right side, as if the crop isn't happening in the centre as it should. This happens when playing the test file in MPC-HC with EVR or madVR, and MPC-BE. Also, madVR thinks "100% zoom" is now 1488x1166 for some reason.

I also tried extracting the h264 stream and running that through ffmpeg, then remuxing to MKV. Same issue. I also tried outputting to .mp4...same issue. Tried using both ffmpeg 4.2.4 & 4.3.1. Maybe it's because the video is interlaced? I've uploaded a 10s sample here in case anyone else wants to try.

EDIT: Never mind, it works fine but only when cropping in multiples of 64. The closest crop I can get is:

Code:
ffmpeg -i "original.mkv" -codec copy -bsf:v h264_metadata=crop_left=192:crop_right=192 -aspect 1536:1080 "test.mkv"
And with ITU601 aspect ratio correction:
Code:
ffmpeg -i "original.mkv" -codec copy -bsf:v h264_metadata=crop_left=192:crop_right=192 -aspect 1575:1080 "test.mkv"
These play correctly in MPC-HC + madVR but not in Kodi on Windows or on my CoreELEC box, sadly. In both cases, Kodi squishes the video far too much. It looks like it might be applying the aspect ratio before the crop, rather than afterwards.
__________________
TV Setup: LG OLED55B7V; Onkyo TX-NR515; ODroid N2+; CoreElec 9.2.7

Last edited by DragonQ; 12th November 2020 at 16:59.
DragonQ is offline   Reply With Quote