Opened 2 years ago

Closed 9 days ago

Last modified 7 days ago

#5710 closed defect (invalid)

AC3 frame sync error

Reported by: Mista_D Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: ac3 mpegts
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by cehoyos)

FFmpeg can't decode specific MPEG2-TS with AC3

ffmpeg302x -i AC3.mpg -xerror -v 99 -f null -

ffmpeg version N-80123-gd74cc61 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-16)
  configuration: --prefix=/home/dennisp/010_64 --enable-static --enable-postproc --enable-gpl --enable-avfilter --enable-libx265 --enable-libx264 --enable-libfdk-aac --enable-pthreads --enable-swscale --enable-runtime-cpudetect --extra-ldflags=-static --disable-shared --disable-encoder=libgsm --disable-decoder=libgsm --disable-doc --enable-version3 --enable-nonfree --enable-libvpx --pkg-config-flags=--static
  libavutil      55. 24.100 / 55. 24.100
  libavcodec     57. 43.100 / 57. 43.100
  libavformat    57. 37.101 / 57. 37.101
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 46.100 /  6. 46.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Splitting the commandline.
Reading option '-i' ... matched as input file with argument 'AC3.mpg'.
Reading option '-xerror' ... matched as option 'xerror' (exit on error) with argument '1'.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '99'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'null'.
Reading option '-' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option xerror (exit on error) with argument 1.
Applying option v (set logging level) with argument 99.
Successfully parsed a group of options.
Parsing a group of options: input file AC3.mpg.
Successfully parsed a group of options.
Opening an input file: AC3.mpg.
[file @ 0x3bd53e0] Setting default whitelist 'file,crypto'
Probing mp3 score:1 size:2048
Probing mpegts score:100 size:2048
Probing mpegvideo score:12 size:2048
[mpegts @ 0x3bd4c40] Format mpegts probed with size=2048 and score=100
score: 44, dvhs_score: -3, fec_score: -1
[mpegts @ 0x3bd4c40] Filter: pid=0x11
[mpegts @ 0x3bd4c40] Filter: pid=0x0
[mpegts @ 0x3bd4c40] PAT:
[mpegts @ 0x3bd4c40] sid=0x1 pid=0x1e0
[mpegts @ 0x3bd4c40] new_program: id=0x0001
[mpegts @ 0x3bd4c40] Filter: pid=0x1e0
[mpegts @ 0x3bd4c40] PMT: len 70
[mpegts @ 0x3bd4c40] sid=0x1 sec_num=0/0 version=31
[mpegts @ 0x3bd4c40] pcr_pid=0x1e1
[mpegts @ 0x3bd4c40] program tag: 0x0e len=3
[mpegts @ 0x3bd4c40] program tag: 0x10 len=6
[mpegts @ 0x3bd4c40] program tag: 0x0b len=2
[mpegts @ 0x3bd4c40] Filter: pid=0x1e1
[mpegts @ 0x3bd4c40] stream=0 stream_type=2 pid=1e1 prog_reg_desc=
[mpegts @ 0x3bd4c40] tag: 0x06 len=1
[mpegts @ 0x3bd4c40] Filter: pid=0x1e2
[mpegts @ 0x3bd4c40] stream=1 stream_type=81 pid=1e2 prog_reg_desc=
[mpegts @ 0x3bd4c40] tag: 0x05 len=4
[mpegts @ 0x3bd4c40] reg_desc=AC-3
[mpegts @ 0x3bd4c40] tag: 0x0a len=4
[mpegts @ 0x3bd4c40] tag: 0x81 len=10
[mpegts @ 0x3bd4c40] tuning done
[mpegts @ 0x3bd4c40] Before avformat_find_stream_info() pos: 0 bytes read:32768 seeks:0
[mpegts @ 0x3bd4c40] Skipping after seek
[mpegts @ 0x3bd4c40] PAT:
[mpegts @ 0x3bd4c40] sid=0x1 pid=0x1e0
[mpegts @ 0x3bd4c40] new_program: id=0x0001
[mpegts @ 0x3bd4c40] PMT: len 70
[mpegts @ 0x3bd4c40] sid=0x1 sec_num=0/0 version=31
[mpegts @ 0x3bd4c40] pcr_pid=0x1e1
[mpegts @ 0x3bd4c40] program tag: 0x0e len=3
[mpegts @ 0x3bd4c40] program tag: 0x10 len=6
[mpegts @ 0x3bd4c40] program tag: 0x0b len=2
[mpegts @ 0x3bd4c40] tag: 0x06 len=1
[mpegts @ 0x3bd4c40] tag: 0x05 len=4
[mpegts @ 0x3bd4c40] reg_desc=AC-3
[mpegts @ 0x3bd4c40] tag: 0x0a len=4
[mpegts @ 0x3bd4c40] tag: 0x81 len=10
[mpegts @ 0x3bd4c40] pid=1e1 pes_code=0x1e0
[mpegts @ 0x3bd4c40] PAT:
[mpegts @ 0x3bd4c40] pid=1e1 pes_code=0x1e0
    Last message repeated 8 times
[mpegts @ 0x3bd4c40] pid=1e2 pes_code=0x1bd
[mpegts @ 0x3bd4c40] pid=1e1 pes_code=0x1e0
    Last message repeated 1 times
[mpegts @ 0x3bd4c40] PMT: len 70
[mpegts @ 0x3bd4c40] pid=1e1 pes_code=0x1e0
    Last message repeated 4 times
[mpegts @ 0x3bd4c40] pid=1e2 pes_code=0x1bd
[mpegts @ 0x3bd4c40] pid=1e1 pes_code=0x1e0
    Last message repeated 7 times
[mpegts @ 0x3bd4c40] PAT:
[mpegts @ 0x3bd4c40] Non-increasing DTS in stream 1: packet 4 with DTS 32860, packet 5 with DTS 32860
[mpegts @ 0x3bd4c40] pid=1e2 pes_code=0x1bd
[mpegts @ 0x3bd4c40] pid=1e1 pes_code=0x1e0
    Last message repeated 6 times
[mpegts @ 0x3bd4c40] pid=1e2 pes_code=0x1bd
[mpegts @ 0x3bd4c40] pid=1e1 pes_code=0x1e0
    Last message repeated 4 times
[mpegts @ 0x3bd4c40] PMT: len 70
[mpegts @ 0x3bd4c40] pid=1e1 pes_code=0x1e0
    Last message repeated 2 times
[mpegts @ 0x3bd4c40] pid=1e2 pes_code=0x1bd
[mpegts @ 0x3bd4c40] pid=1e1 pes_code=0x1e0
    Last message repeated 6 times
[mpegts @ 0x3bd4c40] pid=1e2 pes_code=0x1bd
[mpegts @ 0x3bd4c40] pid=1e1 pes_code=0x1e0
    Last message repeated 1 times
[mpegts @ 0x3bd4c40] PAT:
[mpegts @ 0x3bd4c40] pid=1e1 pes_code=0x1e0
[mpegts @ 0x3bd4c40] Probe buffer size limit of 5000000 bytes reached
[mpegts @ 0x3bd4c40] rfps: 60.000000 0.000184
    Last message repeated 1 times
[mpegts @ 0x3bd4c40] rfps: 120.000000 0.000736
    Last message repeated 1 times
[mpegts @ 0x3bd4c40] rfps: 240.000000 0.002944
    Last message repeated 1 times
[mpegts @ 0x3bd4c40] rfps: 59.940060 0.000000
    Last message repeated 1 times
[mpegts @ 0x3bd4c40] Skipping after seek
[mpegts @ 0x3bd4c40] pid=1e1 pes_code=0x1e0
[mpegts @ 0x3bd4c40] pid=1e2 pes_code=0x1bd
[mpegts @ 0x3bd4c40] pid=1e1 pes_code=0x1e0
    Last message repeated 1 times
[mpegts @ 0x3bd4c40] PES packet size mismatch
[mpegts @ 0x3bd4c40] 0: start_time: 0.018 duration: 0.943
[mpegts @ 0x3bd4c40] 1: start_time: 0.021 duration: 0.927
[mpegts @ 0x3bd4c40] stream: start_time: 0.195 duration: 10.477 bitrate=53994 kb/s
[mpegts @ 0x3bd4c40] After avformat_find_stream_info() pos: 0 bytes read:5853328 seeks:2 frames:67
Input #0, mpegts, from 'AC3.mpg':
  Duration: 00:00:10.48, start: 0.194844, bitrate: 53994 kb/s
  Program 1
    Stream #0:0[0x1e1], 48, 1/90000: Video: mpeg2video (Main), 1 reference frame ([2][0][0][0] / 0x0002), yuv420p(tv, left), 1280x720 (0x0) [SAR 1:1 DAR 16:9], 0/1, 59.94 fps, 59.94 tbr, 90k tbn
    Stream #0:1[0x1e2](eng), 19, 1/90000: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 384 kb/s
Successfully opened the file.
Parsing a group of options: output file -.
Applying option f (force format) with argument null.
Successfully parsed a group of options.
Opening an output file: -.
Successfully opened the file.
detected 32 logical cores
[graph 0 input from stream 0:0 @ 0x3c1bb20] Setting 'video_size' to value '1280x720'
[graph 0 input from stream 0:0 @ 0x3c1bb20] Setting 'pix_fmt' to value '0'
[graph 0 input from stream 0:0 @ 0x3c1bb20] Setting 'time_base' to value '1/90000'
[graph 0 input from stream 0:0 @ 0x3c1bb20] Setting 'pixel_aspect' to value '1/1'
[graph 0 input from stream 0:0 @ 0x3c1bb20] Setting 'sws_param' to value 'flags=2'
[graph 0 input from stream 0:0 @ 0x3c1bb20] Setting 'frame_rate' to value '60000/1001'
[graph 0 input from stream 0:0 @ 0x3c1bb20] w:1280 h:720 pixfmt:yuv420p tb:1/90000 fr:60000/1001 sar:1/1 sws_param:flags=2
[AVFilterGraph @ 0x3c18d20] query_formats: 3 queried, 2 merged, 0 already done, 0 delayed
[graph 1 input from stream 0:1 @ 0x3c1c9a0] Setting 'time_base' to value '1/48000'
[graph 1 input from stream 0:1 @ 0x3c1c9a0] Setting 'sample_rate' to value '48000'
[graph 1 input from stream 0:1 @ 0x3c1c9a0] Setting 'sample_fmt' to value 'fltp'
[graph 1 input from stream 0:1 @ 0x3c1c9a0] Setting 'channel_layout' to value '0x60f'
[graph 1 input from stream 0:1 @ 0x3c1c9a0] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:0x60f
[audio format for output stream 0:1 @ 0x3c1f640] Setting 'sample_fmts' to value 's16'
[audio format for output stream 0:1 @ 0x3c1f640] auto-inserting filter 'auto-inserted resampler 0' between the filter 'Parsed_anull_0' and the filter 'audio format for output stream 0:1'
[AVFilterGraph @ 0x3c1cae0] query_formats: 4 queried, 6 merged, 3 already done, 0 delayed
[auto-inserted resampler 0 @ 0x3c21a80] [SWR @ 0x3c21e60] Using fltp internally between filters
[auto-inserted resampler 0 @ 0x3c21a80] ch:6 chl:5.1(side) fmt:fltp r:48000Hz -> ch:6 chl:5.1(side) fmt:s16 r:48000Hz
[null @ 0x3bdbf20] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
    Last message repeated 1 times
Output #0, null, to 'pipe:':
  Metadata:
    encoder         : Lavf57.37.101
    Stream #0:0, 0, 1001/60000: Video: wrapped_avframe, 1 reference frame, yuv420p(left), 1280x720 (0x0) [SAR 1:1 DAR 16:9], 0/1, q=2-31, 200 kb/s, 59.94 fps, 59.94 tbn
    Metadata:
      encoder         : Lavc57.43.100 wrapped_avframe
    Stream #0:1(eng), 0, 1/48000: Audio: pcm_s16le, 48000 Hz, 5.1(side), s16, 4608 kb/s
    Metadata:
      encoder         : Lavc57.43.100 pcm_s16le
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
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[mpegts @ 0x3bd4c40] Skipping after seek
[mpegts @ 0x3bd4c40] PAT:
[mpegts @ 0x3bd4c40] sid=0x1 pid=0x1e0
[mpegts @ 0x3bd4c40] new_program: id=0x0001
[mpegts @ 0x3bd4c40] PMT: len 70
[mpegts @ 0x3bd4c40] sid=0x1 sec_num=0/0 version=31
[mpegts @ 0x3bd4c40] pcr_pid=0x1e1
[mpegts @ 0x3bd4c40] program tag: 0x0e len=3
[mpegts @ 0x3bd4c40] program tag: 0x10 len=6
[mpegts @ 0x3bd4c40] program tag: 0x0b len=2
[mpegts @ 0x3bd4c40] tag: 0x06 len=1
[mpegts @ 0x3bd4c40] tag: 0x05 len=4
[mpegts @ 0x3bd4c40] reg_desc=AC-3
[mpegts @ 0x3bd4c40] tag: 0x0a len=4
[mpegts @ 0x3bd4c40] tag: 0x81 len=10
[mpegts @ 0x3bd4c40] pid=1e1 pes_code=0x1e0
[mpegts @ 0x3bd4c40] PAT:
[mpegts @ 0x3bd4c40] pid=1e1 pes_code=0x1e0
    Last message repeated 1 times
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
    Last message repeated 1 times
[mpegts @ 0x3bd4c40] pid=1e1 pes_code=0x1e0
[mpeg2video @ 0x3bdb340] allocating dummy last picture for B frame
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[mpegts @ 0x3bd4c40] pid=1e1 pes_code=0x1e0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[mpegts @ 0x3bd4c40] pid=1e1 pes_code=0x1e0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[mpegts @ 0x3bd4c40] pid=1e1 pes_code=0x1e0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[mpegts @ 0x3bd4c40] pid=1e1 pes_code=0x1e0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[mpegts @ 0x3bd4c40] pid=1e1 pes_code=0x1e0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[mpegts @ 0x3bd4c40] pid=1e1 pes_code=0x1e0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[mpegts @ 0x3bd4c40] pid=1e2 pes_code=0x1bd
[mpegts @ 0x3bd4c40] pid=1e1 pes_code=0x1e0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[mpegts @ 0x3bd4c40] pid=1e1 pes_code=0x1e0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[mpegts @ 0x3bd4c40] PMT: len 70
[mpegts @ 0x3bd4c40] pid=1e1 pes_code=0x1e0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[mpegts @ 0x3bd4c40] pid=1e1 pes_code=0x1e0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[mpegts @ 0x3bd4c40] pid=1e1 pes_code=0x1e0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[mpegts @ 0x3bd4c40] pid=1e1 pes_code=0x1e0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[mpegts @ 0x3bd4c40] pid=1e1 pes_code=0x1e0
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
[ac3 @ 0x3bdb9a0] frame sync error
[AVIOContext @ 0x3bdd780] Statistics: 7852176 bytes read, 2 seeks
Conversion failed!

Attachments (1)

AC3_cut.mpg (2.4 MB) - added by cehoyos 2 years ago.

Change History (32)

comment:2 Changed 2 years ago by cehoyos

  • Component changed from ffmpeg to avcodec
  • Keywords ac3 mpegts added
  • Version changed from 3.0.2 to unspecified

