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

include metadata in hls stream playlist #57

Open
northamerican opened this issue Oct 24, 2024 · 0 comments
Open

include metadata in hls stream playlist #57

northamerican opened this issue Oct 24, 2024 · 0 comments

Comments

@northamerican
Copy link
Owner

If you're streaming to AirPlay via an HLS (HTTP Live Streaming) .m3u8 stream, the media metadata (such as track title, artist, and album) won't be automatically pulled from the navigator.mediaSession API. Instead, metadata would need to be included within the HLS stream itself, as the AirPlay receiver (like Apple TV) relies on the stream's metadata.

There are a couple of approaches you can take to ensure this information is visible on Apple devices during AirPlay streaming:

  1. Include ID3 Metadata in the HLS Stream
    HLS supports embedded ID3 metadata within its media segments, which can be used to provide track information like title and artist. This is particularly useful for dynamic or live streaming.

To embed ID3 metadata into your HLS stream, you'll need to configure the media encoder to insert the appropriate metadata (e.g., track title, artist). This depends on the tool or library you're using to generate the HLS stream. For example, in FFmpeg, you can add metadata using the -metadata option or insert timed metadata with id3v2.

Example with FFmpeg to add ID3 metadata:

bash
Copy code
ffmpeg -i input.mp3 -metadata title="Track Title" -metadata artist="Artist Name" -f hls output.m3u8
For live streams, encoders like Wowza, AWS MediaLive, or other HLS streaming servers also support adding timed metadata.

  1. EXT-X-METADATA Tag (Less Common)
    While not as commonly used, the HLS specification allows for custom tags, such as EXT-X-METADATA. Some players or servers support this for static metadata in the playlist itself, although this is less flexible than ID3 tags for timed information.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant