After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 729364 - hlsdemux: hls from apple test files
hlsdemux: hls from apple test files
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.2.4
Other Linux
: Normal critical
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-05-01 22:48 UTC by m][sko
Modified: 2014-06-11 09:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tsdemux don't drop whole buffer if continuity counter don't match (800 bytes, patch)
2014-06-05 10:03 UTC, m][sko
rejected Details | Review

Description m][sko 2014-05-01 22:48:23 UTC
I combined some fragments from apple hls test site
to generate real adaptive scenario quality4 to quality3 to quality2......
from
http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8

like gear 4/3/4/3/4/3
http://live.mdragon.org/gearmix/prog_index.m3u8
and gear 4/2/4/2/4/2
http://live.mdragon.org/gearmix2/prog_index.m3u8

files use mpeg4 avc and mpeg4 aac

gstreamer 1.2.4 crash after 1. fragment

gstreamer master looks much better
but still not great some artifacts in video and gstreamer freeze for coupe seconds

ffplay handle this test files much better.


ubuntu 12.04
and
master from
https://launchpad.net/~ricotz/+archive/experimental/?field.series_filter=trusty
with git updates
Comment 1 Sebastian Dröge (slomo) 2014-05-02 07:38:23 UTC
This is fixed in GIT master and the fixes will all be in 1.3.1 and newer. Unfortunately they can't be easily backported as they required larger refactoring in many different places.
Comment 2 Sebastian Dröge (slomo) 2014-05-02 07:40:24 UTC
Ah you say you tried git master... as of yesterday night? Because it seems to work well here now except for libav complaining about a broken stream on bitrate switches. Which seems to be caused by the fragments not all starting on a keyframe.
Comment 3 Sebastian Dröge (slomo) 2014-05-02 07:50:10 UTC
Can you attach a backtrace of the crashes with 1.2.4 btw? Seems to not crash here for me, just does not work very optimal.
Comment 4 Sebastian Dröge (slomo) 2014-05-02 07:52:27 UTC
The problem with artifacts in http://live.mdragon.org/gearmix/prog_index.m3u8 is that it doesn't conform to the spec. Between the first and second fragment the TS stream is not continuous, and the playlist should have the X-DISCONT (?) marker because of that.
Comment 5 Sebastian Dröge (slomo) 2014-05-02 07:52:46 UTC
#EXT-X-DISCONTINUITY was the name
Comment 6 m][sko 2014-05-04 23:14:20 UTC
sorry
1.2.3 crash

but still
1.3.1 with libav from gst-libav
do not play apple test files
If I mix segments in one hls stream I see artifacts

And
If I put on my server only gear3 and gear4 quality 

#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=484444
gear3/prog_index.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=737777
gear4/prog_index.m3u8


player stop after 1 segment
but it still download segments from gear4

apache log
http://pastebin.com/5J07RWts

And in many times if server file is missing
hlsdemux loop forever and download files forever from start.
http://pastebin.com/V0R0hv2V
Comment 7 Thiago Sousa Santos 2014-05-05 14:44:59 UTC
commit b891bd04d50424410c43865f30150e3553f84b59
Author: Thiago Santos <ts.santos@sisa.samsung.com>
Date:   Mon May 5 11:13:09 2014 -0300

    hlsdemux: Only set the segment position if there is a timestamp
    
    Only the first buffer of a fragment has its timestamp set, so only
    update the segment.position when pushing those buffers to avoid
    having GST_CLOCK_TIME_NONE set to the position
    
    https://bugzilla.gnome.org/show_bug.cgi?id=729364


This solves the infinite loop getting a fragment that doesn't exist
Comment 8 Sebastian Dröge (slomo) 2014-05-26 07:29:53 UTC
So what's left here?
Comment 9 m][sko 2014-05-27 06:23:12 UTC
there are still distortion in video
GST_DEBUG="hlsdemux:5" gst-launch-1.0 playbin uri="http://live.mdragon.org/gearmix2/prog_index.m3u8"

fileSequence0.ts"
has different resolution then 
fileSequence1.ts"

fileSequence1.ts" really start with SPS and PPS
so no reason for video distortion

I use gstreamer 1.3.2 from
https://launchpad.net/~ricotz/+archive/experimental?field.series_filter=trusty
and gst-libav with static libav
Comment 10 m][sko 2014-05-27 06:26:24 UTC
It looks like something that feed codecparsers_h264 break data
http://pastebin.com/AnUtDHj7

As if I play files separatly there isn't any problems
Comment 11 Sebastian Dröge (slomo) 2014-05-27 07:01:04 UTC
That probably means that on DISCONT one of the elements used here drops more data than it would at the beginning of the stream... too much data.
Comment 12 m][sko 2014-05-29 17:05:39 UTC
infinite download of nonexistent fragments is still there

GST_DEBUG="hlsdemux:5" gst-launch-1.0 playbin uri="http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8"

gstreamer git branche from 20140529
1.3.2.1+git20140529.07919d87-0ubuntu1~14.04~ricotz0
https://launchpad.net/~ricotz/+archive/experimental?field.series_filter=trusty
Comment 13 m][sko 2014-06-05 10:03:23 UTC
Created attachment 277940 [details] [review]
tsdemux don't drop whole buffer if continuity counter don't match

This patch fix distortion that came if fragment quality change.

I can add property to force checking continuity counter.
What do you think?
for example libav do warning in their ts parser
Comment 14 m][sko 2014-06-05 10:04:20 UTC
tsdemux drop whole buffer if continuity counter don't match.

This patch fix distortion that came if fragment quality change.

I can add property to force checking continuity counter.
What do you think?
for example libav do warning in their ts parser
Comment 15 Sebastian Dröge (slomo) 2014-06-05 14:38:32 UTC
Hm, it should only drop the current incomplete MPEGTS packet there, not a complete buffer.
Comment 16 Jan Schmidt 2014-06-05 14:58:26 UTC
tsdemux should not complain about the continuity counter mismatching if there is a discont marked between the two fragments, as Sebastian suggested in comment #5

Have you added #EXT-X-DISCONTINUITY to your m3u8 file?
Comment 17 Edward Hervey 2014-06-06 13:34:54 UTC
Comment on attachment 277940 [details] [review]
tsdemux don't drop whole buffer if continuity counter don't match

No
Comment 18 m][sko 2014-06-11 08:42:05 UTC
close this bug