I
I
impressive172021-06-24 23:28:08
RTMP
impressive17, 2021-06-24 23:28:08

How to assemble .m3u8 from .mov?

Hey!
I'm trying to set up hls streaming
made .m3u8 via ffmpeg, streaming does not work
I checked it on the online checker, there is also an error
Locally I see that the manifest is coming, but requests for .ts segments do not go away Please tell me
a reliable ffmpeg command for transcoding
Maybe it's in the video?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Brendan Castaneda, 2021-07-01
@ae_ph

I wrote this file for you.
-c:v h264 - We will encode to MP4 format with the h264 codec. h264 codec, can display both QuickTime and Media Player.
-hls_list_size - Set the maximum number of entries in the playlist. If set to 0, the list file will contain all segments. The default value is 5.
-hls_time - Set the length of the target segment. The default value is 2.
-start_number - Set the file index to match the image file template from which to start reading. The default value is 0.
-g - Set the keyframe placement. The GOP size sets the maximum distance between keyframes; if 0, the output stream will be internal only.
The minimum distance is ignored unless it matches the GOP size, in which case the keyframes will always appear at a fixed interval.
The option is not set by default, so without this option the library is free to choose where to place keyframes.
-crf - Set quality/size trade-off, for constant quality (no target bitrate) and limited quality (with maximum target bitrate) modes.
Valid range: 0 to 63, higher numbers indicate lower quality and smaller output.
Used only if set; by default, only the target bitrate is used.
-flags +cgop - Enable private GOP.
-flags -cgop - Enable open GOP.
-f hls - The filter creates hls files.
-hls_flags single_file - If this flag is set, the multiplexer will store all segments in a single MPEG-TS file and use the byte ranges in the playlist.
HLS playlists created this way will have version number 4.
-map 0 selects all streams.
-map 0:v only video streams.
-map 0:a audio streams only.
Folder structure for this bat file.
your folder
|
| ffmpeg.exe
| MOV-m3u8.bat
|
+---Result
|
|
\---Your_files
your_video.mov

@echo off
color a
set a="Your_files\*.mov"
set b="Result\%%~na.m3u8"
set c=ffmpeg.exe
set f=-c:v h264 -flags +cgop -g 30 -map 0 -crf 23 -start_number 0 -hls_time 1 -hls_list_size 500000 -f hls
for %%a in (%a%) do (%c% -y -i "%%a" %f% %b%)
exit

I hope this is exactly what you need.
You can also find additional files in my repository .
Inside the bat files you will find more detailed information about the settings.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question