Open acollazomayer opened 6 years ago
Put the demp.mp4 file in the ‘public’ directory, then you can access it through http://localhost:8000/demo.mp4
<video controls>
<source src="http://localhost:8000/demo.mp4" type="video/mp4">
</video>
Just like normal usage.
The thing is that i dont want the normal usage, i want to stream the video to the server and then pick up the stream in the browser, but it has to be an mp4, webm or ogg because the video is a 360 video and all the players that i found use the html video tag to reproduce the video
So your need is to streaming a video file.The easy way is to use ffmpeg.
ffmpeg -re -i INPUT_FILE.mp4 -c copy -f flv rtmp://serverip/live/STREAM_NAME
If the audio or video coding is not AAC\H.264, you also need transcoding.
ffmpeg -re -i INPUT_FILE.mp4 -c:v copy -c:a aac -f flv rtmp://serverip/live/STREAM_NAME
or
ffmpeg -re -i INPUT_FILE.mp4 -c:v libx264 -tune zerolatency -c:a aac -f flv rtmp://serverip/live/STREAM_NAME
Then using flv.js to play it.
However does the flv.js reproduce 360 videos?
Put the demp.mp4 file in the ‘public’ directory, then you can access it through http://localhost:8000/demo.mp4
Hey, @illuspas . This is the only way to stream files? If I have my files on AWS s3, how can I proceed?
How can I proceed for streaming videos when file is in azure container .
Hi how can i stream a mp4 video instead of a flv video to play it in a browser. the video needs to be mp4 to be picked in a html5 video tag