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`.
```
ffmpeg -t $duration -i original.mp4 -c:v libx264 -an -vf "scale=-1:1080" -b:v 6M -force_key_frames 'expr:gte(t,n_forced*'"$keyframe_interval"')' -r $fps 1080p.mp4
ffmpeg -t $duration -i original.mp4 -c:a aac -vn -force_key_frames 'expr:gte(t,n_forced*'"$keyframe_interval"')' -r $fps audio_1.mp4
```

Then I fragment those two files with `mp4fragment`.
```ps1
mp4fragment --fragment-duration 6000 1080p.mp4 f-1080p.mp4
mp4fragment --fragment-duration 6000  audio_1.mp4 f-audio_1.mp4
```
And finally I create my hls live stream with `mp4dash`.
```ps1
mp4dash -o stream --hls --use-segment-timeline f-1080p.mp4 f-audio_1.mp4
```
This generates the following two playlists (and other stuff of but not important here)
Audio Playlist 
```
#EXTM3U
# Created with Bento4 mp4-dash.py, VERSION=2.0.0-639
#
#EXT-X-VERSION:6
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-TARGETDURATION:7
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-MAP:URI="init.mp4"
#EXTINF:5.990748299319728,
seg-1.m4s
#EXTINF:6.013968253968254,
seg-2.m4s
#EXTINF:5.990748299319728,
seg-3.m4s
....
```
Video Playlist
```
# Created with Bento4 mp4-dash.py, VERSION=2.0.0-639
#
#EXT-X-VERSION:6
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-TARGETDURATION:6
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-MAP:URI="init.mp4"
#EXTINF:6.0,
seg-1.m4s
#EXTINF:6.0,
seg-2.m4s
#EXTINF:6.0,
seg-3.m4s
....
```
The problem is, that:
1. Audio and Video segments in the created playlists have not the same length. My goal is to have exactly `#EXTINF:6.0,` on every segment for video and **audio**.
2. Can I limit the or fix the digits for the segment duration. Meaning e.g. max 3 digits as segment length so `#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.
Sync segment duration of audio and video stream with mp4dash
This is a GitHub Issue
repo:Bento4
owner:axiomatic-systems
Title : Sync segment duration of audio and video stream with mp4dash
Issue date:

--- start body ---
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`.
```
ffmpeg -t $duration -i original.mp4 -c:v libx264 -an -vf "scale=-1:1080" -b:v 6M -force_key_frames 'expr:gte(t,n_forced*'"$keyframe_interval"')' -r $fps 1080p.mp4
ffmpeg -t $duration -i original.mp4 -c:a aac -vn -force_key_frames 'expr:gte(t,n_forced*'"$keyframe_interval"')' -r $fps audio_1.mp4
```

Then I fragment those two files with `mp4fragment`.
```ps1
mp4fragment --fragment-duration 6000 1080p.mp4 f-1080p.mp4
mp4fragment --fragment-duration 6000  audio_1.mp4 f-audio_1.mp4
```
And finally I create my hls live stream with `mp4dash`.
```ps1
mp4dash -o stream --hls --use-segment-timeline f-1080p.mp4 f-audio_1.mp4
```
This generates the following two playlists (and other stuff of but not important here)
Audio Playlist 
```
#EXTM3U
# Created with Bento4 mp4-dash.py, VERSION=2.0.0-639
#
#EXT-X-VERSION:6
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-TARGETDURATION:7
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-MAP:URI="init.mp4"
#EXTINF:5.990748299319728,
seg-1.m4s
#EXTINF:6.013968253968254,
seg-2.m4s
#EXTINF:5.990748299319728,
seg-3.m4s
....
```
Video Playlist
```
# Created with Bento4 mp4-dash.py, VERSION=2.0.0-639
#
#EXT-X-VERSION:6
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-TARGETDURATION:6
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-MAP:URI="init.mp4"
#EXTINF:6.0,
seg-1.m4s
#EXTINF:6.0,
seg-2.m4s
#EXTINF:6.0,
seg-3.m4s
....
```
The problem is, that:
1. Audio and Video segments in the created playlists have not the same length. My goal is to have exactly `#EXTINF:6.0,` on every segment for video and **audio**.
2. Can I limit the or fix the digits for the segment duration. Meaning e.g. max 3 digits as segment length so `#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.
--- end body ---
