Opened 13 years ago

Closed 13 years ago

#327 closed defect (fixed)

artifacts when seeking in mpeg4 avi (regression)

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

Description

Since the patch:

commit 187528441ab936c102b8e72f38925cc10fc14abc
Author: Michael Niedermayer <michaelni@gmx.at>
Date: Fri May 6 03:52:16 2011 +0200

avidec: correct frame_offset for seeking

I have artifacts when seeking on an avi file. the file is mpeg4 avi encoded with mencoder and is 5713978482 bytes in length. if i chop (with dd) the first 20 or 200mb of the file, the piece seeks correctly. (testing with ffplay)

playing (and seeking) the full file with the problem

$ ./ffplay artifacts_when_seeking.avi 
ffplay version N-30884-g54dd50d, Copyright (c) 2003-2011 the FFmpeg developers
  built on Jun 20 2011 23:10:06 with gcc 4.5.2
  configuration: 
  libavutil    51.  9. 1 / 51.  9. 1
  libavcodec   53.  7. 0 / 53.  7. 0
  libavformat  53.  4. 0 / 53.  4. 0
  libavdevice  53.  1. 1 / 53.  1. 1
  libavfilter   2. 23. 0 /  2. 23. 0
  libswscale    0. 14. 1 /  0. 14. 1
[avi @ 0x13b01c0] non-interleaved AVI
Input #0, avi, from 'artifacts_when_seeking.avi':
  Metadata:
    encoder         : MEncoder 1.0rc4-4.5.2
  Duration: 02:13:54.16, start: 0.000000, bitrate: 5689 kb/s
    Stream #0.0: Video: mpeg4, yuv420p, 1280x544 [PAR 1:1 DAR 40:17], 24 tbr, 24 tbn, 24 tbc
    Stream #0.1: Audio: dca (DTS), 48000 Hz, 5.1, s16, 1536 kb/s
[dca @ 0x13af5e0] Not a valid DCA frame=   43KB sq=    0B f=0/0   f=0/0   
[mpeg4 @ 0x13675c0] warning: first frame is no keyframe0B f=0/0   
[dca @ 0x13af5e0] Not a valid DCA frame=   27KB sq=    0B f=0/0   
[mpeg4 @ 0x13675c0] warning: first frame is no keyframe
[dca @ 0x13af5e0] Not a valid DCA frame=  285KB sq=    0B f=0/0   
[mpeg4 @ 0x13675c0] warning: first frame is no keyframe0B f=0/0   
[dca @ 0x13af5e0] Not a valid DCA frame=  575KB sq=    0B f=0/0   
[mpeg4 @ 0x13675c0] warning: first frame is no keyframe0B f=0/0   
[dca @ 0x13af5e0] Not a valid DCA frame=  682KB sq=    0B f=0/0   
[mpeg4 @ 0x13675c0] warning: first frame is no keyframe0B f=0/0   
[dca @ 0x13af5e0] Not a valid DCA frame=  627KB sq=    0B f=0/0   
[mpeg4 @ 0x13675c0] warning: first frame is no keyframe0B f=0/0   
[dca @ 0x13af5e0] Not a valid DCA frame=  674KB sq=    0B f=0/0   
[mpeg4 @ 0x13675c0] warning: first frame is no keyframe0B f=0/0   
[dca @ 0x13af5e0] Not a valid DCA frame=  378KB sq=    0B f=0/0   
[mpeg4 @ 0x13675c0] warning: first frame is no keyframe0B f=0/0   
[dca @ 0x13af5e0] Not a valid DCA frame=  423KB sq=    0B f=0/0   
[mpeg4 @ 0x13675c0] warning: first frame is no keyframe0B f=0/0   
 188.34 A-V:  0.008 s:0.0 aq=  321KB vq=  392KB sq=    0B f=0/0  

revert two commits - the one mentioned and a update from ticket #271

$ git revert -n a7e4342fc1a0e962b829a9a194d034fa38590951
$ git revert -n 187528441ab936c102b8e72f38925cc10fc14abc

i am then able to seek ok without the artifacts

$ ./ffplay artifacts_when_seeking.avi 
ffplay version N-30884-g54dd50d, Copyright (c) 2003-2011 the FFmpeg developers
  built on Jun 20 2011 23:10:06 with gcc 4.5.2
  configuration: 
  libavutil    51.  9. 1 / 51.  9. 1
  libavcodec   53.  7. 0 / 53.  7. 0
  libavformat  53.  4. 0 / 53.  4. 0
  libavdevice  53.  1. 1 / 53.  1. 1
  libavfilter   2. 23. 0 /  2. 23. 0
  libswscale    0. 14. 1 /  0. 14. 1
[avi @ 0x2d850c0] non-interleaved AVI
Input #0, avi, from 'artifacts_when_seeking.avi':
  Metadata:
    encoder         : MEncoder 1.0rc4-4.5.2
  Duration: 02:13:54.16, start: 0.000000, bitrate: 5689 kb/s
    Stream #0.0: Video: mpeg4, yuv420p, 1280x544 [PAR 1:1 DAR 40:17], 24 tbr, 24 tbn, 24 tbc
    Stream #0.1: Audio: dca (DTS), 48000 Hz, 5.1, s16, 1536 kb/s
[dca @ 0x2d844c0] Not a valid DCA frame=   19KB sq=    0B f=0/0   f=0/0   
 364.79 A-V: -0.002 s:0.0 aq=  319KB vq=  840KB sq=    0B f=0/0   
    Last message repeated 8 times

here is a snippet from the beginning of the file (20mb). if you need anything else please let me know.
http://www.datafilehost.com/download-a1793e98.html

Change History (2)

comment:1 by exobuzz, 13 years ago

I have uploaded another file to better illustrate the problem. This time rather than just cutting the first 20mb of the file, i created a version of the file that contains the first 42mb and the last ~5mb or so, and then compressed it - it will unpack to a 5.4gb file

http://www.datafilehost.com/download-f676e3df.html

with this file seeking at shows the issue with the artifacts. I hope this can be resolved soon, as I am maintaining a set of ffmpeg libraries with a project that has to include a patch reverting the two tickets above currently.

comment:2 by Michael Niedermayer, 13 years ago

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