Opened 8 years ago

Closed 8 years ago

#1742 closed defect (fixed)

Wrong PTS values for aac

Reported by: nikola.vranic Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: avi aac
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no


Summary of the bug:
I am using ffmpeg library inside my project to extract packets from media stream. I was able to extract all stream so for, except this one. I don't know why but ffmpeg returns me wrong PTS value for audio. Hole stream duration is ~5s, but audio PTS goes to ~334s. I think that this I is bug inside ffmpeg library. I also try with latest master version from git git:// and I got same think. I successfully fix this by changing avidec.c.

ffmpeg version 0.10.2 and 0.11.1
built on ubuntu 10.4

Attachments (2)

LIBX264_LIBFAAC.avi (113.6 KB) - added by nikola.vranic 8 years ago.
avidec.c (53.5 KB) - added by nikola.vranic 8 years ago.

Download all attachments as: .zip

Change History (7)

Changed 8 years ago by nikola.vranic

Changed 8 years ago by nikola.vranic

comment:1 Changed 8 years ago by nikola.vranic

Change is on line 121.

comment:2 Changed 8 years ago by cehoyos

  • Analyzed by developer unset
  • Keywords avi aac added; audio pts removed
  • Priority changed from important to normal
  • Reproduced by developer unset

Do you think this is a regression?

Since this is probably reproducible with ffplay, please provide complete, uncut console output of ffplay LIBX264_LIBFAAC.avi (it is significantly easier to work on bugs that are reported against ffmpeg or ffplay instead of your local application.

If you have a fix, please send a patch created with git format-patch to ffmpeg-devel.

comment:3 Changed 8 years ago by nikola.vranic

This is a output from ffplay. When you run ffplay command you can see that current stream position are changing mush faster than it should. This is because he read bad audio PTS values. I am just send path to ffmpeg-devel.


ffplay LIBX264_LIBFAAC.avi 
ffplay version N-44535-g1ad63ff Copyright (c) 2003-2012 the FFmpeg developers
  built on Sep 17 2012 20:23:00 with gcc 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1)
  configuration: --disable-postproc --disable-gpl --disable-static --enable-shared --disable-decoder=cavs --disable-yasm
  libavutil      51. 73.101 / 51. 73.101
  libavcodec     54. 56.100 / 54. 56.100
  libavformat    54. 27.101 / 54. 27.101
  libavdevice    54.  2.100 / 54.  2.100
  libavfilter     3. 16.104 /  3. 16.104
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 15.100 /  0. 15.100
[avi @ 0x134dd00] non-interleaved AVI
Input #0, avi, from 'LIBX264_LIBFAAC.avi':
    encoder         : Lavf53.13.0
  Duration: 00:00:05.03, start: 0.000000, bitrate: 184 kb/s
    Stream #0:0: Video: h264 (High) (H264 / 0x34363248), yuv420p, 320x240, 29.97 fps, 29.97 tbr, 29.97 tbn, 59.94 tbc
    Stream #0:1: Audio: aac ([255][0][0][0] / 0x00FF), 48000 Hz, stereo, s16, 57 kb/s
Frame changed from size:0x0 to size:320x2400KB vq=    4KB sq=    0B f=0/0   
 343.23 A-V:324.356 fd= 137 aq=    0KB vq=    0KB sq=    0B f=0/0   f=0/0 
Last edited 8 years ago by cehoyos (previous) (diff)

comment:4 Changed 8 years ago by cehoyos

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

comment:5 Changed 8 years ago by michael

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