#11587 closed defect (fixed)

Problem decoding APV (Advanced Professional Video): "pbu_size too large"

Reported by: d.kozinski Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords:
Cc: MasterQuestionable Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: yes

Description (last modified by d.kozinski)

During the decoding of the APV stream, errors occur.

Summary of the bug:
How to reproduce:

% ffmpeg -i marketplace_1920x1080_400_10-10MB.apv  marketplace_1920x1080_400_10.yuv
ffmpeg version N-119465-g9980a0b9b1 Copyright (c) 2000-2025 the FFmpeg developers
built with gcc 12 (Ubuntu 12.3.0-1ubuntu1~22.04)

The input file marketplace_1920x1080_400_10-10MB.apv causing the issue has been uploaded via streams.videolan.org/upload/

Console output:

ffmpeg version N-119465-g9980a0b9b1 Copyright (c) 2000-2025 the FFmpeg developers
  built with gcc 12 (Ubuntu 12.3.0-1ubuntu1~22.04)
  configuration: --prefix=/home/d.kozinski/ffmpeg_build --extra-libs='-lpthread -lm' --bindir=/home/d.kozinski/ffmpeg_build/bin --enable-ffplay --enable-shared --disable-static --enable-liboapv --enable-gpl --enable-libx264 --enable-libx265 --disable-optimizations --disable-mmx --disable-stripping --extra-cflags=-Og --extra-cflags=-fno-omit-frame-pointer --enable-debug=3 --extra-cflags=-fno-inline
  libavutil      60.  2.100 / 60.  2.100
  libavcodec     62.  3.101 / 62.  3.101
  libavformat    62.  0.102 / 62.  0.102
  libavdevice    62.  0.100 / 62.  0.100
  libavfilter    11.  0.100 / 11.  0.100
  libswscale      9.  0.100 /  9.  0.100
  libswresample   6.  0.100 /  6.  0.100
Input #0, apv, from '/home/d.kozinski/Videos/marketplace_1920x1080_400_10-10MB.apv':
  Duration: N/A, bitrate: N/A
  Stream #0:0: Video: apv, gray10le(tv), 1920x1080 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 30 tbn
File '/home/d.kozinski/Videos/marketplace_1920x1080^C00_10.yuv' already exists. Overwrite? [y/N] y
Stream mapping:
  Stream #0:0 -> #0:0 (apv (native) -> rawvideo (native))
Press [q] to stop, [?] for help
[apv @ 0x6500a2d10ea0] Invalid PBU: pbu_size too large (602104 bytes).
[apv @ 0x6500a2d10ea0] Failed to parse access unit.
[apv @ 0x6500a2d23d90] Out-of-range zero-run value: 63 (at scan pos 7)
[apv @ 0x6500a2d23d90] Out-of-range zero-run value: 21 (at scan pos 60)
[apv @ 0x6500a2d24e90] Out-of-range zero-run value: 63 (at scan pos 7)
[apv @ 0x6500a2d25710] Out-of-range zero-run value: 63 (at scan pos 7)
Output #0, rawvideo, to '/home/d.kozinski/Videos/marketplace_1920x1080^C00_10.yuv':
  Metadata:
    encoder         : Lavf62.0.102
  Stream #0:0: Video: rawvideo (Y1[0][10] / 0xA003159), gray10le(tv, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 622080 kb/s, 30 fps, 30 tbn
    Metadata:
      encoder         : Lavc62.3.101 rawvideo
[apv @ 0x6500a2d23d90] Decode errors in 2 tile components.
[apv @ 0x6500a2d15720] Out-of-range zero-run value: 63 (at scan pos 7)
[apv @ 0x6500a2d15f40] Out-of-range zero-run value: 63 (at scan pos 21)
[apv @ 0x6500a2d16760] Invalid PBU: pbu_size too large (602104 bytes).
[apv @ 0x6500a2d16760] Failed to read packet.
[apv @ 0x6500a2d25710] Decode errors in 1 tile components.
[vist#0:0/apv @ 0x6500a2d11380] [dec:apv @ 0x6500a2d13140] Decoding error: Invalid data found when processing input
[apv @ 0x6500a2d24e90] Decode errors in 1 tile components.
[vist#0:0/apv @ 0x6500a2d11380] [dec:apv @ 0x6500a2d13140] Decoding error: Invalid data found when processing input
    Last message repeated 1 times
[apv @ 0x6500a2d15f40] Decode errors in 1 tile components.
[apv @ 0x6500a2d15720] Decode errors in 1 tile components.
[vist#0:0/apv @ 0x6500a2d11380] [dec:apv @ 0x6500a2d13140] Decoding error: Invalid data found when processing input
    Last message repeated 2 times
[out#0/rawvideo @ 0x6500a2d11510] video:52650KiB audio:0KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 0.000000%
frame=   13 fps=0.0 q=-0.0 Lsize=   52650KiB time=00:00:00.43 bitrate=995328.8kbits/s speed=2.76x elapsed=0:00:00.15

Attachments (1)

ffmpeg-20250513-132123.log (69.5 KB ) - added by d.kozinski 14 months ago.
FFREPORT

Download all attachments as: .zip

Change History (6)

by d.kozinski, 14 months ago

Attachment: ffmpeg-20250513-132123.log added

FFREPORT

comment:1 by d.kozinski, 14 months ago

The input file marketplace_1920x1080_400_10-10MB.apv needed to reproduce the issue has been uploaded via streams.videolan.org/upload/

comment:2 by d.kozinski, 14 months ago

Description: modified (diff)

comment:3 by MasterQuestionable, 14 months ago

Analyzed by developer: set
Cc: MasterQuestionable added
Keywords: cbs_apv added; APV decoder removed
Summary: Problem with decoding the APV streamProblem decoding APV (Advanced Professional Video): "pbu_size too large"

comment:4 by jkqxz, 14 months ago

Seems to have been fixed by a3c8fba5da690b703dcc72f608ab897fed74e044 (output is identical to the reference decoder). Unclear what was wrong with the previous version, though.

comment:5 by James, 14 months ago

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