I am trying to troubleshoot iOS device playback errors of long audio files (audiobooks) created using mp4hls. One thing that the unplayable titles have in common are segments that are many times longer than that requested by the --segment-duration flag. For example, using this command:

```
mp4hls --output-dir=<output-dir> --output-single-file
--segment-duration 60 
--encryption-key-format=com.apple.streamingkeydelivery 
--hls-version=5 --master-playlist-name=master.m3u8 
--encryption-mode=SAMPLE-AES --encryption-key-uri=<uri>
 --encryption-key=<key> 
--encryption-iv-mode=fps 
--encryption-key-format-versions=1 sourcefile.m4a
```

results in a playlist that starts with:

```
#EXTM3U
#EXT-X-VERSION:5
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-TARGETDURATION:307
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:307.581995,
#EXT-X-BYTERANGE:384649@0
media.aac
#EXTINF:307.581995,
#EXT-X-BYTERANGE:173057@384649
media.aac
#EXTINF:60.000363,
#EXT-X-BYTERANGE:978495@557706
media.aac
#EXTINF:60.000363,
#EXT-X-BYTERANGE:977947@1536201
media.aac
...
```
I understand that actual segment duration may not match the `--segment-duration` value exactly, but this difference seems excessive. Do you have any insight as to why the first 2 segments have a duration of 307.581995? And why does that exceed the EXT-X-TARGETDURATION value?

mp4hls --segment-duration vs actual segment lengths
This is a GitHub Issue
repo:Bento4
owner:axiomatic-systems
Title : mp4hls --segment-duration vs actual segment lengths
Issue date:

--- start body ---
I am trying to troubleshoot iOS device playback errors of long audio files (audiobooks) created using mp4hls. One thing that the unplayable titles have in common are segments that are many times longer than that requested by the --segment-duration flag. For example, using this command:

```
mp4hls --output-dir=<output-dir> --output-single-file
--segment-duration 60 
--encryption-key-format=com.apple.streamingkeydelivery 
--hls-version=5 --master-playlist-name=master.m3u8 
--encryption-mode=SAMPLE-AES --encryption-key-uri=<uri>
 --encryption-key=<key> 
--encryption-iv-mode=fps 
--encryption-key-format-versions=1 sourcefile.m4a
```

results in a playlist that starts with:

```
#EXTM3U
#EXT-X-VERSION:5
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-TARGETDURATION:307
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:307.581995,
#EXT-X-BYTERANGE:384649@0
media.aac
#EXTINF:307.581995,
#EXT-X-BYTERANGE:173057@384649
media.aac
#EXTINF:60.000363,
#EXT-X-BYTERANGE:978495@557706
media.aac
#EXTINF:60.000363,
#EXT-X-BYTERANGE:977947@1536201
media.aac
...
```
I understand that actual segment duration may not match the `--segment-duration` value exactly, but this difference seems excessive. Do you have any insight as to why the first 2 segments have a duration of 307.581995? And why does that exceed the EXT-X-TARGETDURATION value?

--- end body ---
