0

i'm encoding a stream with mediastreamsegmenter (on osx) and everything works fine up until about 15-20 hours of video, after that the stream becomes unplayable. i'm keeping all the semgents for VOD purposes. i've tried playing it back in my own app (using AVPlayer) on an ipad as well as in safari on an ipad - both fail (tried different ipads): AVPlayer plays the first few frames then stops and safari says "operation could not be completed". the .m3u8 playlist seems fine, no issues there. i also created an mp4 file from the same stream (using ffmpeg), that file plays fine.

here's an example of the .m3u8 file:

#EXTM3U
#EXT-X-TARGETDURATION:1
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-PLAYLIST-TYPE:EVENT
#EXTINF:0.96763,    
segm_st0.ts
#EXTINF:0.96763,    
segm_st1.ts
#EXTINF:0.96763,    
segm_st2.ts
#EXTINF:0.96763,    
segm_st3.ts
#EXTINF:0.96763,    
segm_st4.ts

this is the command i'm using to create the HLS stream:

$ mediastreamsegmenter -p -t 1s -S 1 -B segm_st -i list.m3u8 -f ~/live/video 127.0.0.1:2200

I also tried playing it back in safari on mac OS X (Mavericks) - works fine. does anybody know any solutions/workarounds for this problem?

ierdna
  • 5,753
  • 7
  • 50
  • 84
  • 1
    Have you tried longer segments? There might be a limit to how many items there can be in the playlist. – mikaraento Nov 09 '14 at 12:12
  • i haven't, but shorter segments isn't an option for me, the video has to be at most 4 seconds behind real time (which it is with 1-s segments) but that's an interesting point to consider. – ierdna Nov 10 '14 at 17:00
  • Hm, I don't think keeping all the segments for 15 hours makes sense for a mobile device? You can keep all the segments somewhere, but I think you should rewrite the playlist for mobile clients to only have the last X segments. – mikaraento Nov 11 '14 at 06:31
  • the segments are stored on a server, not on iPad, and i'm using AVFoundation on iPad, so it should only load last few segments, but it may be choking because of the playlist size – ierdna Nov 11 '14 at 13:56
  • yeah, I meant that on the server you should serve a shorter version of the playlist to the iPAD, even if you are keeping all the segments. – mikaraento Nov 12 '14 at 18:17
  • if i serve a shorter version to the iPad, the user won't be able to seek back to the beginning of the video (it's a requirement for this app). – ierdna Jan 13 '15 at 19:15

0 Answers0