How was the sample created?
The first audio frame looks incomplete (the first 288 bytes are missing iiuc).

Changed 2 years ago by cehoyos

comment:3 Changed 2 years ago by Mista_D

if use seek to skip broken frame, it still fails.

ffmpeg -i AC3.mpg -ss 1 -xerror -f null -
....
[ac3 @ 0000000002c57900] frame sync error
Conversion failed!

File is a capture of a live MPEG2-TS feed

comment:4 Changed 2 years ago by cehoyos

  • Description modified (diff)
  • Version changed from unspecified to git-master

Please remember to always test current FFmpeg git head before reporting an issue here.

comment:5 Changed 2 years ago by Mista_D

Tried with July 18th, 2016's ffmpeg version N-81045-g450cf40
same error

comment:6 Changed 10 days ago by richardpl

  • Resolution set to fixed
  • Status changed from new to closed

Missing complete file. I believe this bug have been fixed.

comment:7 Changed 10 days ago by cehoyos

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:8 Changed 10 days ago by richardpl

  • Resolution set to fixed
  • Status changed from reopened to closed

comment:9 Changed 10 days ago by cehoyos

  • Resolution fixed deleted
  • Status changed from closed to reopened

The output has not changed so there certainly was no fix.

$ ffmpeg -xerror -i AC3_cut.mpg -f null -
ffmpeg version N-92605-g3d8d8c7 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
[mpegts @ 0x2d4f600] PES packet size mismatch
Input #0, mpegts, from 'AC3_cut.mpg':
  Duration: 00:00:00.37, start: 0.194844, bitrate: 55798 kb/s
  Program 1
    Stream #0:0[0x1e1]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, progressive), 1280x720 [SAR 1:1 DAR 16:9], Closed Captions, 59.94 fps, 59.94 tbr, 90k tbn, 119.88 tbc
    Stream #0:1[0x1e2](eng): Audio: ac3 (AC-3 / 0x332D4341), 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 @ 0x2d599c0] frame sync error
Conversion failed!

comment:10 follow-up: Changed 10 days ago by richardpl

  • Resolution set to fixed
  • Status changed from reopened to closed

-xerror option is not supported here.

comment:11 in reply to: ↑ 10 Changed 10 days ago by cehoyos

  • Resolution fixed deleted
  • Status changed from closed to reopened

Replying to richardpl:

-xerror option is not supported here.

(Why?)

But that doesn't mean the issue was fixed, even more so when FFmpeg's behaviour hasn't changed with respect to this sample since the ticket was filed.

comment:12 follow-up: Changed 10 days ago by richardpl

  • Resolution set to fixed
  • Status changed from reopened to closed

What is supposed way to know that error have been fixed?
There is nothing to fix as error is from parser because input is missing sync, so it skip all bytes until it finds missing sync bytes. Everything points that first frame from file is trimmed.

comment:13 in reply to: ↑ 12 Changed 10 days ago by cehoyos

  • Resolution fixed deleted
  • Status changed from closed to reopened

Replying to richardpl:

What is supposed way to know that error have been fixed?

That something has changed regarding FFmpeg's behaviour decoding the given input file.

There is nothing to fix as error is from parser because input is missing sync, so it skip all bytes until it finds missing sync bytes. Everything points that first frame from file is trimmed.

Isn't that what I wrote above?

comment:14 Changed 10 days ago by richardpl

  • Resolution set to fixed
  • Status changed from reopened to closed

Not acceptable answer, try harder.

comment:15 Changed 10 days ago by cehoyos

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:16 Changed 10 days ago by richardpl

  • Resolution set to fixed
  • Status changed from reopened to closed

There is nothing to fix, removing log errors is bad idea.
Please stop act like 1 year old baby.

comment:17 Changed 10 days ago by cehoyos

  • Resolution fixed deleted
  • Status changed from closed to reopened

Please do not close tickets as fixed if FFmpeg's behaviour hasn't changed.

comment:18 Changed 9 days ago by richardpl

  • Resolution set to invalid
  • Status changed from reopened to closed

Closing as invalid then. First ac3 frame is trimmed, there is no way to fix that. Aborting on first such error will not improve decoding.

comment:19 Changed 9 days ago by Mista_D

The 4.1 still fails when attempt to seek past the broken frames

ffmpeg410 -i AC3.mpg -xerror -ss 1 -f null -
ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers

built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-11)
configuration: --prefix=/ffmpeg --enable-avfilter --enable-gpl --enable-libvpx --enable-libx264 --enable-libx265 --enable-libfdk-aac --disable-decoder=libgsm --disable-encoder=libgsm --disable-doc --disable-shared --disable-ffplay --pkg-config-flags=--static --extra-ldflags=-static --extra-libs='-lm -ldl -lpthread -lvpx -lx265 -lx264 -lfdk-aac -lvmaf' --enable-nonfree --enable-libvmaf --enable-version3
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100

[mpegts @ 0x3e48140] PES packet size mismatch
Input #0, mpegts, from 'AC3.mpg':

Duration: 00:00:10.48, start: 0.194844, bitrate: 53994 kb/s
Program 1

Stream #0:0[0x1e1]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, progressive), 1280x720 [SAR 1:1 DAR 16:9], Closed Captions, 59.94 fps, 59.94 tbr, 90k tbn, 119.88 tbc
Stream #0:1[0x1e2](eng): Audio: ac3 (AC-3 / 0x332D4341), 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 @ 0x3e50180] frame sync error
Conversion failed!

comment:20 Changed 9 days ago by richardpl

-xerror will abort when first error is encountered. There is no way that seeking will magically avoid error. Perhaps you need to use -ss 1 as input option instead, but still it can not guarantee that error should not happen, because it needs to give somehow frame with missing sync to be able to skip it.

comment:21 Changed 7 days ago by Mista_D

But it says "Conversion failed", while its only the the seeking in the first audio frame that failed. Probbaly at least the message needs to be corrected in this case when "-ss x" is used, no?

comment:22 follow-up: Changed 7 days ago by richardpl

Seeking did not failed, decoding did because first packet is trimmed. Use -ss 1 as input option to ignore error when using -xerror.

-ss after input will always seek by decoding, and that will fail because of trimmed packet.

Use:
ffmpeg -ss 1 -i AC3.mpg -xerror -v 99 -f null -

comment:23 in reply to: ↑ 22 Changed 7 days ago by cehoyos

Replying to richardpl:

Use:
ffmpeg -ss 1 -i AC3.mpg -xerror -v 99 -f null -

So the ticket is actually valid?

comment:24 follow-up: Changed 7 days ago by richardpl

Ticket is invalid. Why you think otherwise? Command works fine with long enough file.

comment:25 in reply to: ↑ 24 Changed 7 days ago by cehoyos

Replying to richardpl:

Ticket is invalid.

Why you think otherwise?

I thought you disagree after reading your last comment

Command works fine with long enough file.

No.

comment:26 Changed 7 days ago by richardpl

Please state facts to backup your claims.
I generated file and my command with seeking works fine.

comment:27 Changed 7 days ago by cehoyos

You could consider to try with the file from this report:
http://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket5710/

comment:28 follow-up: Changed 7 days ago by richardpl

Works fine with .ac3 file. It can not work directly because of reasons! Certainly not avcodec bug. It could be considered fault of mpg design. Still bug report is invalid.

comment:29 in reply to: ↑ 28 Changed 7 days ago by cehoyos

Replying to richardpl:

Works fine with .ac3 file.

When you wrote above ffmpeg -ss 1 -i AC3.mpg you meant an ac3 file?

comment:30 Changed 7 days ago by richardpl

Why you removed -xerror? Its whole point of this bug report.

comment:31 Changed 7 days ago by cehoyos

I didn't remove it, I just wondered that AC3.mpg is an ac3 file.

Note: See TracTickets for help on using tickets.