Opened 3 months ago

Last modified 3 months ago

#7365 new defect

H.264 decoding regression skipping first NAL

Reported by: cehoyos Owned by:
Priority: important Component: avcodec
Version: git-master Keywords: h264 regression
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

https://github.com/HandBrake/HandBrake/issues/1325
A handbrake user encoded a h264 file that cannot be decoded correctly with current FFmpeg, the first 9 seconds are skipped.

$ ffmpeg -i Pch\ Veronika\ Trailer\ fullhd.mp4
ffmpeg version N-91626-gf631c32 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 6.4.0 (GCC)
  configuration: --enable-gpl
  libavutil      56. 19.100 / 56. 19.100
  libavcodec     58. 23.100 / 58. 23.100
  libavformat    58. 17.101 / 58. 17.101
  libavdevice    58.  4.101 / 58.  4.101
  libavfilter     7. 26.100 /  7. 26.100
  libswscale      5.  2.100 /  5.  2.100
  libswresample   3.  2.100 /  3.  2.100
  libpostproc    55.  2.100 / 55.  2.100
[h264 @ 0x3599700] Invalid NAL unit 0, skipping.
[h264 @ 0x3599700] Invalid NAL unit size (1573357722 > 55537).
[h264 @ 0x3599700] Error splitting the input into NAL units.
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Pch Veronika Trailer fullhd.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    creation_time   : 2018-08-17T19:57:30.000000Z
    encoder         : HandBrake 20180816222603-4b7a960-master 2018081701
  Duration: 00:00:11.14, start: 0.000000, bitrate: 6741 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 6413 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc (default)
    Metadata:
      creation_time   : 2018-08-17T19:57:30.000000Z
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 167 kb/s (default)
    Metadata:
      creation_time   : 2018-08-17T19:57:30.000000Z
      handler_name    : Stereo
    Stream #0:2(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 160 kb/s
    Metadata:
      creation_time   : 2018-08-17T19:57:30.000000Z
      handler_name    : Stereo
At least one output file must be specified

Change History (3)

comment:3 Changed 3 months ago by mkver

This file is defective: It contains an avcC just as it should; but the samples are actually in annex B format (with four byte startcodes 0x00 00 00 01).

Note: See TracTickets for help on using tickets.