[FFmpeg-trac] #5301(avformat:new): support PixelCrop* and DisplayWidth Display Height elements of Matroska
FFmpeg
trac at avcodec.org
Mon Mar 7 05:28:28 CET 2016
#5301: support PixelCrop* and DisplayWidth Display Height elements of Matroska
--------------------------------------+----------------------------------
Reporter: dericed | Owner:
Type: defect | Status: new
Priority: normal | Component: avformat
Version: git-master | Keywords: matroska
Blocked By: | Blocking:
Reproduced by developer: 0 | Analyzed by developer: 0
--------------------------------------+----------------------------------
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
--
Ticket URL: <https://trac.ffmpeg.org/ticket/5301>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list