Leah Zorychta
Leah Zorychta

Reputation: 13409

ffmpeg generated media segments dont work for http-live-streaming

I'm using this command:

ffmpeg -i temp/B8B147C1-509A-4DB1-BDE3-0DD659A62D16.mp4 -acodec aac -strict experimental -vcodec libx264 -f mpegts pipe:1

and my playlist looks something like:

#EXT-X-VERSION:3
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:1

#EXTINF:4.5,
http://localhost:3008/stream/B8B147C1-509A-4DB1-BDE3-0DD659A62D16.ts
#EXT-X-ENDLIST

This works perfectly fine in VLC but not in itunes or iOS Safari. The video refuses to play. I need to be able to generate the .ts files from ffmpeg - cam I using the wrong encoding anywhere?

Upvotes: 2

Views: 196

Answers (1)

szatmary
szatmary

Reputation: 31081

#EXTM3U needs to be the first line in the playlist. see more here: https://datatracker.ietf.org/doc/html/draft-pantos-http-live-streaming-14#section-2

Upvotes: 3

Related Questions