Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Attached file original size is 256x240
Target dimension is 1280x720
Aspect mode is 'preserve'
Result size is 86x720
Expected Result size is 768x720
To fix this issue I make small fix
--- a/transcoders/TranscoderAbstractionFactoryFfmpeg.inc
+++ b/transcoders/TranscoderAbstractionFactoryFfmpeg.inc
@@ -688,7 +688,7 @@
$height = $sourcedimensions[1] * $factor;
}
else {
- $factor = $targetdimensions[1] < $sourcedimensions[1] ? $targetdimensions[1] / $sourcedimensions[1] : $sourcedimensions[1] / $targetdimensions[1];
+ $factor = $targetdimensions[1] > $sourcedimensions[1] ? $targetdimensions[1] / $sourcedimensions[1] : $sourcedimensions[1] / $targetdimensions[1];
$width = $sourcedimensions[0] * $factor;
$height = $targetdimensions[1];
}
Please validate
Comment | File | Size | Author |
---|---|---|---|
#11 | 2642540-patch-video-ffmpeg-transcoder.patch | 1.01 KB | bhawanac |
| |||
video-TranscodersAbstractionFactoryFfmpeg.patch | 784 bytes | andreyks | |
bird.avi | 1.43 MB | andreyks |
Comments
Comment #2
heshanlkComment #7
bhawanac CreditAttribution: bhawanac at Cybage Software Pvt Ltd. commentedI will starting working on this issue.
Comment #8
bhawanac CreditAttribution: bhawanac at Cybage Software Pvt Ltd. commentedI am working on it.
Comment #9
chaitanya17 CreditAttribution: chaitanya17 at Cybage Software Pvt Ltd. for Cybage Software Pvt Ltd. commentedHi bhawanac,
Can you please add use case for testing after implementing patch.
Also make sure your patch is tested by latest version.
Regards
Comment #10
bhawanac CreditAttribution: bhawanac at Cybage Software Pvt Ltd. commented@chaitanya:
I am done with the implementation.
I have tried with video of Resolution as 360*240
Target dimension is 1280x720
Aspect mode is 'preserve'
Result through:
Earlier code: 107 * 720
patch applied: 960 * 720
Comment #11
bhawanac CreditAttribution: bhawanac at Cybage Software Pvt Ltd. commentedThis is the working patch for above issue.
Comment #12
bhawanac CreditAttribution: bhawanac at Cybage Software Pvt Ltd. commentedComment #13
chaitanya17 CreditAttribution: chaitanya17 at Cybage Software Pvt Ltd. for Cybage Software Pvt Ltd. commentedHi bhawanac,
Thanks for patch, I will verify and roll it, if it works properly.
Regards,
Comment #14
chaitanya17 CreditAttribution: chaitanya17 at Cybage Software Pvt Ltd. for Cybage Software Pvt Ltd. commentedComment #15
chaitanya17 CreditAttribution: chaitanya17 at Cybage Software Pvt Ltd. for Cybage Software Pvt Ltd. commented@bhawana, thanks for patch.
Comment #16
chaitanya17 CreditAttribution: chaitanya17 at Cybage Software Pvt Ltd. for Cybage Software Pvt Ltd. commentedChanging status to fixed.
Comment #17
bhawanac CreditAttribution: bhawanac at Cybage Software Pvt Ltd. commented@chaitanya:
Thanks for applying the patch.
But I am not able to see this commit under my profile.