Discussion:
[issue2320] Assertion failed: s->chapters[i]->start <= s->chapters[i+1]->start, file libavformat/utils.c
(too old to reply)
Kazu Yoshi
2010-10-24 05:55:29 UTC
Permalink
New submission from Kazu Yoshi <***@gmail.com>:

Some mp4 files made assertion errors
Assertion failed: s->chapters[i]->start <= s->chapters[i+1]->start, file
libavformat/utils.c, line 2115

These mp4 were converted from mkv using same ffmpeg to be PS3 playable.
it seems ffmpeg could load only if mp4 has no chapter data.
WMP (with haali media splitter) and MPC-homecinema could play them.
ffmpeg -i Y:\01v3.mp4
FFmpeg version SVN-r25287, Copyright (c) 2000-2010 the FFmpeg developers
built on Oct 2 2010 02:10:58 with gcc 4.5.1
configuration: --enable-memalign-hack --enable-gpl --enable-version3
--enable-postproc --enable-libopencore-amrnb --enable-libopencore-amr
wb --enable-libgsm --enable-libmp3lame --enable-librtmp --enable-libvorbis
--enable-libtheora --enable-libxvid --enable-libvpx --enable-libx
264 --disable-ffserver --disable-ffplay --disable-ffprobe --enable-avisynth
--enable-small --enable-pthreads --extra-ldflags=-static --extra
-cflags='-mtune=pentium4 -mfpmath=sse -msse -fno-strict-aliasing'
libavutil 50.32. 0 / 50.32. 0
libavcore 0. 9. 0 / 0. 9. 0
libavcodec 52.92. 0 / 52.92. 0
libavformat 52.79. 0 / 52.79. 0
libavdevice 52. 2. 2 / 52. 2. 2
libavfilter 1.48. 0 / 1.48. 0
libswscale 0.12. 0 / 0.12. 0
libpostproc 51. 2. 0 / 51. 2. 0
Assertion failed: s->chapters[i]->start <= s->chapters[i+1]->start, file
libavformat/utils.c, line 2115

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.


Mediainfo shows correct chapter menu.
General
Format : MPEG-4
Format profile : Base Media
Codec ID : isom
File size : 345 MiB
Duration : 23mn 34s
Overall bit rate : 2 045 Kbps
Writing application : Lavf52.79.0

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : ***@L3.1
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Format settings, GOP : M=4, N=9
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 23mn 34s
Bit rate mode : Variable
Bit rate : 1 879 Kbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.085
Stream size : 317 MiB (92%)
Writing library : x264 core 98 r1649 20cbe10
Encoding settings : cabac=1 / ref=5 / deblock=1:0:0 /
analyse=0x3:0x133 / me=umh / subme=9 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 /
me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 /
fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / sliced_threads=0 / nr=0 /
decimate=1 / interlaced=0 / constrained_intra=0 / bframes=5 / b_pyramid=1 /
b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / weightp=2 / keyint=250 /
keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=2pass /
mbtree=1 / bitrate=1879 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 /
qpstep=50 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.20
Language : Japanese

Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 4
Format profile : LC
Format settings, SBR : No
Codec ID : 40
Duration : 23mn 34s
Bit rate mode : Variable
Bit rate : 160 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Stream size : 27.0 MiB (8%)

Menu
00:00:00.000 : Episode
00:01:50.000 : Opening
00:03:05.000 : Episode
00:21:50.000 : Ending
00:23:20.000 : Preview

----------
messages: 12348
priority: normal
status: new
substatus: new
title: Assertion failed: s->chapters[i]->start <= s->chapters[i+1]->start, file libavformat/utils.c
type: bug

________________________________________________
FFmpeg issue tracker <***@roundup.ffmpeg.org>
<https://roundup.ffmpeg.org/issue2320>
________________________________________________
Carl Eugen Hoyos
2010-10-24 11:06:23 UTC
Permalink
Carl Eugen Hoyos <***@rainbow.studorg.tuwien.ac.at> added the comment:

Please provide a link to a (short) sample.

----------
status: new -> open
substatus: new -> needs_more_info

________________________________________________
FFmpeg issue tracker <***@roundup.ffmpeg.org>
<https://roundup.ffmpeg.org/issue2320>
________________________________________________
Kazu Yoshi
2010-10-25 10:18:09 UTC
Permalink
Kazu Yoshi <***@gmail.com> added the comment:

Sorry, I couldnt make shorter sample (original was about 340MB). please mail to
causeless_at_gmail

I think i could find the point.
FFmpeg mixes any chapters from the input files and creates incoherent chapters.

The following output shows merging process to create unreadable mp4.
(MKV ==ffmpeg==> WAV ==neroaacenc==> AAC, then, MKV + AAC ==ffmpeg==> MP4)
Original MKV has 5 chapters but output MP4 has 6, and chap#0.5 was broken.


E:\box\My Dropbox\Project\encpy\bin\ffmpeg.exe -y -i "W:\\01v3.mkv" -i
"b:\\01v3.aac" -map 0 -map 1.0 -map_meta_data 0:1 -vcodec
copy -acodec copy "J:\\mp4\\01v3.mp4"
FFmpeg version SVN-r25287, Copyright (c) 2000-2010 the FFmpeg developers
built on Oct 2 2010 02:10:58 with gcc 4.5.1
configuration: --enable-memalign-hack --enable-gpl --enable-version3
--enable-postproc --enable-libopencore-amrnb --enable-libopencore-amr
wb --enable-libgsm --enable-libmp3lame --enable-librtmp --enable-libvorbis
--enable-libtheora --enable-libxvid --enable-libvpx --enable-libx
264 --disable-ffserver --disable-ffplay --disable-ffprobe --enable-avisynth
--enable-small --enable-pthreads --extra-ldflags=-static --extra
-cflags='-mtune=pentium4 -mfpmath=sse -msse -fno-strict-aliasing'
libavutil 50.32. 0 / 50.32. 0
libavcore 0. 9. 0 / 0. 9. 0
libavcodec 52.92. 0 / 52.92. 0
libavformat 52.79. 0 / 52.79. 0
libavdevice 52. 2. 2 / 52. 2. 2
libavfilter 1.48. 0 / 1.48. 0
libswscale 0.12. 0 / 0.12. 0
libpostproc 51. 2. 0 / 51. 2. 0
[matroska,webm @ 01c1d5b0] max_analyze_duration reached
[matroska,webm @ 01c1d5b0] Estimating duration from bitrate, this may be inaccurate
Input #0, matroska,webm, from 'W:\\bit\\01v3.mkv':
Duration: 00:23:34.96, start: 0.000000, bitrate: 192 kb/s
Chapter #0.0: start 0.000000, end 110.000000
Metadata:
title : Episode
Chapter #0.1: start 110.000000, end 185.000000
Metadata:
title : Opening
Chapter #0.2: start 185.000000, end 1310.000000
Metadata:
title : Episode
Chapter #0.3: start 1310.000000, end 1400.000000
Metadata:
title : Ending
Chapter #0.4: start 1400.000000, end 1415.000000
Metadata:
title : Preview
Stream #0.0(jpn): Video: h264, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 23.98
fps, 23.98 tbr, 1k tbn, 47.95 tbc
Stream #0.1(jpn): Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s
Stream #0.2(eng): Subtitle: [0][0][0][0] / 0x0000
Stream #0.3(eng): Subtitle: [0][0][0][0] / 0x0000
Stream #0.4: Attachment: [0][0][0][0] / 0x0000
Metadata:
filename : arial_0.ttf
Stream #0.5: Attachment: [0][0][0][0] / 0x0000
Metadata:
filename : CHINT.TTF
Stream #0.6: Attachment: [0][0][0][0] / 0x0000
Metadata:
filename : MiasScribblings~.ttf
Stream #0.7: Attachment: [0][0][0][0] / 0x0000
Metadata:
filename : arial.ttf
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'b:\\01v3.aac':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: M4A mp42isom
encoder : Nero AAC codec / 1.5.4.0
Duration: 00:23:34.95, start: 0.000000, bitrate: 161 kb/s
Chapter #1.0: start 0.054667, end 1414.954667
Metadata:
title :
Stream #1.0(und): Audio: aac, 48000 Hz, stereo, s16, 159 kb/s
Output #0, mp4, to 'J:\\mp4\\01v3.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: M4A mp42isom
encoder : Lavf52.79.0
Chapter #0.0: start 0.000000, end 110.000000
Metadata:
title : Episode
Chapter #0.1: start 110.000000, end 185.000000
Metadata:
title : Opening
Chapter #0.2: start 185.000000, end 1310.000000
Metadata:
title : Episode
Chapter #0.3: start 1310.000000, end 1400.000000
Metadata:
title : Ending
Chapter #0.4: start 1400.000000, end 1415.000000
Metadata:
title : Preview
Chapter #0.5: start 0.054667, end 1414.954667
Metadata:
title :
Stream #0.0(jpn): Video: libx264, yuv420p, 1280x720 [PAR 1:1 DAR 16:9],
q=2-31, 1k tbn, 1k tbc
Stream #0.1(und): Audio: aac, 48000 Hz, stereo, 159 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #1.0 -> #0.1
Press [q] to stop encoding
frame=33923 fps=1532 q=-1.0 Lsize= 353254kB time=1414.75 bitrate=2045.5kbits/s
video:324452kB audio:27631kB global headers:0kB muxing overhead 0.332551%

________________________________________________
FFmpeg issue tracker <***@roundup.ffmpeg.org>
<https://roundup.ffmpeg.org/issue2320>
________________________________________________
Carl Eugen Hoyos
2010-10-25 14:26:28 UTC
Permalink
Carl Eugen Hoyos <***@rainbow.studorg.tuwien.ac.at> added the comment:

I see two - possibly unrelated - problems: FFmpeg produces (possibly) invalid
files if two input files contain chapter information (this may be related to
issue 2068) and it asserts when reading such (invalid?) files.
10MB sample uploaded to samples/ffmpeg-bugs/roundup/issue2320.

DOS is important, imo.

----------
priority: normal -> important
substatus: needs_more_info -> reproduced

________________________________________________
FFmpeg issue tracker <***@roundup.ffmpeg.org>
<https://roundup.ffmpeg.org/issue2320>
________________________________________________
Anton Khirnov
2011-04-01 17:59:40 UTC
Permalink
Anton Khirnov <***@khirnov.net> added the comment:

fixed in ab11317c1f97db19eddebe1bc5d4cb5a53718c9f

----------
status: open -> closed
substatus: reproduced -> fixed

______________________________________________
Libav issue tracker <***@roundup.libav.org>
<https://roundup.libav.org/issue2320>
______________________________________________

Loading...