bentasker / HLS-Stream-Creator

Simple Bash Script to take a media file, segment it and create an M3U8 playlist for serving using HLS
BSD 3-Clause "New" or "Revised" License
273 stars 101 forks source link

Quick Question.. #13

Closed parmarsanjay closed 7 years ago

parmarsanjay commented 7 years ago

Hi There,

I am planning on using this. I see that this script uses segment as the format. Newer version of ffmpeg has support for HLS format. Is there a big difference between 2 formats?

https://www.ffmpeg.org/ffmpeg-formats.html#hls-1

bentasker commented 7 years ago

Hi,

Not a major difference, no. When I first created the script, HLS didn't exist in ffmpeg, and when it first got added it seemed a little too unreliable.

I've not really revisited since then to see whether it's more suitable now. The script's output should be valid HLS none-the-less

parmarsanjay commented 7 years ago

Thanks @bentasker. Another related question. I saw few articles talk about GOP size and aligned frame.

http://stackoverflow.com/questions/33225026/creating-hls-variants-with-ffmpeg

Do i have worry about that if use this script? Just want to make sure that I am not missing anything. I am new to FFMPEG world.

bentasker commented 7 years ago

Hi,

I've not seen any issues without it when switching between variants, though it's possible that's selection bias on the sources I've been using.

If you do find you need it, it's fairly simple to specify at run time. Assuming you want a 2 second interval and your video runs at 30fps

FFMPEG_FLAGS="-g 60"
export FFMPEG_FLAGS
./HLS-Stream-Creator.sh # etc

If you do find you need to do the above, though, let me know and I'll look at building something into the script.

parmarsanjay commented 7 years ago

Thank @bentasker. This is helpful. For now, I am good.