![]() Optional Step: Enable CORS (Cross-Origin-Resource-Sharing) on your Server with. You will also need to set the path of your “poster.jpg” in order to display a poster frame for your player (the default poster is a black screen). Please note that the above script will embed a VideoJS Player with the “Play” button centered (the default play button is set in the upper left corner), with the download feature disabled and the preload value set to “auto”. You have to insert the following code into your webpage, whether thru HTML or PHP: The command to embed a responsive VideoJS player along with your HLS video is pretty simple. VideoJS is the most popular open source HTML5 player framework, created by the guys at Brightcove. Step #4: Install VideoJS and embed the HLS video Step #3: Upload the Bento4’s generated files into your server You can then upload the entire “output” folder onto your server. Alternatively you can remove the option “–output-single-file” in order to produce separate segments of your video. The command will be: mp42hls output.mp4 -verbose -output-single-fileĪt this point you will end up with a folder in your path, named “output”, which will contains a “master.m3u8” file and a “media-1” folder, which contains all the segments in one unique file. This step will require you to install Bento4 from Axiomatic Systems. NOTE: In order to produce a standard HLS Package, please refer to the Apple’s HLS Authoring Specifications Step #2: Segment and package for HLS Streaming Now, your “ output.mp4” will have a key-frame interval of 2 seconds (as required by the majority of video platforms). NOTE: All syntaxes and full explanations of this command can be found in the book FFMPEG – From Zero to Hero: ffmpeg -i master.mxf -c:v h264 -crf 22 -tune film -profile:v main -level:v 4.0 -minrate 5000k -maxrate 5000k -bufsize 5000k -r 24 -keyint_min 24 -g 48 -sc_threshold 0 -c:a aac -b:a 128k -ac 2 -ar 44100 -pix_fmt yuv420p -movflags +faststart output.mp4 Let’s take for example a source file in Apple ProRES (4444) format ( master.mxf), at 1920×1080 (Full-HD), in Stereo (L+R) running at 24 FPS With this step we are going to create a file in h264 format, with same resolution and a final bitrate of 5.000 Kbps. ![]() Step #1: Optimize your file for streaming destination ![]() ![]() The following is a step-by-step guide in order to prepare and stream a file in HLS format, using FFMPEG, Bento4 and embedding it on the web with VideoJS.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |