Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HLS: Support audio only HLS stream. #45

Open
winlinvip opened this issue Jan 10, 2016 · 0 comments
Open

HLS: Support audio only HLS stream. #45

winlinvip opened this issue Jan 10, 2016 · 0 comments
Labels

Comments

@winlinvip
Copy link
Member

About the audio only HLS, need to use aac, not ts; the timestamp need to recalculate.

Hello Winlin,

> Hi, I am the author of SRS(Simple RTMP Server) which delivery RTMP/HLS/HTTP-FLV and other features. I have rewrite the HLS which remuxing from RTMP according to the Apple HLS standard, it works very well.
> 
> I got another question about HLS: when I remux the rtmp stream without video, that is the pure audio stream to HLS, seems the audio exists some noise. The audio codec is mp3 or aac. Is there any example or specification about pure audio HLS stream?

I assume that by "pure audio stream" you mean an MPEG elementary audio stream? (As opposed to an audio-only MPEG-2 Transport Stream.) Here are a couple of simple examples from https://developer.apple.com/streaming/examples/ :

https://devimages.apple.com.edgekey.net/streaming/examples/bipbop_16x9/gear0/prog_index.m3u8

https://devimages.apple.com.edgekey.net/streaming/examples/bipbop_16x9/alternate_audio_aac_sinewave/prog_index.m3u8

One thing to bear in mind when converting from RTMP is that the millisecond timestamps will eventually accumulate enough error to create gaps in the audio. So when you create the "com.apple.streaming.transportStreamTimestamp" ID3 tag, its value should be calculated from the sum of the previous audio sample durations, not from the ms timestamps in the original file.


regards,

Roger Pantos
Apple Inc.
@winlinvip winlinvip changed the title HLS: Support HLS: Support audio only HLS stream. Jan 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant