Opened 14 years ago

Closed 9 years ago

#162 closed defect (fixed)

Avid AVI Codec - wrong resolution reported by FFmpeg

Reported by: ami_stuff Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: mjpeg cropping AVID avi roundup
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

issue 1494

https://roundup.libav.org/file579/avid.avi

Author: ami_stuff 	Date: 2009-10-19.18:53:59 	

Attached file is encoded with "Avid AVI Codec" and have 720x576 resolution, but
FFmpeg reports 720x592 and adds black bar on the top of the video.

--------

C:\>ffmpeg -i avid.avi
FFmpeg version SVN-r20231, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  built on Oct 14 2009 04:04:42 with gcc 4.2.4
  configuration: --enable-memalign-hack --prefix=/mingw --cross-prefix=i686-ming
w32- --cc=ccache-i686-mingw32-gcc --target-os=mingw32 --arch=i686 --cpu=i686 --e
nable-avisynth --enable-gpl --enable-version3 --enable-zlib --enable-bzlib --ena
ble-libgsm --enable-libfaad --enable-pthreads --enable-libvorbis --enable-libthe
ora --enable-libspeex --enable-libmp3lame --enable-libopenjpeg --enable-libxvid
--enable-libschroedinger --enable-libx264 --enable-libopencore_amrwb --enable-li
bopencore_amrnb
  libavutil     50. 3. 0 / 50. 3. 0
  libavcodec    52.37. 0 / 52.37. 0
  libavformat   52.39. 1 / 52.39. 1
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0. 7. 1 /  0. 7. 1
[mjpeg @ 0x1a68250]Found 1 unreleased buffers!
Input #0, avi, from 'avid.avi':
  Duration: 00:00:01.79, start: 0.000000, bitrate: 4289 kb/s
    Stream #0.0: Video: mjpeg, yuvj422p, 720x592, 23.97 tbr, 23.97 tbn, 23.97 tb
c
    Stream #0.1: Audio: mp3, 44100 Hz, 2 channels, s16, 128 kb/s
At least one output file must be specified
Author: cehoyos 	Date: 2009-10-19.23:46:14 	

Reproducible with mplayer avid.avi -vc avid

Attachments (4)

avid.avi (939.4 KB ) - added by Carl Eugen Hoyos 14 years ago.
avidavih.avi (939.4 KB ) - added by Carl Eugen Hoyos 11 years ago.
avidstrf.avi (939.4 KB ) - added by Carl Eugen Hoyos 11 years ago.
avidvids.avi (939.4 KB ) - added by Carl Eugen Hoyos 11 years ago.

Change History (17)

by Carl Eugen Hoyos, 14 years ago

Attachment: avid.avi added

comment:1 by Carl Eugen Hoyos, 14 years ago

Component: undeterminedavcodec
Reproduced by developer: set
Status: newopen
Version: unspecifiedgit-master

comment:2 by Michael Niedermayer, 13 years ago

i know how to fix this once we support arbitrary crop values.

comment:3 by Carl Eugen Hoyos, 13 years ago

Keywords: mjpeg cropping added

comment:4 by Carl Eugen Hoyos, 12 years ago

Keywords: AVID added

comment:5 by Carl Eugen Hoyos, 12 years ago

Keywords: roundup added

comment:6 by Carl Eugen Hoyos, 12 years ago

Keywords: avi added

comment:7 by Michael Niedermayer, 11 years ago

Can the correct / croped width/height be extracted from the avid codec bitstream / extradata ?

in reply to:  7 ; comment:8 by Carl Eugen Hoyos, 11 years ago

Replying to michael:

Can the correct / croped width/height be extracted from the avid codec bitstream / extradata ?

The cropped size is set both in the avih and the strf tag.

in reply to:  8 comment:9 by Michael Niedermayer, 11 years ago

Replying to cehoyos:

Replying to michael:

Can the correct / croped width/height be extracted from the avid codec bitstream / extradata ?

The cropped size is set both in the avih and the strf tag.

does the binary decoder use these, that is does it decode the full resolution if these 2 values are increased ?

by Carl Eugen Hoyos, 11 years ago

Attachment: avidavih.avi added

by Carl Eugen Hoyos, 11 years ago

Attachment: avidstrf.avi added

by Carl Eugen Hoyos, 11 years ago

Attachment: avidvids.avi added

comment:10 by Carl Eugen Hoyos, 11 years ago

Three samples for testing with the original decoder attached.

in reply to:  10 comment:11 by ami_stuff, 11 years ago

Replying to cehoyos:

Three samples for testing with the original decoder attached.

here is the output:

http://www.datafilehost.com/d/85578aa0

comment:12 by Carl Eugen Hoyos, 11 years ago

The relevant value is within the strf tag, ie all samples except avidstrf.avi should display 576 lines.

The original decoder scales the 576 lines of actual content to the 592 lines indicated in the header of avidstrf.avi.

comment:13 by Michael Niedermayer, 9 years ago

Resolution: fixed
Status: openclosed
Note: See TracTickets for help on using tickets.