3

I am planning to convert MP4(1920x1080, bitrate may vary from mp4 to mp4) to HLS(different type of resolution).

different type of resolution, I am looking for

  • 1080p = 1920x1080
  • 720p = 1280x720
  • 480p = 854x480
  • 360p = 640x360

To achieve the above, I have written a Lambda functin in NodeJS and I have used below "System Presets". HLS O/P file is creating but the RESOLUTIONs are not as per my expectation. It's some time coming correct for few cases. But in generic the value(WxH) is not constant.

  • HLS v3 and v4 (Apple HTTP Live Streaming), 400 kilobits/second, Video-only --------- 1351620000001-200055

  • HLS v3 and v4 (Apple HTTP Live Streaming), 600 kilobits/second, Video-only --------- 1351620000001-200045

  • HLS v3 and v4 (Apple HTTP Live Streaming), 1 megabit/second, Video-only --------- 1351620000001-200035

  • HLS v3 and v4 (Apple HTTP Live Streaming), 1.5 megabits/second, Video-only --------- 1351620000001-200025

I tried but not getting any solution. I need the help of anyone to resolve my problems.

1 Answers1

1

Thanks, your question is very clear. Recently I had experience same kind of issue. Please find the below solutions.

Here what I understand, you want specific resolution output files.

You have to create new custom presets.I am mentioning one custom preset for 1080p, you have follow for the rest.

1080p = 1920x1080

Create new presets : -

First of all you have to choose one existing System Presets. For example - System preset: HLS Video - 1.5M and change the configuration value in the video section only as per below settings

Name - Custom HLS Video Auto - 1080p
Container - ts
Codec - H.264
Codec Options - InterlacedMode:Progressive,MaxReferenceFrames:3,Level:3.1,ColorSpaceConversionMode:None,Profile:main
Max Bit Rate - left blank (optional)
Buffer Size - left blank (optional)
Maximum Number of Frames Between Keyframes - 90
Fixed Number of Frames Between Keyframes - true
Bit Rate - auto
Frame Rate -  auto
Video Max Frame Rate - 30
Max Width - 1920
Max Height - 1080
Sizing Policy - Fit
Padding Policy - NoPad
Display Aspect Ratio -   auto

These 3 settings are important

  • Max Width - 1920
  • Max Height - 1080
  • Sizing Policy - Fit

For other resolution, you have to create new custom presets by changing the Max Width & Max Height.Everything will remain same as it is.

Priyabrata
  • 629
  • 1
  • 8
  • 23