Opened 7 years ago

Last modified 13 days ago

#1182 open defect

[ac3] frame sync error

Reported by: carlrosmann Owned by:
Priority: minor Component: undetermined
Version: git-master Keywords:
Cc: nfxjfg@googlemail.com Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description (last modified by cehoyos)

seeking in ffplay causes $subject.
Also seeking in another player that uses libav* also causes frame sync error.

I have uploaded file powderblue to upload.ffmpeg.org

Anything else i can do to help?

Change History (8)

comment:1 Changed 7 years ago by cehoyos

  • Description modified (diff)
  • Priority changed from normal to minor
  • Reproduced by developer set
  • Status changed from new to open
  • Version changed from unspecified to git-master

Not reproducible with ffmpeg.

$ ffplay powderblue.avi
ffplay version N-39664-g6bfb304 Copyright (c) 2003-2012 the FFmpeg developers
  built on Apr 10 2012 01:24:40 with gcc 4.5.3
  configuration: --cc=/usr/local/gcc-4.5.3/bin/gcc --enable-gpl --enable-libtheora --enable-libopenjpeg
  libavutil      51. 46.100 / 51. 46.100
  libavcodec     54. 14.101 / 54. 14.101
  libavformat    54.  3.100 / 54.  3.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 67.101 /  2. 67.101
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 10.100 /  0. 10.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, avi, from 'powderblue.avi':
  Metadata:
    encoder         : MEncoder version 3.8.5 building on 20100625
  Duration: 01:46:05.10, start: 0.000000, bitrate: 13 kb/s
    Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 692x388 [SAR 1:1 DAR 173:97], SAR 794624:794589 DAR 8192:4593, 23.98 tbr, 23.98 tbn, 23.98 tbc
    Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), s16, 448 kb/s
[ac3 @ 0x14f3a00] frame sync error86KB vq=   27KB sq=    0B f=0/0   0/0
  19.82 A-V: -0.325 fd=   0 aq=   95KB vq=    2KB sq=    0B f=0/0

comment:2 follow-up: Changed 4 years ago by gjdfgh

This also happens when seeking in the raw mpeg stream of commercial DVDs (or at least one DVD). After printing this error, the decoder returns an error. This is pretty bad for me, because I think this causes a slight desync.

Looking at the code, I guess it simply fails with AAC_AC3_PARSE_ERROR_SYNC internally. This error also happens when seeking with libdvdread or libdvdnav (in which case seeking with libavformat is not involved at all). This means it fails with the same error in both cases. I'm not sure what to make out of it.

I uploaded a sample named "dvdsample" using http://upload.ffmpeg.org/upload/, but I'm not really sure where the upload form put it. (Maybe failed?)

comment:3 Changed 4 years ago by gjdfgh

  • Cc nfxjfg@googlemail.com added

comment:4 in reply to: ↑ 2 Changed 4 years ago by cehoyos

Replying to gjdfgh:

I uploaded a sample named "dvdsample" using http://upload.ffmpeg.org/upload/

No such sample was uploaded today, consider reading https://ffmpeg.org/bugreports.html or upload to http://www.datafilehost.com/

comment:5 Changed 4 years ago by gjdfgh

Retried with a real FTP client. Now it's actually there.

By the way, if you use ffprobe and look at the packet and frame timestamps after a seek, the first audio PTS is different, which implies ffprobe implicitly drops the "bad" first audio packet too. (-read_interval, -show_packets, and -show_frames options.)

comment:6 Changed 13 days ago by richardpl

Where is sample now?

comment:7 Changed 13 days ago by cehoyos

http://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket1182/
The warning has changed but is now also reproducible with ffmpeg:

$ ffmpeg -ss 10 -i powderblue.avi -t 50 -f null -
ffmpeg version N-92592-g5d8df52 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 6.4.0 (GCC)
  configuration: --enable-gpl --enable-libxml2 --enable-gnutls --cc=/usr/local/gcc-6.4.0/bin/gcc
  libavutil      56. 24.101 / 56. 24.101
  libavcodec     58. 41.100 / 58. 41.100
  libavformat    58. 23.102 / 58. 23.102
  libavdevice    58.  6.101 / 58.  6.101
  libavfilter     7. 46.101 /  7. 46.101
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
Input #0, avi, from 'powderblue.avi':
  Metadata:
    encoder         : MEncoder version 3.8.5 building on 20100625
  Duration: 00:01:02.15, start: 0.000000, bitrate: 1349 kb/s
    Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 692x388 [SAR 1:1 DAR 173:97], SAR 794624:794589 DAR 8192:4593, 23.98 fps, 23.98 tbr, 23.98 tbn, 23.98 tbc
    Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), fltp, 448 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg4 (native) -> wrapped_avframe (native))
  Stream #0:1 -> #0:1 (ac3 (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[NULL @ 0x398fd80] Failed to parse extradata
Output #0, null, to 'pipe:':
  Metadata:
    encoder         : Lavf58.23.102
    Stream #0:0: Video: wrapped_avframe, yuv420p, 692x388 [SAR 794624:794589 DAR 8192:4593], q=2-31, 200 kb/s, 23.98 fps, 23.98 tbn, 23.98 tbc
    Metadata:
      encoder         : Lavc58.41.100 wrapped_avframe
    Stream #0:1: Audio: pcm_s16le, 48000 Hz, 5.1(side), s16, 4608 kb/s
    Metadata:
      encoder         : Lavc58.41.100 pcm_s16le
frame= 1199 fps=0.0 q=-0.0 Lsize=N/A time=00:00:50.00 bitrate=N/A speed= 167x
video:628kB audio:28125kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

comment:8 Changed 13 days ago by cehoyos

Same warning as before with second sample:

$ ffmpeg -ss 10 -i dvdsample -t 10 -f null -
ffmpeg version N-92592-g5d8df52 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 6.4.0 (GCC)
  configuration: --enable-gpl --enable-libxml2 --enable-gnutls
  libavutil      56. 24.101 / 56. 24.101
  libavcodec     58. 41.100 / 58. 41.100
  libavformat    58. 23.102 / 58. 23.102
  libavdevice    58.  6.101 / 58.  6.101
  libavfilter     7. 46.101 /  7. 46.101
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
[mpeg2video @ 0x23d5240] Invalid frame dimensions 0x0.
    Last message repeated 10 times
Input #0, mpeg, from 'dvdsample':
  Duration: 00:00:24.60, start: 0.287267, bitrate: 3462 kb/s
    Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, top first), 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x80]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s
    Stream #0:2[0x81]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video (native) -> wrapped_avframe (native))
  Stream #0:1 -> #0:1 (ac3 (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[ac3 @ 0x23df600] frame sync error
Error while decoding stream #0:1: Invalid data found when processing input
Output #0, null, to 'pipe:':
  Metadata:
    encoder         : Lavf58.23.102
    Stream #0:0: Video: wrapped_avframe, yuv420p, 720x576 [SAR 64:45 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
    Metadata:
      encoder         : Lavc58.41.100 wrapped_avframe
    Stream #0:1: Audio: pcm_s16le, 48000 Hz, 5.1(side), s16, 4608 kb/s
    Metadata:
      encoder         : Lavc58.41.100 pcm_s16le
frame=  250 fps=0.0 q=-0.0 Lsize=N/A time=00:00:10.00 bitrate=N/A speed=92.3x
video:131kB audio:5625kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Note: See TracTickets for help on using tickets.