Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#3260 closed defect (fixed)

H.264 Reinit context problem

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

Description

Because context reinit..
Some frame drop...

$ ffmpeg -i trimmed1.mp4 123.avi
ffmpeg version 2.1.git Copyright (c) 2000-2013 the FFmpeg developers

built on Dec 31 2013 16:11:44 with gcc 4.8.2 (i686-w64-mingw32 - XvidVideo?.RU)

configuration:
libavutil 52. 59.100 / 52. 59.100
libavcodec 55. 47.100 / 55. 47.100
libavformat 55. 22.101 / 55. 22.101
libavdevice 55. 5.102 / 55. 5.102
libavfilter 4. 0.103 / 4. 0.103
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'trimmed1.mp4':

Metadata:

major_brand : mp42
minor_version : 0
compatible_brands: mp42isom

Duration: 00:00:01.90, start: 0.000000, bitrate: 16696 kb/s

Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709)

, 1920x1080 [SAR 1:1 DAR 16:9], 24705 kb/s, 52.93 fps, 59.94 tbr, 90k tbn, 59.94

tbc (default)

Output #0, avi, to '123.avi':

Metadata:

major_brand : mp42
minor_version : 0
compatible_brands: mp42isom
ISFT : Lavf55.22.101
Stream #0:0(eng): Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 1920x1080 [SAR

1:1 DAR 16:9], q=2-31, 200 kb/s, 29.97 tbn, 29.97 tbc (default)
Stream mapping:

Stream #0:0 -> #0:0 (h264 -> mpeg4)

Press [q] to stop, ? for help
[h264 @ 03216440] Reinit context to 1920x1088, pix_fmt: yuvj420p
[h264 @ 03216440] Missing reference picture, default is 0
[h264 @ 03216440] decode_slice_header error
[h264 @ 03217000] Missing reference picture, default is 0
[h264 @ 03216820] mmco: unref short failure
Input stream #0:0 frame changed from size:1920x1080 fmt:yuv420p to size:1920x108
0 fmt:yuvj420p
[swscaler @ 03383020] deprecated pixel format used, make sure you did set range
correctly
frame= 27 fps=0.0 q=31.0 size= 1465kB time=-577014:-32:-22.-77 bitrate=N/A
frame= 27 fps=0.0 q=31.0 Lsize= 1466kB time=00:00:01.90 bitrate=6314.8kbits
/s
video:1459kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.477737%

Change History (4)

comment:1 Changed 6 years ago by kyh96403

Test file can down from "http://url.cn/WMEeVP"

comment:2 Changed 6 years ago by cehoyos

  • Keywords regression added
  • Priority changed from normal to important
  • Reproduced by developer set
  • Status changed from new to open

Regression since 11c99c78

comment:3 Changed 6 years ago by domingo

Original MP4 video track contains 3 pairs of [SPS][PPS] NAL units causing H264 reinit.
Pair 1 is duplicate, but pairs 2 and 3 are different from what is put into MP4 META information (avcC box).
In general, MP4 track should not contain SPS nor PPS units.
Is there any way to ignore them while decoding MP4 video tracks?

comment:4 Changed 6 years ago by michael

  • Resolution set to fixed
  • Status changed from open to closed
Last edited 6 years ago by michael (previous) (diff)
Note: See TracTickets for help on using tickets.