Opened 11 years ago
Closed 11 years ago
#3787 closed defect (fixed)
h264 parser only accepts extradata before the first frame
Reported by: | Benjamin Peterson | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avcodec |
Version: | unspecified | Keywords: | h264 |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
Summary of the bug:
The H264 parser only accepts extradata before the first frame. If further extradata occurs, the parser fails to find the frame, since it tries to interpret the begining of the extradata as the nal size. Interestingly, the full ffmpeg H264 decoder accepts properly extradata before every frame. Thus, the problem only happens when using a container that requires the use of the H264 parser. In particular, this bug prevents good transcoding of H.264 videos with extra extradata when the format is FLV.
Attachments (1)
Change History (4)
comment:2 by , 11 years ago
Consider the file I just attached. Asking ffmpeg to read this file gives:
[flv @ 0x63ff90] Stream discovered after head already parsed [h264 @ 0x6409e0] AVC: nal size 21839903 [h264 @ 0x6409e0] missing picture in access unit with size 37 Input #0, flv, from '/home/benjamin/Downloads/example.flv': Duration: 00:00:09.92, start: 0.000000, bitrate: 739 kb/s Stream #0:0: Video: h264 (Main), yuv420p, 720x400, 25 fps, 25 tbr, 1k tbn, 50 tbc Stream #0:1: Audio: aac, 44100 Hz, stereo, fltp Stream #0:2: Data: none
As I said in the opening comment, the invalid NAL size warning is because the h264 parser is trying to interpret extradata as a NAL unit.
comment:3 by , 11 years ago
Reproduced by developer: | set |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Unfortunately, this has currently no similarities with a valid ticket.
Is the problem you see reproducible with
ffmpeg
(the application)? If yes, please provide the failing command line (that does not produce the intended output file) together with the complete, uncut console output and point us to a sample.If the problem is not reproducible with
ffmpeg
, please explain how we can reproduce the issue.