Opened 10 years ago

Last modified 7 years ago

#3825 new defect

Wrong PTS in Ogg Vorbis file

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

Description

With the attached file, the Ogg demuxer gives the following timestamps:

packet|pts=20032|duration=1024
packet|pts=21056|duration=1024
packet|pts=22528|duration=128
packet|pts=22656|duration=128

Notice that 21056 + 1024 = 22080 ≠ 22528.

For the same file, oggz-dump shows:

00:00:00.454: serialno 1746078464, calc. gpos 20032, packetno 23: 1 byte
00:00:00.477: serialno 1746078464, calc. gpos 21056, packetno 24: 1 byte
00:00:00.500: serialno 1746078464, calc. gpos 22080, packetno 25: 1 byte
00:00:00.513: serialno 1746078464, calc. gpos 22656, packetno 26: 1 byte

0.500 ≈ 22080/44100

Full ffprobe output (probably useless):

$ ./ffprobe_g -of compact -show_entries packet=pts,duration ~/va2.ogg 
ffprobe version N-65207-g7a8f8c6 Copyright (c) 2007-2014 the FFmpeg developers
  built on Aug  3 2014 16:24:06 with gcc 4.9 (Debian 4.9.1-1)
  configuration: --enable-shared --disable-static --enable-gpl --enable-libx264 --enable-libopus --enable-libass --enable-libfreetype --enable-opengl --assert-level=2
  libavutil      52. 94.100 / 52. 94.100
  libavcodec     55. 71.100 / 55. 71.100
  libavformat    55. 50.100 / 55. 50.100
  libavdevice    55. 13.102 / 55. 13.102
  libavfilter     4. 11.102 /  4. 11.102
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 19.100 /  0. 19.100
  libpostproc    52.  3.100 / 52.  3.100
Input #0, ogg, from '/home/cigaes/va2.ogg':
  Duration: 00:00:00.76, start: 0.000000, bitrate: 93 kb/s
    Stream #0:0: Audio: vorbis, 44100 Hz, stereo, fltp, 128 kb/s
    Metadata:
      track           : 5
      ALBUM           : XXXXXXXXXXXXXXXXXXXX
      ARTIST          : XXXXXXXXXX
      ARTIST_JA       : XXXXXXXXXXXXXXX
      TITLE           : XXXXXXXXX
packet|pts=-128|duration=128
packet|pts=0|duration=576
packet|pts=576|duration=1024
packet|pts=1600|duration=1024
packet|pts=2624|duration=1024
packet|pts=3648|duration=1024
packet|pts=4672|duration=1024
packet|pts=5696|duration=1024
packet|pts=6720|duration=1024
packet|pts=7744|duration=1024
packet|pts=8768|duration=1024
packet|pts=9792|duration=1024
packet|pts=10816|duration=1024
packet|pts=11840|duration=1024
packet|pts=12864|duration=1024
packet|pts=13888|duration=1024
packet|pts=14912|duration=1024
packet|pts=15936|duration=1024
packet|pts=16960|duration=1024
packet|pts=17984|duration=1024
packet|pts=19008|duration=1024
packet|pts=20032|duration=1024
packet|pts=21056|duration=1024
packet|pts=22528|duration=128
packet|pts=22656|duration=128
packet|pts=22784|duration=128
packet|pts=22912|duration=128
packet|pts=23040|duration=128
packet|pts=23168|duration=128
packet|pts=23296|duration=128
packet|pts=23424|duration=128
packet|pts=23552|duration=128
packet|pts=23680|duration=576
packet|pts=24256|duration=1024
packet|pts=25280|duration=1024
packet|pts=26304|duration=1024
packet|pts=27328|duration=1024
packet|pts=28352|duration=1024
packet|pts=29376|duration=1024
packet|pts=30400|duration=1024
packet|pts=31424|duration=1024
packet|pts=32448|duration=1024

Attachments (2)

va2.ogg (8.7 KB ) - added by Cigaes 10 years ago.
cover-test.ogg (94.7 KB ) - added by Carl Eugen Hoyos 7 years ago.

Download all attachments as: .zip

Change History (4)

by Cigaes, 10 years ago

Attachment: va2.ogg added

comment:1 by Carl Eugen Hoyos, 10 years ago

Keywords: ogg vorbis added

comment:2 by Uwe Klotz, 7 years ago

This bug can also be verified with one of our test files:
https://github.com/mixxxdj/mixxx/blob/master/src/test/id3-test-data/cover-test.ogg

1st frame: pts = 0, nb_samples = 576
2nd frame: pts = 1024, nb_samples = 576
3rd frame: pts = 1152, nb_samples = 128
...

The new FFmpeg decoder (work-in-progress) correctly detects those inconsistencies caused by overlapping frames.

Our tests for sample accurate decoding fail when decoding OGG files using FFmpeg.

by Carl Eugen Hoyos, 7 years ago

Attachment: cover-test.ogg added
Note: See TracTickets for help on using tickets.