$ /opt/ffmpeg/bin/ffmpeg -re -i -c copy -hls_time 10 -hls_list_size 0 hls_stream/stream.m3u8įfmpeg version N-81495-g11a631d Copyright (c) 2000-2016 the FFmpeg developersĬonfiguration: -extra-cflags=-I/opt/ffmpeg/include -extra-ldflags=-L/opt/ffmpeg/lib -enable-rpath -prefix=/opt/ffmpeg -toolchain=hardened -enable-shared -enable-gpl -enable-nonfree -enable-openssl -enable-libass -enable-libfdk-aac -enable-libfreetype -enable-libmp3lame -enable-libopus -enable-libtheora -enable-libvorbis -enable-libvpx -enable-libx264 -enable-libx265 -enable-libebur128 Ok, just look what happens when you try to copy live hls stream.įirstly, create live stream with option -re. But as of today this flag isn't work (and it is unlikely will be worked in the future).įfmpeg -re -i some_video.mp4 -c copy -hls_time 10 -hls_list_size 0 hls_stream/stream.m3u8 &įfmpeg -i hls_stream/stream.m3u8 -live_start_index 0 new_video.mp4ĭespite -live_start_index 0 option, ffmpeg dropped the first few segments. Looks like somebody tried to fix it and made AVFMT_FLAG_PRIV_OPT flag, which would eliminate s->iformat->read_header call in avformat_open_input. This happens because function select_cur_seq_no in hls.c uses c->live_start_index before ffmpeg sets its value to the specified by user.Īvformat_open_input -> s->iformat->read_header(s) -> hls_read_header -> pls->cur_seq_no = select_cur_seq_no(c, pls) -> select_cur_seq_no (here options was readed from HLSContext struct).īecause all options changes should occur after avformat_open_input call, there's no way to change this option value. segment index to start live streams at (negative values are from the end) (from INT_MIN to INT_MAX) (default -3)īut this option is totally broken, and ffmpeg always starts at the third last segment. ffmpeg has an option to set the segment number where it must start reading. This bug occurs when you try to copy live hls stream from start.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |