Php-ffmpeg: Video Output is not compressed as expected

Created on 22 Oct 2016  路  5Comments  路  Source: PHP-FFMpeg/PHP-FFMpeg

| Q | A |
| --- | --- |
| Bug? | yes |
| New Feature? | no |
| Version Used | Specific tag or commit sha |
| FFmpeg Version | FFmpeg 2.6.8 |
| OS | Your OS and version |

Actual Behavior

I transcode a MP4 video over 1 minute with disk size: 45.48 MB. The output for Dimension 720p: 14.37MB and output for Dimension 360p is: 14.29 MB

From here: https://www.vimp.com/en/web/faq/items/how-much-disc-space-and-traffic-do-i-need-for-my-videos.html

  • Average video size for 1 min of 720p video: 11 MB
  • Average video size for 1 min of 480p video: 6 MB
  • Average video size for 1 min of 360p video: 4 MB

Expected Behavior

Video disk size for 360p must be smaller

Most helpful comment

@h3242749 Have you tried the same conversion with ffmpeg in cli?

All 5 comments

@h3242749 Have you tried the same conversion with ffmpeg in cli?

@h3242749, any news on this side?
Have you tried @matrunchyk advice?

I find the same issue regarding size.

  1. Is there a way we can get the ffmpeg command that is going to run on the cli via this wrapper ?
  2. or are you guys looking for the ffmpeg command that can do this convertion ?

@harikt

  1. Is there a way we can get the ffmpeg command that is going to run on the cli via this wrapper ?

Yes, just use getFinalCommand instead of save.

  1. are you guys looking for the ffmpeg command that can do this convertion ?

Yes ;)

I did ffmpeg -i <input-file> -s <width>:<height> <output-file> , and the file size reduced for smaller resolutions.

[
    '240p' => [
        'width' => 352,
        'height' => 240,
    ],
    '360p' => [
        'width' => 480,
        'height' => 360,
    ],
    '480p' => [
        'width' => 858,
        'height' => 480,
    ],
    '720p' => [
        'width' => 1280,
        'height' => 720,
    ],
    '1080p' => [
        'width' => 1920,
        'height' => 1080,
    ],
]

The width and height taken from https://www.quora.com/What-are-these-240p-360p-480p-720p-1080p-units-for-videos-Whats-the-basic-idea-behind-it

Was this page helpful?
0 / 5 - 0 ratings

Related issues

iki789 picture iki789  路  7Comments

kminek picture kminek  路  9Comments

Gemorroj picture Gemorroj  路  8Comments

jack-fdrv picture jack-fdrv  路  7Comments

theDTD picture theDTD  路  4Comments