Opened 9 years ago
Closed 9 years ago
#5301 closed defect (duplicate)
support PixelCrop* and DisplayWidth Display Height elements of Matroska
Reported by: | dave rice | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avformat |
Version: | git-master | Keywords: | mkv cropping |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
The Matroska spec defines PixelCrop[Bottom|Top|Left|Right] elements as the value of "The number of video pixels to remove at the [top|bottom|left|right] of the image." Presently the values don't appear to be used in the display.
For instance, the attached sample matroska_pixel_crop_test.mkv uses these pixel/crop/display values:
PixelWidth 320
PixelHeight 240
PixelCropBottom 40
PixelCropTop 0
PixelCropLeft 240
PixelCropRight 40
DisplayWidth 320
DisplayHeight 240
Since the image is a 320x240 testsrc image, the display should be cropped so that only one color bar is shown, but instead the whole frame is shown/used. I suggest have a demuxer option to enable/disable the use of PixelCrop* elements when matroska is used.
How to reproduce:
ffmpeg -i matroska_pixel_crop_test.mkv ffmpeg version N-44055-g6f5048f Copyright (c) 2000-2016 the FFmpeg developers built with Apple LLVM version 7.0.2 (clang-700.1.81) configuration: --prefix=/usr/local/Cellar/ffmpeg/HEAD --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libxvid --enable-libfreetype --enable-libfaac --enable-libass --enable-ffplay --enable-libopenjpeg --disable-decoder=jpeg2000 --extra-cflags=-I/usr/local/Cellar/openjpeg/1.5.2_1/include/openjpeg-1.5 --enable-nonfree --enable-vda libavutil 55. 19.100 / 55. 19.100 libavcodec 57. 27.101 / 57. 27.101 libavformat 57. 28.100 / 57. 28.100 libavdevice 57. 0.101 / 57. 0.101 libavfilter 6. 39.100 / 6. 39.100 libavresample 3. 0. 0 / 3. 0. 0 libswscale 4. 0.100 / 4. 0.100 libswresample 2. 0.101 / 2. 0.101 libpostproc 54. 0.100 / 54. 0.100 Input #0, matroska,webm, from 'matroska_pixel_crop_test.mkv': Metadata: ENCODER : Lavf57.28.100 Duration: 00:00:01.00, start: 0.000000, bitrate: 869 kb/s Stream #0:0: Video: ffv1 (FFV1 / 0x31564646), yuv420p, 320x240, SAR 1:1 DAR 4:3, 25 fps, 25 tbr, 1k tbn, 1k tbc (default) Metadata: ENCODER : Lavc57.27.101 ffv1 DURATION : 00:00:01.000000000 At least one output file must be specified
Another real-world sample with these values is available here: http://archive.org/download/dl.icemusic.com/ArashFt.Aysel-AlwaysliveEurovisionSemiFinal2009.-WwW.Myicemusic-IR.mkv. It uses:
PixelWidth: 720
PixelHeight: 576
PixelCropBottom: 4
PixelCropTop = 0
PixelCropLeft = 2
PixelCropRight = 4
DisplayWidth = 1024
DisplayHeight = 576
Thanks
Attachments (1)
Change History (2)
by , 9 years ago
Attachment: | matroska_pixel_crop_test.mkv added |
---|
comment:1 by , 9 years ago
Keywords: | mkv cropping added; matroska removed |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
Should be tested again once ticket #4489 is fixed.
Matroska file with PixelCrop values set