This is a feature request that I had in my own use of the module. I wanted to take the user-uploaded video, and shrink it down using a maximum width and maximum height that I needed to be able to specify myself. This helps to keep the video file sizes down in my scenario. I thought I would attempt to contribute it to the module, if others think it would be a good addition to the existing features (fingers crossed).

Patch Features:

  • Adds a "Video Maximum Dimensions" textbox to the admin form
    • This allows any uploaded videos to be resized to the admin's specifications
  • Adds a function "_flashvideo_video_resize"
    • This measures the uploaded video's size using an ffmpeg command
    • This will add a -s sizing parameter to the ffmpeg command during conversion
    • The function uses mathematics to maintain proper aspect ratio of the video during the resize
  • Makes a small addition to the $command so that $ffmpeg_data variable is filled in with the result of the command. (I would consider this a bug fix. The "Data:" message seemed to be continuously empty for me in the ffmpeg_data table.)

This patch is for the latest release of FlashVideo (6.x-1.4-rc2).

Comments

attheshow’s picture

The first version of the patch needed a slight adjustment to prevent an error. New version attached.

travist’s picture

Good stuff!!! I will test this out and let you know if it will be added (although, I am sure it will).

Thanks for your efforts!

travist’s picture

Status: Needs review » Fixed

Added to version 1.4!!! Thanks attheshow!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

mrjavum’s picture

Version: 6.x-1.4-rc2 » 6.x-1.4
Category: feature » bug
Status: Closed (fixed) » Active

Not working with other path, differ from /usr/bin/ffmpeg:
$movie_info = shell_exec('/usr/bin/ffmpeg -i "'.$input_file.'" 2>&1');
here must be a path from Flashvideo settings

attheshow’s picture

Assigned: Unassigned » attheshow
Status: Active » Fixed

Just committed fix for this.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.