Opened 4 years ago

Last modified 3 years ago

#2429 new defect

matroska h264 building wrong index_entries list

Reported by: DonMoir Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords: mkv
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

With the sample from ticket #2424, it seems to be building the wrong index_entries list so when you seek it does not seek to a keyframe and long pause before video animation can begin again.

The file plays fine for me and just a seek problem. ffplay and ffmpeg have problems with playback (#2424) so did not test there.

Seems fine in WMP.

Here's part of the index_entries list it builds. Notice pos is same for many and pos jump at index 66

[0] {pos=540 timestamp=0 flags=1 ...}
[1] {pos=540 timestamp=42 flags=1 ...}
[2] {pos=540 timestamp=83 flags=1 ...}
[3] {pos=540 timestamp=125 flags=1 ...}
[4] {pos=540 timestamp=167 flags=1 ...}
[5] {pos=540 timestamp=208 flags=1 ...}
[6] {pos=540 timestamp=250 flags=1 ...}
[7] {pos=540 timestamp=292 flags=1 ...}
[8] {pos=540 timestamp=334 flags=1 ...}
[9] {pos=540 timestamp=375 flags=1 ...}
[10] {pos=540 timestamp=417 flags=1 ...}
[11] {pos=540 timestamp=459 flags=1 ...}
[12] {pos=540 timestamp=500 flags=1 ...}
[13] {pos=540 timestamp=542 flags=1 ...}
[14] {pos=540 timestamp=584 flags=1 ...}
[15] {pos=540 timestamp=626 flags=1 ...}
[16] {pos=540 timestamp=667 flags=1 ...}
[17] {pos=540 timestamp=709 flags=1 ...}
[18] {pos=540 timestamp=751 flags=1 ...}
[19] {pos=540 timestamp=792 flags=1 ...}
[20] {pos=540 timestamp=834 flags=1 ...}
[21] {pos=540 timestamp=876 flags=1 ...}
[22] {pos=540 timestamp=917 flags=1 ...}
[23] {pos=540 timestamp=959 flags=1 ...}
[24] {pos=540 timestamp=1001 flags=1 ...}
[25] {pos=540 timestamp=1043 flags=1 ...}
[26] {pos=540 timestamp=1084 flags=1 ...}
[27] {pos=540 timestamp=1126 flags=1 ...}
[28] {pos=540 timestamp=1168 flags=1 ...}
[29] {pos=540 timestamp=1209 flags=1 ...}
[30] {pos=540 timestamp=1251 flags=1 ...}
[31] {pos=540 timestamp=1293 flags=1 ...}
[32] {pos=540 timestamp=1335 flags=1 ...}
[33] {pos=540 timestamp=1376 flags=1 ...}
[34] {pos=540 timestamp=1418 flags=1 ...}
[35] {pos=540 timestamp=1460 flags=1 ...}
[36] {pos=540 timestamp=1501 flags=1 ...}
[37] {pos=540 timestamp=1543 flags=1 ...}
[38] {pos=540 timestamp=1585 flags=1 ...}
[39] {pos=540 timestamp=1627 flags=1 ...}
[40] {pos=540 timestamp=1668 flags=1 ...}
[41] {pos=540 timestamp=1710 flags=1 ...}
[42] {pos=540 timestamp=1752 flags=1 ...}
[43] {pos=540 timestamp=1793 flags=1 ...}
[44] {pos=540 timestamp=1835 flags=1 ...}
[45] {pos=540 timestamp=1877 flags=1 ...}
[46] {pos=540 timestamp=1918 flags=1 ...}
[47] {pos=540 timestamp=1960 flags=1 ...}
[48] {pos=540 timestamp=2002 flags=1 ...}
[49] {pos=540 timestamp=2044 flags=1 ...}
[50] {pos=540 timestamp=2085 flags=1 ...}
[51] {pos=540 timestamp=2127 flags=1 ...}
[52] {pos=540 timestamp=2169 flags=1 ...}
[53] {pos=540 timestamp=2210 flags=1 ...}
[54] {pos=540 timestamp=2252 flags=1 ...}
[55] {pos=540 timestamp=2294 flags=1 ...}
[56] {pos=540 timestamp=2336 flags=1 ...}
[57] {pos=540 timestamp=2377 flags=1 ...}
[58] {pos=540 timestamp=2419 flags=1 ...}
[59] {pos=540 timestamp=2461 flags=1 ...}
[60] {pos=540 timestamp=2502 flags=1 ...}
[61] {pos=540 timestamp=2544 flags=1 ...}
[62] {pos=540 timestamp=2586 flags=1 ...}
[63] {pos=540 timestamp=2628 flags=1 ...}
[64] {pos=540 timestamp=2669 flags=1 ...}
[65] {pos=540 timestamp=2711 flags=1 ...}
[66] {pos=1502710 timestamp=2753 flags=1 ...}
[67] {pos=540 timestamp=2794 flags=1 ...}
[68] {pos=1502710 timestamp=2836 flags=1 ...}
[69] {pos=1502710 timestamp=2878 flags=1 ...}
[70] {pos=1502710 timestamp=2919 flags=1 ...}
[71] {pos=1502710 timestamp=2961 flags=1 ...}

Change History (9)

comment:1 Changed 4 years ago by DonMoir

tested with N-51528-g83e2217

The above index_entries list is for the video stream.

Version 1, edited 4 years ago by DonMoir (previous) (next) (diff)

comment:2 Changed 4 years ago by cehoyos

To make this a valid ticket, please provide the failing command line (that is the ffmpeg command line that does not produce the desired output file) together with the complete, uncut console output.

comment:3 follow-up: Changed 4 years ago by DonMoir

Here's log from ffplay. Hard to tell whats happening because play back is screwed up but it states that file is broken and keyframes not correctly marked. I was about to go with that but it plays and seeks ok in WMP.

ffplay version N-51511-g599866f Copyright (c) 2003-2013 the FFmpeg developers

built on Apr 1 2013 12:47:17 with gcc 4.8.0 (GCC)
configuration: --disable-static --enable-shared --enable-gpl --enable-version3

--disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --ena

ble-frei0r --enable-gnutls --enable-libass --enable-libbluray --enable-libcaca -
-enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmp3lame --enabl
e-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-lib
opus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspee
x --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-am
rwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --en
able-libxvid --enable-zlib

libavutil 52. 24.100 / 52. 24.100
libavcodec 55. 2.100 / 55. 2.100
libavformat 55. 1.100 / 55. 1.100
libavdevice 55. 0.100 / 55. 0.100
libavfilter 3. 48.105 / 3. 48.105
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100

Input #0, matroska,webm, from 'D:\FlashFiles?\Movies\aspect_bug.mkv':

Duration: 00:01:00.06, start: 0.000000, bitrate: 4395 kb/s

Stream #0:0(eng): Video: h264 (High), yuv420p, 1280x536 [SAR 1:1 DAR 160:67]

, SAR 67:3 DAR 160:3, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)

Stream #0:1(ger): Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 768 kb/s
Metadata:

title : DTS

Stream #0:2(ger): Subtitle: subrip
Metadata:

title : Forced

[matroska,webm @ 00b455a0] File is broken, keyframes not correctly marked!

[h264 @ 00b4aa60] reference picture missing during reorderB f=0/0

Last message repeated 4 times

[h264 @ 00b4aa60] Missing reference picture, default is 0
[h264 @ 00b4aa60] decode_slice_header error
[h264 @ 01713020] mmco: unref short failure
[h264 @ 01713020] Missing reference picture, default is 65542

Last message repeated 2 times

[h264 @ 01713400] mmco: unref short failure

12.74 A-V: nanL afsd= 42 aq=t mes sa211ge r5KeB vq=p12146eatKB sq= e

d 1 times
[h264 @ 00b4aa60] Missing reference picture, default is 65538
[h264 @ 01713020] reference picture missing during reorder

Last message repeated 1 times

[h264 @ 01713020] Missing reference picture, default is 65538

Last message repeated 1 times

[h264 @ 01713400] Missing reference picture, default is 65542

12.76 A-V[h264 @ 00b4aa60] : mmco: unref short failure

Last message repeated 1 times096KB vq=13294KB sq= 0B f=0/0 B

[matroska,webm @ 00b455a0] File is broken, keyframes not correctly marked!
[h264 @ 00b4aa60] reference picture missing during reorder

Last message repeated 4 times

[h264 @ 00b4aa60] Missing reference picture, default is 0
[h264 @ 00b4aa60] decode_slice_header error
[h264 @ 01713020] mmco: unref short failure
[h264 @ 01713020] reference picture missing during reorder

Last message repeated 2 times

[h264 @ 01713020] Missing reference picture, default is 65516
24.27 A - V L:a s t mneans sfage repeated 2 times
d=[h264 @ 01713400] 48 aq=mmco: unref short failure

444KB vq= 1667KB sq= [h264 @ 01713400] Missing reference picture, default i

s 65516
[h264 @ 00b4aa60] reference picture missing during reorder

Last message repeated 1 times

[h264 @ 00b4aa60] Missing reference picture, default is 65520
ast message repeated 1 timestimes
[h264 @ 01713020] mmco: unref short failure
[h264 @ 01713400] reference picture missing during reorderB f=0/0
[h264 @ 01713400] Missing reference picture, default is 65524
[h264 @ 00b4aa60] mmco: unref short failure
[matroska,webm @ 00b455a0] File is broken, keyframes not correctly marked!
[h264 @ 00b4aa60] reference picture missing during reorderB f=0/0

Last message repeated 4 times

[h264 @ 00b4aa60] Missing reference picture, default is 0
[h264 @ 00b4aa60] decode_slice_header error
[h264 @ 01713020] mmco: unref short failure

Last message repeated 1 times

[h264 @ 01713020] Missing reference picture, default is 65534

Last message repeated 2 times

[h264 @ 01713400] mmco: unref short failure

Last message repeated 1 times

[h264 @ 00b4aa60] Missing reference picture, default is 65530

35.92 A-V[h264 @ 01713020] reference picture missing during reorder

Lasaq=t 1m8e3s6sKaBg ev qr=ep e5ate7d2 6K1B tsiqm=e s

0[h264 @ 01713020] B fMissing reference picture, default is 65530

t message repeated 1 times1 times
[h264 @ 01713400] Missing reference picture, default is 65534
[h264 @ 00b4aa60] mmco: unref short failure

Last message repeated 1 times233KB vq= 6064KB sq= 0B f=0/0

[matroska,webm @ 00b455a0] File is broken, keyframes not correctly marked!
[h264 @ 00b4aa60] reference picture missing during reorderB f=0/0

Last message repeated 5 times

[h264 @ 00b4aa60] Missing reference picture, default is 0
[h264 @ 00b4aa60] decode_slice_header error
[h264 @ 01713020] mmco: unref short failure

Last message repeated 1 times

[h264 @ 01713020] reference picture missing during reorder

Last message repeated 3 times

[h264 @ 01713020] Missing reference picture, default is 65550

Last message repeated 3 times

[h264 @ 01713400] reference picture missing during reorder

Last message repeated 2 times

[h264 @ 01713400] Missing reference picture, default is 65552

48.30 A-V L:a s t mneasns afged= r6e2 apqe=a t1e1d9 32K Bt ivmqes=

3[h264 @ 00b4aa60] 071reference picture missing during reorder

Last message repeated 1 times a

[h264 @ 00b4aa60] Missing reference picture, default is 65554

Last message repeated 1 times

[h264 @ 01713020] reference picture missing during reorder
[h264 @ 01713020] Missing reference picture, default is 65556
[h264 @ 00b4aa60] reference picture missing during reorderB f=0/0

Last message repeated 5 times

[h264 @ 00b4aa60] Missing reference picture, default is 0
[h264 @ 00b4aa60] decode_slice_header error
[h264 @ 01713020] mmco: unref short failure

nan A-V: nan fd= 67 aq= 0KB vq= 0KB sq= 0B f=0/0

comment:4 Changed 4 years ago by DonMoir

Looks like just ffplay and ffmpeg have the bad playback display. It plays fine in my own app and it does seek but its just way off and takes time before the video will begin to animate again. Probably due to bad keyframe index.

Real Player also played and seeked correctly but they both using ffdshow.

Last edited 4 years ago by DonMoir (previous) (diff)

comment:5 in reply to: ↑ 3 Changed 4 years ago by cehoyos

  • Keywords mkv added

Replying to DonMoir:

Here's log from ffplay.

Do I understand correctly that this is a ffplay issue, ie it works fine with ffmpeg?

comment:6 Changed 4 years ago by DonMoir

Not just an ffplay issue or ffmpeg.exe issue. The index is broke and not sure how WMP gets the seek right unless its a coding issue in ffmpeg code.

I test normally with my own code and could see the index_entries there. Since it looks like a messed up index list, i expect the seek to be off but don't know if its an ffmpeg coding problem or what.

When I seek in my own code, it seeks to something and then a long pause before it will animate again as it corrects itself.

comment:7 Changed 3 years ago by DonMoir

appears to be fixed

comment:8 Changed 3 years ago by cehoyos

Which commit fixed it?

comment:9 Changed 3 years ago by DonMoir

Never mind, I have another similar but different issue with h264 and need to check into that. This issue looks unchanged but maybe can come up with something related to it when looking into new issue. So just disregard comment 7.

Note: See TracTickets for help on using tickets.