Opened 8 years ago

Closed 4 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 cehoyos 8 years ago.
avidavih.avi (939.4 KB) - added by cehoyos 6 years ago.
avidstrf.avi (939.4 KB) - added by cehoyos 6 years ago.
avidvids.avi (939.4 KB) - added by cehoyos 6 years ago.

Change History (17)

Changed 8 years ago by cehoyos

comment:1 Changed 8 years ago by cehoyos

  • Component changed from undetermined to avcodec
  • Reproduced by developer set
  • Status changed from new to open
  • Version changed from unspecified to git-master

comment:2 Changed 8 years ago by michael

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

comment:3 Changed 8 years ago by cehoyos

  • Keywords mjpeg cropping added

comment:4 Changed 7 years ago by cehoyos

  • Keywords AVID added

comment:5 Changed 7 years ago by cehoyos

  • Keywords roundup added

comment:6 Changed 7 years ago by cehoyos

  • Keywords avi added

comment:7 follow-up: Changed 6 years ago by michael

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

comment:8 in reply to: ↑ 7 ; follow-up: Changed 6 years ago by 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.

comment:9 in reply to: ↑ 8 Changed 6 years ago by michael

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 ?

Changed 6 years ago by cehoyos

Changed 6 years ago by cehoyos

Changed 6 years ago by cehoyos

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

Three samples for testing with the original decoder attached.

comment:11 in reply to: ↑ 10 Changed 6 years ago by ami_stuff

Replying to cehoyos:

Three samples for testing with the original decoder attached.

here is the output:

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

comment:12 Changed 6 years ago by cehoyos

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 Changed 4 years ago by michael

  • Resolution set to fixed
  • Status changed from open to closed
Note: See TracTickets for help on using tickets.