-
Notifications
You must be signed in to change notification settings - Fork 873
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
Distorted video (iphone) #564
Comments
Could you send us the code you are using? |
Video source: require 'vendor/autoload.php';
$ffmpeg = FFMpeg\FFMpeg::create();
$video = $ffmpeg->open('video.mov');
$video->filters()
->resize(
new FFMpeg\Coordinate\Dimension(600, 600),
FFMpeg\Filters\Video\ResizeFilter::RESIZEMODE_INSET
)
->synchronize();
$video
->frame(FFMpeg\Coordinate\TimeCode::fromSeconds(10))
->save('frame.jpg'); // bad orientation
$video
->save(new FFMpeg\Format\Video\X264(), 'export-x264.mp4'); // bad orientation |
What is happening if you replace |
It does not change anything. The problem is not in the size of the video, but in the fact that it has the wrong orientation. |
But when you try to resize it to 600 x 600, it should be a square and |
The problem is not that the video will be square. In this case, if this video is converted using ffmpeg from the terminal, everything is fine. |
try playing the video using mplayer and ffplay |
I'm experiencing the same issue with vertical iPhone videos. |
Actual Behavior
php-ffmpeg distorts video (iphone)
Expected Behavior
Hello. There is a problem with the horizontal video received from the iphone.
This is a problem for me. I now need to check every video before converting.
ffmpeg -i input.mov -vf 'scale = 320: 320: force_original_aspect_ratio = decrease' output.mp4
This works fine and I expected this behavior for php-ffmpeg, but this does not happen.
Instead, php-ffmpeg thinks this is in the AspectRatio class, instead of doing system ffmpeg.
\ Sorry for my English
The text was updated successfully, but these errors were encountered: