[Bug 764637] qtdemux: Ensure stream duration by using stts box

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Apr 5 12:57:19 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=764637

--- Comment #3 from Seungha Yang <sh.yang at lge.com> ---
(In reply to Seungha Yang from comment #2)
> I found a corrupted mp4 file. The only incorrect factor is stream duration
> in mdhd. Although the file muxing is incorrect, we can support it by
> calculating the actual stream duration.
> 
> - NG case
>  57 0:00:00.084347775  5006 0x7f12780f9de0 DEBUG                qtdemux
> qtdemux.c:8425:qtdemux_parse_segments:<qtdemux0> created dummy segment
> 0:04:33.052583333
>  58 0:00:00.084356373  5006 0x7f12780f9de0 DEBUG                qtdemux
> qtdemux.c:8429:qtdemux_parse_segments:<qtdemux0> using 1 segments
>  59 0:00:00.084360621  5006 0x7f12780f9de0 DEBUG                qtdemux
> qtdemux.c:10601:qtdemux_parse_trak:<qtdemux0> n_streams is now 2
>  60 0:00:00.084365309  5006 0x7f12780f9de0 DEBUG                qtdemux
> qtdemux.c:11842:qtdemux_parse_udta:<qtdemux0> No XMP_ node found
>  61 0:00:00.084390758  5006 0x7f12780f9de0 DEBUG                qtdemux
> qtdemux.c:10772:qtdemux_prepare_streams:<qtdemux0> prepare streams
>  62 0:00:00.084395791  5006 0x7f12780f9de0 DEBUG                qtdemux
> qtdemux.c:10779:qtdemux_prepare_streams:<qtdemux0> stream 0, id 1, fourcc
> avc1
>  63 0:00:00.084401392  5006 0x7f12780f9de0 DEBUG                qtdemux
> qtdemux.c:7875:qtdemux_parse_samples:<qtdemux0> parsing up to sample 0
>  64 0:00:00.084406308  5006 0x7f12780f9de0 DEBUG                qtdemux
> qtdemux.c:8082:qtdemux_parse_samples:<qtdemux0> sample 0: index 0, timestamp
> 0:00:00.000000000
>  65 0:00:00.084411698  5006 0x7f12780f9de0 DEBUG                qtdemux
> qtdemux.c:8137:qtdemux_parse_samples:<qtdemux0> samples at 0 is keyframe
>  66 0:00:00.084415646  5006 0x7f12780f9de0 DEBUG                qtdemux
> qtdemux.c:10779:qtdemux_prepare_streams:<qtdemux0> stream 1, id 2, fourcc
> mp4a
>  67 0:00:00.084420335  5006 0x7f12780f9de0 DEBUG                qtdemux
> qtdemux.c:7875:qtdemux_parse_samples:<qtdemux0> parsing up to sample 0
>  68 0:00:00.084424276  5006 0x7f12780f9de0 DEBUG                qtdemux
> qtdemux.c:8082:qtdemux_parse_samples:<qtdemux0> sample 0: index 0, timestamp
> 0:00:00.000000000
>  69 0:00:00.084429254  5006 0x7f12780f9de0 DEBUG                qtdemux
> qtdemux.c:8125:qtdemux_parse_samples:<qtdemux0> all samples are keyframes
>  70 0:00:00.084432692  5006 0x7f12780f9de0 DEBUG                qtdemux
> qtdemux.c:10831:qtdemux_expose_streams:<qtdemux0> exposing streams
>  71 0:00:00.084436121  5006 0x7f12780f9de0 DEBUG                qtdemux
> qtdemux.c:10839:qtdemux_expose_streams:<qtdemux0> stream 0, id 1, fourcc avc1
>  72 0:00:00.084462814  5006 0x7f12780f9de0 DEBUG                qtdemux
> qtdemux.c:7234:gst_qtdemux_configure_stream:<qtdemux0> Calculating
> framerate, timescale 29970 gave fps_n 10000 fps_d 129
> 
> - With this patch
>  57 0:00:00.031100131  3575 0x7f95a81171e0 DEBUG                qtdemux
> qtdemux.c:8449:qtdemux_parse_segments:<qtdemux0> created dummy segment
> 0:04:33.052583333
>  58 0:00:00.031108243  3575 0x7f95a81171e0 DEBUG                qtdemux
> qtdemux.c:8453:qtdemux_parse_segments:<qtdemux0> using 1 segments
>  59 0:00:00.031112396  3575 0x7f95a81171e0 DEBUG                qtdemux
> qtdemux.c:10625:qtdemux_parse_trak:<qtdemux0> n_streams is now 2
>  60 0:00:00.031117170  3575 0x7f95a81171e0 DEBUG                qtdemux
> qtdemux.c:11866:qtdemux_parse_udta:<qtdemux0> No XMP_ node found
>  61 0:00:00.031156892  3575 0x7f95a81171e0 DEBUG                qtdemux
> qtdemux.c:10796:qtdemux_prepare_streams:<qtdemux0> prepare streams
>  62 0:00:00.031161630  3575 0x7f95a81171e0 DEBUG                qtdemux
> qtdemux.c:10803:qtdemux_prepare_streams:<qtdemux0> stream 0, id 1, fourcc
> avc1
>  63 0:00:00.031167805  3575 0x7f95a81171e0 DEBUG                qtdemux
> qtdemux.c:7899:qtdemux_parse_samples:<qtdemux0> parsing up to sample 0
>  64 0:00:00.031172732  3575 0x7f95a81171e0 DEBUG                qtdemux
> qtdemux.c:8106:qtdemux_parse_samples:<qtdemux0> sample 0: index 0, timestamp
> 0:00:00.000000000
>  65 0:00:00.031188804  3575 0x7f95a81171e0 DEBUG                qtdemux
> qtdemux.c:8161:qtdemux_parse_samples:<qtdemux0> samples at 0 is keyframe
>  66 0:00:00.031192742  3575 0x7f95a81171e0 DEBUG                qtdemux
> qtdemux.c:10803:qtdemux_prepare_streams:<qtdemux0> stream 1, id 2, fourcc
> mp4a
>  67 0:00:00.031197304  3575 0x7f95a81171e0 DEBUG                qtdemux
> qtdemux.c:7899:qtdemux_parse_samples:<qtdemux0> parsing up to sample 0
>  68 0:00:00.031201216  3575 0x7f95a81171e0 DEBUG                qtdemux
> qtdemux.c:8106:qtdemux_parse_samples:<qtdemux0> sample 0: index 0, timestamp
> 0:00:00.000000000
>  69 0:00:00.031209135  3575 0x7f95a81171e0 DEBUG                qtdemux
> qtdemux.c:8149:qtdemux_parse_samples:<qtdemux0> all samples are keyframes
>  70 0:00:00.031212720  3575 0x7f95a81171e0 DEBUG                qtdemux
> qtdemux.c:10855:qtdemux_expose_streams:<qtdemux0> exposing streams
>  71 0:00:00.031216188  3575 0x7f95a81171e0 DEBUG                qtdemux
> qtdemux.c:10863:qtdemux_expose_streams:<qtdemux0> stream 0, id 1, fourcc avc1
>  72 0:00:00.031240344  3575 0x7f95a81171e0 DEBUG                qtdemux
> qtdemux.c:2850:check_update_duration:<qtdemux0> Updating total duration to
> 0:11:42.602602602 was 0:11:42.549312500
>  73 0:00:00.031249534  3575 0x7f95a81171e0 DEBUG                qtdemux
> qtdemux.c:2855:check_update_duration:<qtdemux0> qtdemux->segment.duration:
> 0:11:42.549312500 .stop: 0:11:42.549312500
>  74 0:00:00.031254995  3575 0x7f95a81171e0 DEBUG                qtdemux
> qtdemux.c:2862:check_update_duration:<qtdemux0> Updated segment.duration and
> segment.stop
>  75 0:00:00.031258571  3575 0x7f95a81171e0 DEBUG                qtdemux
> qtdemux.c:2874:check_update_duration:<qtdemux0> Updating stream #0 duration
> to 0:11:42.602602602
>  76 0:00:00.031263416  3575 0x7f95a81171e0 DEBUG                qtdemux
> qtdemux.c:2874:check_update_duration:<qtdemux0> Updating stream #1 duration
> to 0:11:42.602602602
>  77 0:00:00.031271809  3575 0x7f95a81171e0 DEBUG                qtdemux
> qtdemux.c:7240:gst_qtdemux_configure_stream:<qtdemux0> Calculating
> framerate, timescale 29970 gave fps_n 30000 fps_d 1001

Actual duration is about 11:42 (mvhd has correct value), but mdhd both video
and audio have incorrect value (04:33)

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list