[FFmpeg-user] HLS to FTP

Yaniv Sharon yaniv.sharon at gmail.com
Tue Aug 9 13:56:57 EEST 2016


Hi all !

 

So, Im doing some workaround for uploading the hls segments directly to FTP.

This is my CL:

 

ffmpeg -stream_loop -1 -i http://input...  -c:a copy -hls_time 10
-hls_list_size 3 -hls_wrap 0 -start_number 0 -hls_allow_cache 0
-segment_list_flags +live -hls_flags delete_segments
ftp://user:pass@ftp.domain:21/out.m3u8

 

working, but because the "delete segments" flag i getting this message:

"hls muxer @ 000...failed to delete old segment...invalid argument"

 

I assume that because the muxer don't give the right command to the ftp
server [locally all fine].

 

Again, its working but the web server get full of segments.

 

So, what I did is to remove the "delete segments" flag, and change the
"-hls_wrap 0" to -hls_wrap 20"

 

Kind of solve the problem of generating endless segments, because ff sending
the segments

00.01.02...17..18.19....00.01.02.

And the TS files updated in the right order in the m3u8 list. 

 

But, the only problem that the line  ""#EXT-X-MEDIA-SEQUENCE:299"""

Not returning to 00 and just counting up.

So the player don't know what to do after the segment number 19, and falls.

 

#EXTM3U

#EXT-X-VERSION:3

#EXT-X-ALLOW-CACHE:NO

#EXT-X-TARGETDURATION:11

#EXT-X-MEDIA-SEQUENCE:299

#EXTINF:9.984589,

segment_2_19.ts

#EXTINF:9.984578,

segment_2_0.ts

#EXTINF:10.031022,

segment_2_1.ts

 

what can I do to fix that?

 

THNX!



More information about the ffmpeg-user mailing list