Opened 6 years ago

Closed 5 years ago

#1699 closed enhancement (wontfix)

iff: fix aspect ratio

Reported by: ami_stuff Owned by:
Priority: wish Component: avformat
Version: git-master Keywords: iff
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

ignoring aspect ration in iff demuxer seems to fix ffplay's displayed aspect ratio

C:\>ffmpeg -i CELTIC2.LBM
ffmpeg version N-43803-g2c0b164 Copyright (c) 2000-2012 the FFmpeg developers
  built on Aug 22 2012 02:22:47 with gcc 4.5.0 (GCC) 20100414 (Fedora MinGW 4.5.
0-1.fc14)
  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 -lpthread' --extra-cflags='--static -I/var/www/users/research/ffmpeg/snap
shots/build/include' --extra-ldflags='-static -L/var/www/users/research/ffmpeg/s
napshots/build/lib' --enable-bzlib --enable-zlib --enable-gpl --enable-version3
--enable-nonfree --enable-libx264 --enable-libspeex --enable-libtheora --enable-
libvorbis --enable-libfaac --enable-libxvid --enable-libopencore-amrnb --enable-
libopencore-amrwb --enable-libmp3lame --enable-libvpx --disable-decoder=libvpx
  libavutil      51. 70.100 / 51. 70.100
  libavcodec     54. 54.100 / 54. 54.100
  libavformat    54. 25.104 / 54. 25.104
  libavdevice    54.  2.100 / 54.  2.100
  libavfilter     3. 13.100 /  3. 13.100
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
[iff @ 0x1eace00] Estimating duration from bitrate, this may be inaccurate
Input #0, iff, from 'CELTIC2.LBM':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: iff_byterun1 (PBM  / 0x204D4250), pal8, 320x200, SAR 5:6
 DAR 4:3, 90k tbr, 90k tbn, 90k tbc
At least one output file must be specified

Attachments (5)

CELTIC2.LBM (57.3 KB) - added by ami_stuff 6 years ago.
A4000T_HAM6.IFF (110.8 KB) - added by ami_stuff 6 years ago.
ham6.iff (563.7 KB) - added by ami_stuff 6 years ago.
iff.diff (721 bytes) - added by ami_stuff 6 years ago.
1.iff (58.2 KB) - added by ami_stuff 6 years ago.

Download all attachments as: .zip

Change History (16)

Changed 6 years ago by ami_stuff

Changed 6 years ago by ami_stuff

Changed 6 years ago by ami_stuff

Changed 6 years ago by ami_stuff

comment:1 Changed 6 years ago by ami_stuff

  • Summary changed from iff ilbm: fix aspect ratio to iff: fix aspect ratio

comment:2 follow-up: Changed 6 years ago by cehoyos

  • Keywords iff added
  • Version changed from unspecified to git-master

Don't you agree that the aspect is correct for A4000T_HAM6.IFF without your patch (and wrong with the change)?

(Unrelated: Isn't there a bug visible decoding A4000T_HAM6.IFF? The table is not completely blue here.)

Changed 6 years ago by ami_stuff

comment:3 in reply to: ↑ 2 Changed 6 years ago by ami_stuff

Replying to cehoyos:

Don't you agree that the aspect is correct for A4000T_HAM6.IFF without your patch (and wrong with the change)?

This one may be correct, but I'm unsure if I like correct aspect ratio or maybe not resized image without black borders. Most (all?) image viewers seems to ignore ar for iff.

(Unrelated: Isn't there a bug visible decoding A4000T_HAM6.IFF? The table is not completely blue here.)

Yes, I have created ticket #1701 for this.

comment:4 Changed 6 years ago by pross

FFmpeg is decoding the aspect ratio information according to the specification, and it works well for some files. Its just the files attached to this ticket contain "bad" aspect ratio information.

Not sure what can be done here!

comment:5 Changed 6 years ago by ami_stuff

comment:6 Changed 6 years ago by ami_stuff

If as is totally incorrect then maybe we could ignore it?

comment:7 Changed 6 years ago by richardpl

what creates this files

It is bad idea to ignore aspect ratio for correct files.

comment:8 Changed 6 years ago by cehoyos

What about a demuxer option that allows to ignore the written aspect ratio (assuming it is impossible to detect the faulty encoders)?

comment:9 Changed 6 years ago by richardpl

  • Component changed from undetermined to avformat
  • Status changed from new to open

Good idea, patch welcome!

comment:10 Changed 5 years ago by richardpl

  • Priority changed from normal to wish
  • Type changed from defect to enhancement

comment:11 Changed 5 years ago by richardpl

  • Resolution set to wontfix
  • Status changed from open to closed

You have setdar/setsar filters.

Note: See TracTickets for help on using tickets.