[FFmpeg-trac] #1997(avformat:open): setdar/setsar on muxing to mkv can produce files with wrong aspect ratio on 32 bit (was: setdar/setsar on webm transcoding produces files with wrong aspect ratio on Ubuntu 12.04 32 bit)
FFmpeg
trac at avcodec.org
Fri Dec 7 16:42:41 CET 2012
#1997: setdar/setsar on muxing to mkv can produce files with wrong aspect ratio on
32 bit
------------------------------------+------------------------------------
Reporter: kahphi | Owner:
Type: defect | Status: open
Priority: minor | Component: avformat
Version: git-master | Resolution:
Keywords: mkv | Blocked By:
Blocking: | Reproduced by developer: 1
Analyzed by developer: 1 |
------------------------------------+------------------------------------
Changes (by cehoyos):
* status: new => open
* reproduced: 0 => 1
* component: undetermined => avformat
* version: 1.0 => git-master
* analyzed: 0 => 1
Comment:
Reproducible without external libraries:
{{{
$ ./ffmpeg -i tests/lena.pnm -s 720x576 -vf setdar=5:4 -vcodec flv1
out.mkv
$ ./ffmpeg -i out.mkv -vf setdar=4:3 -vcodec flv1 out2.mkv
}}}
If ffmpeg was compiled with -m64, the resulting file out2.mkv has
MATROSKA_ID_VIDEODISPLAYWIDTH set to 768 and DAR is 4:3. If ffmpeg was
compiled with -m32, out2.mkv has MATROSKA_ID_VIDEODISPLAYWIDTH set to 767
(and DAR is 265:199) because d_width in mkv_write_tracks() is calculated
as 767.
{{{
$ ./ffmpeg -i out.mkv -vf setdar=4:3 -vcodec flv1 out32.mkv
ffmpeg version N-47576-g6777aa6 Copyright (c) 2000-2012 the FFmpeg
developers
built on Dec 7 2012 16:37:06 with gcc 4.7 (SUSE Linux)
configuration: --cc='cc -m32'
libavutil 52. 11.102 / 52. 11.102
libavcodec 54. 79.100 / 54. 79.100
libavformat 54. 47.100 / 54. 47.100
libavdevice 54. 3.102 / 54. 3.102
libavfilter 3. 25.101 / 3. 25.101
libswscale 2. 1.103 / 2. 1.103
libswresample 0. 17.102 / 0. 17.102
Input #0, matroska,webm, from 'out.mkv':
Metadata:
ENCODER : Lavf54.47.100
Duration: 00:00:00.04, start: 0.000000, bitrate: 6428 kb/s
Stream #0:0: Video: flv1 (FLV1 / 0x31564C46), yuv420p, 720x576, SAR
1:1 DAR 5:4, 25 fps, 25 tbr, 1k tbn, 1k tbc (default)
[Parsed_setdar_0 @ 0x93a11e0] num:den syntax is deprecated, please use
num/den or named options instead
Output #0, matroska, to 'out32.mkv':
Metadata:
encoder : Lavf54.47.100
Stream #0:0: Video: flv1 (FLV1 / 0x31564C46), yuv420p, 720x576 [SAR
16:15 DAR 4:3], q=2-31, 200 kb/s, 1k tbn, 25 tbc (default)
Stream mapping:
Stream #0:0 -> #0:0 (flv -> flv)
Press [q] to stop, [?] for help
frame= 1 fps=0.0 q=5.0 Lsize= 31kB time=00:00:00.04
bitrate=6429.2kbits/s
video:31kB audio:0kB subtitle:0 global headers:0kB muxing overhead
1.963396%
}}}
{{{
$ ./ffmpeg -i out.mkv -vf setdar=4:3 -vcodec flv1 out64.mkv
ffmpeg version N-47576-g6777aa6 Copyright (c) 2000-2012 the FFmpeg
developers
built on Dec 7 2012 16:38:57 with gcc 4.7 (SUSE Linux)
configuration: --cc='cc -m64'
libavutil 52. 11.102 / 52. 11.102
libavcodec 54. 79.100 / 54. 79.100
libavformat 54. 47.100 / 54. 47.100
libavdevice 54. 3.102 / 54. 3.102
libavfilter 3. 25.101 / 3. 25.101
libswscale 2. 1.103 / 2. 1.103
libswresample 0. 17.102 / 0. 17.102
Input #0, matroska,webm, from 'out.mkv':
Metadata:
ENCODER : Lavf54.47.100
Duration: 00:00:00.04, start: 0.000000, bitrate: 6428 kb/s
Stream #0:0: Video: flv1 (FLV1 / 0x31564C46), yuv420p, 720x576, SAR
1:1 DAR 5:4, 25 fps, 25 tbr, 1k tbn, 1k tbc (default)
[Parsed_setdar_0 @ 0x2584980] num:den syntax is deprecated, please use
num/den or named options instead
Output #0, matroska, to 'out64.mkv':
Metadata:
encoder : Lavf54.47.100
Stream #0:0: Video: flv1 (FLV1 / 0x31564C46), yuv420p, 720x576 [SAR
16:15 DAR 4:3], q=2-31, 200 kb/s, 1k tbn, 25 tbc (default)
Stream mapping:
Stream #0:0 -> #0:0 (flv -> flv)
Press [q] to stop, [?] for help
frame= 1 fps=0.0 q=5.0 Lsize= 31kB time=00:00:00.04
bitrate=6429.2kbits/s
video:31kB audio:0kB subtitle:0 global headers:0kB muxing overhead
1.963396%
}}}
{{{
$ ffmpeg -i out32.mkv -i out64.mkv
ffmpeg version N-47576-g6777aa6 Copyright (c) 2000-2012 the FFmpeg
developers
built on Dec 7 2012 16:40:58 with gcc 4.7 (SUSE Linux)
configuration: --enable-gpl --disable-indev=jack
libavutil 52. 11.102 / 52. 11.102
libavcodec 54. 79.100 / 54. 79.100
libavformat 54. 47.100 / 54. 47.100
libavdevice 54. 3.102 / 54. 3.102
libavfilter 3. 25.101 / 3. 25.101
libswscale 2. 1.103 / 2. 1.103
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
Input #0, matroska,webm, from 'out32.mkv':
Metadata:
ENCODER : Lavf54.47.100
Duration: 00:00:00.04, start: 0.000000, bitrate: 6429 kb/s
Stream #0:0: Video: flv1 (FLV1 / 0x31564C46), yuv420p, 720x576, SAR
212:199 DAR 265:199, 25 fps, 25 tbr, 1k tbn, 1k tbc (default)
Input #1, matroska,webm, from 'out64.mkv':
Metadata:
ENCODER : Lavf54.47.100
Duration: 00:00:00.04, start: 0.000000, bitrate: 6429 kb/s
Stream #1:0: Video: flv1 (FLV1 / 0x31564C46), yuv420p, 720x576, SAR
16:15 DAR 4:3, 25 fps, 25 tbr, 1k tbn, 1k tbc (default)
At least one output file must be specified
}}}
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1997#comment:4>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list