Closed mositron closed 11 years ago
Please follow this guide: https://github.com/arut/nginx-rtmp-module/wiki/Building-nginx-rtmp-with-HLS-support
thanks :+1:
your guide Work!
but after I test send stream from FMS to Server. and play on IPAD. "http://server/live/live.m3u8" HLS stream will stop after play about 4-5 minute. but can play again if click on play button.
and How to auto delete last .ts or .m3u8 after stop stream?
Thnk you.
Deleting stream after playing is something not obvious because some clients might still be playing the video after publishing has finished. You can delete the old files from cron.
I don't understand you. Is 4-5 minutes the total length of your video?
Playing video with time shift (or from the beginning if total length is small) is a great feature of HLS, not a bug.
Thank you arut. I mean send live stream from FMS. If play stream on rtmp it look good can paly stream until stop FMS. But if play from HLS on ipad, It will play ~4 minute after that player will stop, I must click play again for play togetter.
And if don't have who play rtmp, HLS (.ts file) it not create?
So it suddenly stops after 4 minutes and when you press play button again it starts playing from where it stopped, right? Or from the beginning?
Playing from where stopped.
Hi Arut, I have error when compiling with hls;
/usr/build/nginx-rtmp-module/hls/ngx_rtmp_hls_module.c: In function ‘ngx_rtmp_hls_init_video’: /usr/build/nginx-rtmp-module/hls/ngx_rtmp_hls_module.c:278: error: implicit declaration of function ‘avformat_new_stream’ /usr/build/nginx-rtmp-module/hls/ngx_rtmp_hls_module.c:278: error: assignment makes pointer from integer without a cast /usr/build/nginx-rtmp-module/hls/ngx_rtmp_hls_module.c:286: error: ‘AVMEDIA_TYPE_VIDEO’ undeclared (first use in this function) /usr/build/nginx-rtmp-module/hls/ngx_rtmp_hls_module.c:286: error: (Each undeclared identifier is reported only once /usr/build/nginx-rtmp-module/hls/ngx_rtmp_hls_module.c:286: error: for each function it appears in.) /usr/build/nginx-rtmp-module/hls/ngx_rtmp_hls_module.c: In function ‘ngx_rtmp_hls_init_audio’: /usr/build/nginx-rtmp-module/hls/ngx_rtmp_hls_module.c:341: error: assignment makes pointer from integer without a cast /usr/build/nginx-rtmp-module/hls/ngx_rtmp_hls_module.c:349: error: ‘AVMEDIA_TYPE_AUDIO’ undeclared (first use in this function) /usr/build/nginx-rtmp-module/hls/ngx_rtmp_hls_module.c:351: error: ‘AV_SAMPLE_FMT_U8’ undeclared (first use in this function) /usr/build/nginx-rtmp-module/hls/ngx_rtmp_hls_module.c:351: error: ‘AV_SAMPLE_FMT_S16’ undeclared (first use in this function) /usr/build/nginx-rtmp-module/hls/ngx_rtmp_hls_module.c: In function ‘ngx_rtmp_hls_initialize’: /usr/build/nginx-rtmp-module/hls/ngx_rtmp_hls_module.c:478: error: implicit declaration of function ‘av_guess_format’ /usr/build/nginx-rtmp-module/hls/ngx_rtmp_hls_module.c:478: error: assignment makes pointer from integer without a cast /usr/build/nginx-rtmp-module/hls/ngx_rtmp_hls_module.c: In function ‘ngx_rtmp_hls_open_file’: /usr/build/nginx-rtmp-module/hls/ngx_rtmp_hls_module.c:519: error: implicit declaration of function ‘avio_open’ /usr/build/nginx-rtmp-module/hls/ngx_rtmp_hls_module.c:519: error: ‘AVIO_FLAG_WRITE’ undeclared (first use in this function) /usr/build/nginx-rtmp-module/hls/ngx_rtmp_hls_module.c:542: error: implicit declaration of function ‘avformat_write_header’ /usr/build/nginx-rtmp-module/hls/ngx_rtmp_hls_module.c: In function ‘ngx_rtmp_hls_close_file’: /usr/build/nginx-rtmp-module/hls/ngx_rtmp_hls_module.c:726: error: implicit declaration of function ‘avio_flush’ /usr/build/nginx-rtmp-module/hls/ngx_rtmp_hls_module.c:728: error: implicit declaration of function ‘avio_close’ /usr/build/nginx-rtmp-module/hls/ngx_rtmp_hls_module.c: In function ‘ngx_rtmp_hls_delete_stream’: /usr/build/nginx-rtmp-module/hls/ngx_rtmp_hls_module.c:906: error: implicit declaration of function ‘avformat_free_context’ /usr/build/nginx-rtmp-module/hls/ngx_rtmp_hls_module.c: In function ‘ngx_rtmp_hls_video’: /usr/build/nginx-rtmp-module/hls/ngx_rtmp_hls_module.c:1137: error: ‘AV_PKT_FLAG_KEY’ undeclared (first use in this function) make[1]: * [objs/addon/hls/ngx_rtmp_hls_module.o] Error 1 make[1]: Leaving directory `/usr/build/nginx-1.2.4' make: * [build] Error 2
hello I have error when compiling with hls
ffmpeg - from http://ffmpeg.org/trac/ffmpeg/wiki/CentosCompilationGuide
my error