Hey guys, So I think this may be my own lack of knowledge in the encoder.
Because we were specifying -b:a 32k in our encoding step, I thought the byte ranges should align properly, but I’ve since learned that is incorrect. The compression is still variable in terms of bytes. Therefore this is correct. I did see other issues that I’ll send a separate email about. Thanks Ronak Sent from my iPhone > On Apr 19, 2018, at 11:47 PM, Jeyapal, Karthick <kjeya...@akamai.com> wrote: > > > >> On 4/20/18 2:20 AM, Ronak wrote: >> Hi, >> >> I've been testing FFMPEG's HLS fragmented MP4 options with some M4A audio >> files. >> >> I've noticed that if I ask ffmpeg to fragment an 11 minute file vs a 10 hour >> file, the byte ranges are different, even if the channel count/sampling >> rate/bit rate and codec are the same. >> >> Here's an example of what I'm talking about: >> >> #EXTM3U >> #EXT-X-VERSION:6 >> #EXT-X-TARGETDURATION:10 >> #EXT-X-MEDIA-SEQUENCE:1 >> #EXT-X-MAP:URI="someAudio.m4s",BYTERANGE="738@0" >> #EXTINF:9.798821, >> #EXT-X-BYTERANGE:38977@738 >> someAudio.m4s >> #EXTINF:9.798821, >> #EXT-X-BYTERANGE:38735@39715 >> someAudio.m4s >> #EXTINF:9.798821, >> #EXT-X-BYTERANGE:38650@78450 >> someAudio.m4s >> #EXTINF:9.798821, >> #EXT-X-BYTERANGE:38688@117100 >> someAudio.m4s >> #EXTINF:9.798821, >> #EXT-X-BYTERANGE:38820@155788 >> someAudio.m4s >> >> And >> >> #EXTM3U >> #EXT-X-VERSION:6 >> #EXT-X-TARGETDURATION:10 >> #EXT-X-MEDIA-SEQUENCE:1 >> #EXT-X-MAP:URI="someOtherAudio.m4s",BYTERANGE="738@0" >> #EXTINF:9.798821, >> #EXT-X-BYTERANGE:38724@738 >> someOtherAudio.m4s >> #EXTINF:9.798821, >> #EXT-X-BYTERANGE:38812@39462 >> someOtherAudio.m4s >> #EXTINF:9.798821, >> #EXT-X-BYTERANGE:38632@78274 >> someOtherAudio.m4s >> #EXTINF:9.798821, >> #EXT-X-BYTERANGE:38804@116906 >> someOtherAudio.m4s >> #EXTINF:9.798821, >> #EXT-X-BYTERANGE:38720@155710 >> someOtherAudio.m4s >> >> Why would these byte ranges be different? I've been trying to look through >> the libavformat source code >> (https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/hlsenc.c >> <https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/hlsenc.c>) but it >> looks like this determination is done in whoever calls hls_write_packet. > Yes, you are right. It is determined by the AV encoder(say AAC encoder in > your case). HLS segmenter will just cut at the segment boundaries and it > doesn't worry about the number of bytes that are present in that segment. >> >> Thanks, >> >> Ronak >> >> _______________________________________________ >> ffmpeg-devel mailing list >> ffmpeg-devel@ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel