Open bleibdirtroy opened 1 year ago
I have the same issue - the audio fragment duration is 1s longer than video:
$ mediastreamvalidator test-video/master.m3u8
--------------------------------------------------------------------------------
MUST fix issues
--------------------------------------------------------------------------------
Error: Different target durations detected
--> Detail: Target duration: 4 vs Target duration: 3
--> Source: audio-en-mp4a.40.2.m3u8
--> Compare: video-avc1-1.m3u8
--> Detail: Target duration: 4 vs Target duration: 3
--> Source: audio-en-mp4a.40.2.m3u8
--> Compare: video-avc1-2.m3u8
--> Detail: Target duration: 3 vs Target duration: 4
--> Source: video-avc1-3.m3u8
--> Compare: audio-en-mp4a.40.2.m3u8
Tried fragmenting audio both via ffmpeg and mp4fragmenter with the same result:
ffmpeg -y -i $VIDEO_IN \
-vn \
-c:a aac -b:a 128k -ac 2 -ar 48000 \
-movflags +empty_moov+separate_moof -frag_duration 3000000 \
-metadata:s:a:0 language=en \
-f mp4 $VIDEO_OUT-aac.mp4
mp4fragment --fragment-duration 3000 $VIDEO_OUT-aac.mp4 $VIDEO_OUT-aacf.mp4
Packaging the same fMP4 into HLS/DASH using Shaka Packager produces no validator errors.
Hey, I'm having trouble generating a hls stream with equal segment duration for audio and video.
My first step is to force keyframes on audio and video files every 2 seconds with
ffmpeg
.Then I fragment those two files with
mp4fragment
.And finally I create my hls live stream with
mp4dash
.This generates the following two playlists (and other stuff of but not important here) Audio Playlist
Video Playlist
The problem is, that:
#EXTINF:6.0,
on every segment for video and audio.#EXTINF:6.013968253968254,
turns into#EXTINF:6.014,
?The first point would make the second obsolete. And I guess point 2 is not fixed by rounding the number.