I am using mediafilesegmenter
to generate HLS playlists for mp4 movies. My command is as follows,
mediafilesegmenter movieName.mp4 -I -f /Library/WebServer/Documents/vod/movieName/ -t 10 -l movie.log -k /Library/WebServer/Documents/vod/movieName/keys/ -K http://KEYSERVER/keys/ -key-rotation-period 10 -encrypt-rotate-iv-mbytes=1024 -J random
Through this command i am getting playlist generated fine, but the duration in #EXTINF:
is decimal placed. I did checked the HLS draft, it says
The EXTINF tag specifies the duration of a media segment. It applies only to the media URI that follows it. Each media segment URI MUST be preceded by an EXTINF tag. Its format is:
#EXTINF:<duration>,<title>
>
"duration" is an integer or floating-point number in decimal positional notation that specifies the duration of the media segment in seconds. Durations that are reported as integers SHOULD be rounded to the nearest integer. Durations MUST be integers if the protocol version of the Playlist file is less than 3.
My question is How can i make #EXTINF
to whole integer? I did used the option -t 10
and -t 15
and several numbers, but still my playlist has
#EXTINF:14.792,
etc.
Can anybody point me what changes in the command to be made so that i get whole integer based #EXTINF
?
My mediasegmenter version is mediafilesegmenter: Beta Version 1.1(111116)
I am using Darwin Kernel Version 10.8.0 with x86_64
mac.
There is now a proper solution provided by Apple. You should use this flag to the mediafilesegmenter tool.
-no-floating-point-duration