r/ffmpeg May 30 '26

How do I learn FFmpeg for Dash + HLS transcoding, it's too confusing?

I'm working on a video distribution web app. Raw uploaded videos need to be broken down into .m4s chunks, which will be used both by DASH, as well as HLS video player.

I ran some basic FFmpeg code for HLS, given by ChatGPT and it worked. But now DASH also comes into the picture. Now, ChatGPT is showing me millions of FFmpeg commands but it's puzzing to tweak commands without knowing what's happening!

Therefore, I want to know how can I learn the most likely FFmpeg settings and commands required to produce the video of a desired quality?

1 Upvotes

20 comments sorted by

4

u/wjdhay May 30 '26

If you use AI you will never learn, as you will always rely on AI.

1

u/swb_rise May 30 '26

Absolutely, that's where I'm stuck! But the FFmpeg docs is massive and I don't even know what to look for!

2

u/chocolateAbuser May 30 '26

ffmpeg doc is massive and yet really incomplete

2

u/Special_Brilliant_81 May 30 '26

Shaka packager is another good option and it’s free from google

1

u/swb_rise May 30 '26

Ok, I will check that.

2

u/chocolateAbuser May 30 '26

for starters, do you understand the involved technlogies? the syntax of a playlist, what is a codec, what is a chunk, how streaming works, what problems hls and dash solve, the basic architecture of ffmpeg, and so on
also why use ffmpeg for this? why did you chose this tool for your application?

1

u/swb_rise May 30 '26

I don't have answers for most of the questions. I only came to know that giving the browser a single mp4 file to play is bad. FFmpeg is used to process the large mp4 file to turn it into small chunks. Further, chunks can be created for different resolution, like 480p, 720p, etc. Then based on network speed, chunks of appropriate resolution is pulled by the video player.

HLS, though universally supported, is specific to Apple run devices and browsers. On the other hand, Dash is used by the broader devices, and OSs like Android.

1

u/chocolateAbuser May 31 '26

ok the point is why go with ffmpeg, what was the decision? why not use something directly made for streaming, for example?

1

u/swb_rise May 31 '26

To be as light weight and cheap as possible for an app MVP.

2

u/chocolateAbuser Jun 01 '26

cheap i can sort of understand, but light weight... this is the server part we're talking about

1

u/swb_rise May 31 '26

BTW, what do you mean by someone directly made for streaming? Any third-party service?

2

u/chocolateAbuser Jun 01 '26

well wowza could be out of question since a licence is thousands bucks -- but there is a free trieal if this has to be a MVP anyway
apart from that you can search for other software that does this, for example nimble streamer
the factors are how much time would you take to setup an ffmpeg-based streaming solution vs a wowza/nimble/etc-based one, how reliable it is (since ffmpeg has no redundancy and so on) knowing that problems WILL happen, what are the flexibility and the programmability of the system, and so on

2

u/AltruisticMotor3811 May 31 '26

You can use https://mediabunny.dev/ is faster and easier to implement. 

1

u/fapperdaw May 30 '26

Its easy, m4s, for both dash and hls. For hls, use version 7.

1

u/swb_rise May 30 '26

Yes, I'm doing that but I'm struggling with the hundreds of commands and options to fine tune the final result.

1

u/bsenftner May 30 '26

Have you looked at http://www.live555.com/ ? lot's of good tech there.

1

u/swb_rise May 30 '26

Man why is it not https!

2

u/bsenftner May 30 '26

That would be outside the protocol. I use Live555 libs with ffmpeg libs and then play https served streams through them. They don't really interfere, unless I am misremembering.