hoangdh / ghichep-StreamingVideo

Ghi chép về Livestream sử dụng Opensource - Xây dựng một máy chủ Livestream theo cách đơn giản nhất - NGINX RTMP Dockerfile
https://linuxvn.info
45 stars 60 forks source link

haw to push viedo en mp4 #2

Closed drkamine closed 5 years ago

drkamine commented 5 years ago

hello i can't push a mp4 viedo . can please provied the step by step haw to push viedo and play it

hoangdh commented 5 years ago

What program are you using to streamming? Are you using nginx-rtmp?

drkamine commented 5 years ago

i use nginx-rtmp in centos 7 . i install it with this script https://github.com/hoangdh/ghichep-StreamingVideo/blob/master/nginx-rtmp/nginx-centos-7.sh

drkamine commented 5 years ago

i can't push a viedo to rtmp by this command ffmpeg -i 04-Utiliser\ Hyper-V.mp4 -threads 1 -vcodec flv -acodec copy -s 1280x720 -f flv rtmp://192.168.1.84:1935/live/amine but i can't access by http

hoangdh commented 5 years ago

You can use OBS, Wirecat,... or ffmpeg to push your server. With FFMpeg example:

ffmpeg -re -i video.mp4 -c copy -f flv rtmp://192.168.1.84:1935/live/amine

Or see more about FFMPEG's guide: https://trac.ffmpeg.org/wiki/StreamingGuide

drkamine commented 5 years ago

thank you very much is work good , can please tell me haw i can see it in http://192.168.1.84/hls/amine/index.m3u8 , but i see only a download file named index.m3u8 with VLC

hoangdh commented 5 years ago

If you are web developer; you can use JwPlayer or hlsJS (OpenSource) on your web application.

In VLC, press CTRL + N and paste your stream URL and play. Enjoy!