Opened 13 years ago

Closed 13 years ago

#1059 closed defect (invalid)

rasenc: broken output with odd width

Reported by: ami_stuff Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords:
Cc: onemda@gmail.com Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: yes

Description

"ffmpeg -i 599.png -pix_fmt bgr24 out.tga" works ok, so the problem is most likely not swscale-related.

"ffmpeg -i 599.png -s 600x412 out.ras" works as well.

C:\>ffmpeg -i 599.png out.ras
ffmpeg version N-38732-g4272dc3 Copyright (c) 2000-2012 the FFmpeg developers
  built on Mar 12 2012 02:19:36 with gcc 4.5.0 20100414 (Fedora MinGW 4.5.0-1.fc
14)
  configuration: --prefix=/var/www/users/research/ffmpeg/snapshots/build --arch=
x86 --target-os=mingw32 --cross-prefix=i686-pc-mingw32- --cc='ccache i686-pc-min
gw32-gcc' --enable-w32threads --enable-memalign-hack --enable-runtime-cpudetect
--enable-cross-compile --enable-static --disable-shared --extra-libs='-lws2_32 -
lwinmm' --extra-cflags='--static -I/var/www/users/research/ffmpeg/snapshots/buil
d/include' --extra-ldflags='-static -L/var/www/users/research/ffmpeg/snapshots/b
uild/lib' --enable-bzlib --enable-zlib --enable-gpl --enable-version3 --enable-n
onfree --enable-libx264 --enable-libspeex --enable-libtheora --enable-libvorbis
--enable-libfaac --enable-libxvid --enable-libopencore-amrnb --enable-libopencor
e-amrwb --enable-libmp3lame --enable-libvpx --disable-decoder=libvpx
  libavutil      51. 42.100 / 51. 42.100
  libavcodec     54. 10.100 / 54. 10.100
  libavformat    54.  2.100 / 54.  2.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 64.101 /  2. 64.101
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  7.100 /  0.  7.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, image2, from '599.png':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: png, rgb24, 599x412, 25 tbr, 25 tbn, 25 tbc
Incompatible pixel format 'rgb24' for codec 'sunrast', auto-selecting format 'bg
r24'
[buffer @ 0x1d91580] w:599 h:412 pixfmt:rgb24 tb:1/1000000 sar:0/1 sws_param:
[buffersink @ 0x1d91800] auto-inserting filter 'auto-inserted scale 0' between t
he filter 'src' and the filter 'out'
[scale @ 0x1d91c40] w:599 h:412 fmt:rgb24 -> w:599 h:412 fmt:bgr24 flags:0x4
Output #0, image2, to 'out.ras':
  Metadata:
    encoder         : Lavf54.2.100
    Stream #0:0: Video: sunrast, bgr24, 599x412, q=2-31, 200 kb/s, 90k tbn, 25 t
bc
Stream mapping:
  Stream #0:0 -> #0:0 (png -> sunrast)
Press [q] to stop, [?] for help
frame=    1 fps=0.0 q=0.0 Lsize=       0kB time=00:00:00.04 bitrate=   0.0kbits/
s
video:964kB audio:0kB global headers:0kB muxing overhead -100.000000%

Attachments (2)

599.png (1.3 KB ) - added by ami_stuff 13 years ago.
out.ras (964.4 KB ) - added by Carl Eugen Hoyos 13 years ago.

Download all attachments as: .zip

Change History (6)

by ami_stuff, 13 years ago

Attachment: 599.png added

comment:1 by ami_stuff, 13 years ago

The output is broken while viewing it with IrfanView. ImageMagick reports "memory allocation failed".

by Carl Eugen Hoyos, 13 years ago

Attachment: out.ras added

comment:2 by Carl Eugen Hoyos, 13 years ago

Appears to work fine here:

$ ffmpeg -i 599.png out.ras
ffmpeg version N-38764-gb25a265 Copyright (c) 2000-2012 the FFmpeg developers
  built on Mar 13 2012 08:14:37 with gcc 4.3.2
  configuration: --cc=/usr/local/gcc-4.3.2/bin/gcc --enable-gpl
  libavutil      51. 42.100 / 51. 42.100
  libavcodec     54. 10.100 / 54. 10.100
  libavformat    54.  2.100 / 54.  2.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 64.101 /  2. 64.101
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  7.100 /  0.  7.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, image2, from '599.png':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: png, rgb24, 599x412, 25 tbr, 25 tbn, 25 tbc
Incompatible pixel format 'rgb24' for codec 'sunrast', auto-selecting format 'bgr24'
[buffer @ 0x8ec3840] w:599 h:412 pixfmt:rgb24 tb:1/1000000 sar:0/1 sws_param:
[buffersink @ 0x8ec3b00] auto-inserting filter 'auto-inserted scale 0' between the filter 'src' and the filter 'out'
[scale @ 0x8ec4080] w:599 h:412 fmt:rgb24 -> w:599 h:412 fmt:bgr24 flags:0x4
Output #0, image2, to 'out.ras':
  Metadata:
    encoder         : Lavf54.2.100
    Stream #0:0: Video: sunrast, bgr24, 599x412, q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (png -> sunrast)
Press [q] to stop, [?] for help
frame=    1 fps=0.0 q=0.0 Lsize=       0kB time=00:00:00.04 bitrate=   0.0kbits/s
video:964kB audio:0kB global headers:0kB muxing overhead -100.000000%

comment:3 by ami_stuff, 13 years ago

The strange thing is that sun raster output with odd width have much bigger size than with even width.

$ ffmpeg -i 599.png -s 600x420 600_1.ras
ffmpeg version 0.9.1.git Copyright (c) 2000-2012 the FFmpeg developers
  built on Mar 10 2012 16:15:15 with gcc 4.6.1
  configuration: --disable-yasm --disable-ffprobe
  libavutil      51. 42.100 / 51. 42.100
  libavcodec     54. 10.100 / 54. 10.100
  libavformat    54.  2.100 / 54.  2.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 63.100 /  2. 63.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  7.100 /  0.  7.100
Input #0, image2, from '599.png':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: png, rgb24, 599x412, 25 tbr, 25 tbn, 25 tbc
Incompatible pixel format 'rgb24' for codec 'sunrast', auto-selecting format 'bg
r24'
[buffer @ 017a1c60] w:599 h:412 pixfmt:rgb24 tb:1/1000000 sar:0/1 sws_param:
[scale @ 017a1220] w:599 h:412 fmt:rgb24 -> w:600 h:420 fmt:bgr24 flags:0x4
Output #0, image2, to '600_1.ras':
  Metadata:
    encoder         : Lavf54.2.100
    Stream #0:0: Video: sunrast, bgr24, 600x420, q=2-31, 200 kb/s, 90k tbn, 25 t
bc
Stream mapping:
  Stream #0:0 -> #0:0 (png -> sunrast)
Press [q] to stop, [?] for help
frame=    1 fps=0.0 q=0.0 Lsize=       0kB time=00:00:00.04 bitrate=   0.0kbits/
s
video:738kB audio:0kB global headers:0kB muxing overhead -100.000000%
$ ffmpeg -i 599.png -s 601x420 601_1.ras
ffmpeg version 0.9.1.git Copyright (c) 2000-2012 the FFmpeg developers
  built on Mar 10 2012 16:15:15 with gcc 4.6.1
  configuration: --disable-yasm --disable-ffprobe
  libavutil      51. 42.100 / 51. 42.100
  libavcodec     54. 10.100 / 54. 10.100
  libavformat    54.  2.100 / 54.  2.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 63.100 /  2. 63.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  7.100 /  0.  7.100
Input #0, image2, from '599.png':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: png, rgb24, 599x412, 25 tbr, 25 tbn, 25 tbc
Incompatible pixel format 'rgb24' for codec 'sunrast', auto-selecting format 'bg
r24'
[buffer @ 017a1c60] w:599 h:412 pixfmt:rgb24 tb:1/1000000 sar:0/1 sws_param:
[scale @ 017a1220] w:599 h:412 fmt:rgb24 -> w:601 h:420 fmt:bgr24 flags:0x4
Output #0, image2, to '601_1.ras':
  Metadata:
    encoder         : Lavf54.2.100
    Stream #0:0: Video: sunrast, bgr24, 601x420, q=2-31, 200 kb/s, 90k tbn, 25 t
bc
Stream mapping:
  Stream #0:0 -> #0:0 (png -> sunrast)
Press [q] to stop, [?] for help
frame=    1 fps=0.0 q=0.0 Lsize=       0kB time=00:00:00.04 bitrate=   0.0kbits/
s
video:986kB audio:0kB global headers:0kB muxing overhead -100.000000%
$ ffmpeg -i 599.png -s 602x420 602_1.ras
ffmpeg version 0.9.1.git Copyright (c) 2000-2012 the FFmpeg developers
  built on Mar 10 2012 16:15:15 with gcc 4.6.1
  configuration: --disable-yasm --disable-ffprobe
  libavutil      51. 42.100 / 51. 42.100
  libavcodec     54. 10.100 / 54. 10.100
  libavformat    54.  2.100 / 54.  2.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 63.100 /  2. 63.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  7.100 /  0.  7.100
Input #0, image2, from '599.png':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: png, rgb24, 599x412, 25 tbr, 25 tbn, 25 tbc
Incompatible pixel format 'rgb24' for codec 'sunrast', auto-selecting format 'bg
r24'
[buffer @ 017a1c60] w:599 h:412 pixfmt:rgb24 tb:1/1000000 sar:0/1 sws_param:
[scale @ 017a1220] w:599 h:412 fmt:rgb24 -> w:602 h:420 fmt:bgr24 flags:0x4
Output #0, image2, to '602_1.ras':
  Metadata:
    encoder         : Lavf54.2.100
    Stream #0:0: Video: sunrast, bgr24, 602x420, q=2-31, 200 kb/s, 90k tbn, 25 t
bc
Stream mapping:
  Stream #0:0 -> #0:0 (png -> sunrast)
Press [q] to stop, [?] for help
frame=    1 fps=0.0 q=0.0 Lsize=       0kB time=00:00:00.04 bitrate=   0.0kbits/
s
video:741kB audio:0kB global headers:0kB muxing overhead -100.000000%
$ ffmpeg -i 599.png -s 603x420 603_1.ras
ffmpeg version 0.9.1.git Copyright (c) 2000-2012 the FFmpeg developers
  built on Mar 10 2012 16:15:15 with gcc 4.6.1
  configuration: --disable-yasm --disable-ffprobe
  libavutil      51. 42.100 / 51. 42.100
  libavcodec     54. 10.100 / 54. 10.100
  libavformat    54.  2.100 / 54.  2.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 63.100 /  2. 63.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  7.100 /  0.  7.100
Input #0, image2, from '599.png':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: png, rgb24, 599x412, 25 tbr, 25 tbn, 25 tbc
Incompatible pixel format 'rgb24' for codec 'sunrast', auto-selecting format 'bg
r24'
[buffer @ 017a1c60] w:599 h:412 pixfmt:rgb24 tb:1/1000000 sar:0/1 sws_param:
[scale @ 017a1220] w:599 h:412 fmt:rgb24 -> w:603 h:420 fmt:bgr24 flags:0x4
Output #0, image2, to '603_1.ras':
  Metadata:
    encoder         : Lavf54.2.100
    Stream #0:0: Video: sunrast, bgr24, 603x420, q=2-31, 200 kb/s, 90k tbn, 25 t
bc
Stream mapping:
  Stream #0:0 -> #0:0 (png -> sunrast)
Press [q] to stop, [?] for help
frame=    1 fps=0.0 q=0.0 Lsize=       0kB time=00:00:00.04 bitrate=   0.0kbits/
s
video:990kB audio:0kB global headers:0kB muxing overhead -100.000000%

comment:4 by Elon Musk, 13 years ago

Analyzed by developer: set
Cc: onemda@gmail.com added
Resolution: invalid
Status: newclosed
Version: unspecifiedgit-master

Not our bug.

ImageMagick appears to not support RLE encoded sunrast files, it even ignores RLE flag.

Use -coder raw as workaround when encoding to sunrast images. Please report bug to ImageMagick.

Last edited 13 years ago by Elon Musk (previous) (diff)
Note: See TracTickets for help on using tickets.