Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video loses aspect ratio #89

Open
userlip opened this issue Feb 17, 2021 · 1 comment
Open

Video loses aspect ratio #89

userlip opened this issue Feb 17, 2021 · 1 comment

Comments

@userlip
Copy link

userlip commented Feb 17, 2021

Describe the bug
I have a video which has the original height and width of 956x354 which means aspect ration of 956/354 = 2.7
When I use the autoGenerateRepresentations function I get these sizes in my m3u8 file:

144x60 = 2,4
240x100 = 2,4
360x150 = 2,4
480x200 = 2,4
720x302 = 2,38
956x354 = 2,7

Which will cause a jump in the aspect ratio of the file, which is unwanted. Is there any way to solve this issue so that the streams all have the original aspect ratio of 2,7?

To Reproduce
Steps to reproduce the behavior:

Use this Video: https://fuego-files.s3.eu-central-1.amazonaws.com/public/8431057685e3d64d85ecac/c2a0759deb767c63c2982a7c45cfef6/video/video.mp4

With this code:

$format = new Streaming\Format\X264();

$hls = $video->hls()
->setFormat($format)
->autoGenerateRepresentations()
->setHlsTime(2)
->fragmentedMP4()
->save(null, $to_s3);

Expected behavior
All other reps have the same aspect ration of 2.7 (like the original)

Desktop/Server (please complete the following information):

  • OS: Ubuntu 18.04
  • FFmpeg vesion : ffmpeg version 4.3.1-0york0~18.04
@aminyazdanpanah
Copy link
Member

I will check this issue later but the code uses this function to calculate width and height.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants