Skip to main content
Troubleshooting Guides

No Sound in M3U8? How to fix HLS audio and video sync issues

Playing an HLS (HTTP Live Streaming) stream only to find out there is no audio or the audio is completely out of sync with the video is a common and frustrating issue. This guide covers the technical reasons why an M3U8 stream might have no sound, how to identify audio synchronization drift, and the exact steps to troubleshoot and fix these HLS audio issues.

When dealing with M3U8 playlists, audio delivery is often separated from video delivery, which introduces several failure points. Unlike a standard MP4 file where audio and video are multiplexed into a single container, modern HLS deployments often use "demuxed" or separated audio and video tracks to save bandwidth and offer multiple language tracks. This is explicitly defined in the master M3U8 playlist. If the player cannot read the audio playlist, fails to fetch the audio segments, or does not support the audio codec, you will get silent video.

Why does my M3U8 stream have no sound?

There are multiple technical reasons why an HLS stream will play video flawlessly but fail to output any audio. Before modifying your player configuration, you need to understand the root cause. Here are the most common reasons for missing audio:

  • Missing or blocked audio playlists: The master playlist references an audio track URL that returns a 404 (Not Found) or is blocked by CORS. The video continues to play because the video playlist loaded successfully.
  • Unsupported audio codecs: The stream uses an audio codec (like AC-3, Dolby Digital Plus / EAC3) that the specific browser or player does not support. Most web players require AAC or MP3 for maximum compatibility across browsers.
  • Missing #EXT-X-MEDIA tags: The master manifest fails to properly declare the audio group, meaning the player doesn't even know an audio track exists in the demuxed setup.
  • Hardware muting or autoplay policies: Browsers aggressively mute autoplaying video. The audio might be playing, but the browser has muted the element until the user interacts with the page (like clicking or tapping).

Troubleshooting missing audio tracks

To diagnose missing audio, you need to look at the master M3U8 playlist and the network tab in your browser's developer tools. Here is the step-by-step methodology used by video engineers.

1. Inspect the Master Playlist

Look for the #EXT-X-MEDIA:TYPE=AUDIO tag. This tag defines an audio track. It should contain a URI attribute pointing to the audio playlist. If the URI is missing, the audio is multiplexed. If it exists, the player must download it. Ensure the URI is resolvable.

2. Check Codec Declarations

Look at the #EXT-X-STREAM-INF tag. The CODECS attribute should list both video and audio codecs (e.g., CODECS="avc1.42e01e, mp4a.40.2"). If it only lists a video codec (avc1), the player might not initialize the audio decoder, leading to silence.

CORS issues on audio segments

If the video plays but the audio fails, open your browser's Developer Tools (F12) and go to the Network tab. Filter by Fetch/XHR. You might see the audio playlist (.m3u8) or audio segments (.aac or .ts) failing with CORS (Cross-Origin Resource Sharing) errors.

This happens when the audio segments are hosted on a different CDN or subdomain than the video (or the website itself), and that server is missing the Access-Control-Allow-Origin: * header. The browser intercepts this as a security violation and blocks the audio request, leaving you with a silent video.

Audio and video synchronization issues

If you have sound, but it doesn't match the video (lip-sync issues), the problem is usually related to timestamps within the media segments.

In HLS, synchronization relies on Presentation Time Stamps (PTS) embedded inside the MPEG-TS or fragmented MP4 segments. The player uses these PTS values to align the audio and video frames perfectly on a timeline. If the encoder introduces a delay, or if the timestamps drift over time due to frame drops, the audio will go out of sync.

Common causes of A/V desync:

  • Discontinuities: When a stream switches sources (like inserting an ad or switching cameras), the timestamps often reset to zero. If the M3U8 playlist is missing the critical #EXT-X-DISCONTINUITY tag, the player will try to play the new audio against the old video timeline, causing massive desync.
  • Variable frame rates (VFR): Encoding video with a highly variable frame rate can confuse players that expect constant durations, leading to gradual audio drift over time. Always transcode to a constant frame rate (CFR) for HLS.
  • Mismatched segment durations: If the video segments are exactly 6.0 seconds but the audio segments are 5.9 seconds, the player has to stretch, buffer, or drop frames to keep them aligned. They should be strictly identical in length.

How to fix HLS sync and audio issues

Depending on whether you are the viewer or the broadcaster, your options for fixing these issues differ significantly.

For Viewers

Try refreshing the player, as this resets the buffer and forces the player to re-read the PTS timestamps from the live edge. If you are using a desktop player like VLC Media Player, you can use the built-in "Audio desynchronization" feature (usually mapped to the 'J' and 'K' keys on the keyboard) to manually offset the audio in milliseconds until it matches the lips.

For Broadcasters and Developers

Ensure your transcoder is configured to output strictly aligned audio and video segments. Use a tool like FFprobe to inspect the PTS values of your segments. If you are inserting ads (SSAI), ensure your manifest manipulator is correctly inserting #EXT-X-DISCONTINUITY tags into both the audio and video playlists at the exact same sequence number.

Fixing audio streams with FFmpeg

If you have downloaded a broken M3U8 stream and want to fix the audio sync locally for archival purposes, you can use FFmpeg to rebuild the timestamps. The following command copies the audio and video streams without re-encoding (which is fast and preserves quality), but generates new, synchronized timestamps and fixes AAC bitstreams:

ffmpeg -async 1 -i input.m3u8 -c copy -bsf:a aac_adtstoasc output.mp4

This command is particularly useful if the original HLS stream had slight PTS drift or discontinuity errors that cause desktop players to stumble or go out of sync halfway through the video.

Conclusion

Missing audio or out-of-sync playback in M3U8 files is almost always a symptom of manifest misconfiguration, CORS blocking, or encoder timestamp issues. By inspecting the master playlist for the correct #EXT-X-MEDIA tags, checking the network tab for failing audio segment requests, and ensuring PTS timestamp alignment, you can quickly identify the root cause of the silent or desynced stream. Using tools like FFprobe and FFmpeg can further aid in diagnosing and permanently fixing these issues for offline viewing.