Ypimagepicker: Black space on video after recorded via YPImagePicker

Created on 7 Mar 2020  路  12Comments  路  Source: Yummypets/YPImagePicker

I have a problem when a video recorded via YPImagePicker, check this video please

https://drive.google.com/open?id=1p7dBU6w-i_VE8adQPscO0tinV0Sh5yqW

There is a strange black space under the video and it is not in expected sizes

Most helpful comment

I'm also experiencing this only with videos taken with YPPicker, It looks like it's cutting off the top portion of the video. It not only does this in the trim preview but also in the final video as well.

All 12 comments

I'm seeing the same issue.

Anyone here? @s4cha

I'm also experiencing this only with videos taken with YPPicker, It looks like it's cutting off the top portion of the video. It not only does this in the trim preview but also in the final video as well.

Plus one!

Plus one!

Plus one!

I guess this project is no longer maintained

Find this line of code:
let t1 = CGAffineTransform(translationX: clipVideoTrack.naturalSize.height, y: -(clipVideoTrack.naturalSize.width - clipVideoTrack.naturalSize.height) / 2)

and change it to:
let t1 = CGAffineTransform(translationX: clipVideoTrack.naturalSize.height, y: 0)

Find this line of code:
let t1 = CGAffineTransform(translationX: clipVideoTrack.naturalSize.height, y: -(clipVideoTrack.naturalSize.width - clipVideoTrack.naturalSize.height) / 2)

and change it to:
let t1 = CGAffineTransform(translationX: clipVideoTrack.naturalSize.height, y: 0)

Thanks It worked!

Find this line of code:
let t1 = CGAffineTransform(translationX: clipVideoTrack.naturalSize.height, y: -(clipVideoTrack.naturalSize.width - clipVideoTrack.naturalSize.height) / 2)
and change it to:
let t1 = CGAffineTransform(translationX: clipVideoTrack.naturalSize.height, y: 0)

Thanks It worked!

I think, if
"YPConfig.onlySquareImagesFromCamera" is true, then
let t1 = CGAffineTransform(translationX: clipVideoTrack.naturalSize.height, y: -(clipVideoTrack.naturalSize.width - clipVideoTrack.naturalSize.height) / 2)
is right; when it's false, then we should use:
let t1 = CGAffineTransform(translationX: clipVideoTrack.naturalSize.height, y: 0)

@s4cha can you please update the project with this fix?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DamascenoRafael picture DamascenoRafael  路  5Comments

esabunor picture esabunor  路  5Comments

javiermanzo picture javiermanzo  路  6Comments

pngo-hypewell picture pngo-hypewell  路  7Comments

nickeyzzz picture nickeyzzz  路  6Comments