I am trying to download MPEG transport stream audio-only with AAC(adtc) from Java. But when I start reading the stream it ends after 106 KB. This also happens if i paste the URL in a browser, why is that? VLC plays it fine.
I have attached what gets downloaded when loading this Danish radio station
http://drradio2-lh.akamaihd.net/i/p2_9@143504/index_64_a-p.m3u8?sd=10&rebase=on
It seems like it contains a lot of segments, but it would be very cumbersome to stream them one by one.
Wow this apparently how VLC reads it, this it from the VLC log :
adaptive debug: Updated playlist ID http://drradio1-lh.akamaihd.net/i/p1_9@143503/index_256_a-p.m3u8?sd=10&rebase=on, next update in 19s
adaptive debug: Representation http://drradio1-lh.akamaihd.net/i/p1_9@143503/index_256_a-p.m3u8?sd=10&rebase=on
adaptive debug: Segment #153134095 url=http://drradio1-lh.akamaihd.net/i/p1_9@143503/segment153134094_256_a-p.ts?sd=10&rebase=on stime 197000 duration 1000
adaptive debug: Segment #153134096 url=http://drradio1-lh.akamaihd.net/i/p1_9@143503/segment153134095_256_a-p.ts?sd=10&rebase=on stime 198000 duration 1000
adaptive debug: Segment #153134097 url=http://drradio1-lh.akamaihd.net/i/p1_9@143503/segment153134096_256_a-p.ts?sd=10&rebase=on stime 199000 duration 1000
adaptive debug: Segment #153134098 url=http://drradio1-lh.akamaihd.net/i/p1_9@143503/segment153134097_256_a-p.ts?sd=10&rebase=on stime 200000 duration 1000
adaptive debug: Retrieving http://drradio1-lh.akamaihd.net:80/i/p1_9@143503/segment153134095_256_a-p.ts?sd=10&rebase=on @0
adaptive debug: Retrieving http://drradio1-lh.akamaihd.net:80/i/p1_9@143503/segment153134096_256_a-p.ts?sd=10&rebase=on @0
adaptive debug: Retrieving http://drradio1-lh.akamaihd.net:80/i/p1_9@143503/index_256_a-p.m3u8?sd=10&rebase=on @0
adaptive debug: Updated playlist ID http://drradio1-lh.akamaihd.net/i/p1_9@143503/index_256_a-p.m3u8?sd=10&rebase=on, next update in 19s
adaptive debug: Representation http://drradio1-lh.akamaihd.net/i/p1_9@143503/index_256_a-p.m3u8?sd=10&rebase=on
adaptive debug: Segment #153134097 url=http://drradio1-lh.akamaihd.net/i/p1_9@143503/segment153134096_256_a-p.ts?sd=10&rebase=on stime 199000 duration 1000
adaptive debug: Segment #153134098 url=http://drradio1-lh.akamaihd.net/i/p1_9@143503/segment153134097_256_a-p.ts?sd=10&rebase=on stime 200000 duration 1000
adaptive debug: Segment #153134099 url=http://drradio1-lh.akamaihd.net/i/p1_9@143503/segment153134098_256_a-p.ts?sd=10&rebase=on stime 201000 duration 1000
adaptive debug: Segment #153134100 url=http://drradio1-lh.akamaihd.net/i/p1_9@143503/segment153134099_256_a-p.ts?sd=10&rebase=on stime 202000 duration 1000
It loads the m3u8 file and then load each segments one by one. When the end is reached it reload the m3u8 file again.
What protocol is this? I guess this has nothing to do with the MPEG transport stream protocol?
https://en.wikipedia.org/wiki/HTTP_Live_Streaming
whenever you see .m3u8, it's HLS — the link above, that is.
> It seems like it contains a lot of segments, but it would be very cumbersome to stream them one by one.
IIRC, you can just concatenate them and put straight into a decoder.
Thanks HLS it is.