hxCodec icon indicating copy to clipboard operation
hxCodec copied to clipboard

video disappears when resizing it

Open Sirox0 opened this issue 3 years ago • 15 comments

i need to resize video sprite, to make it smaller, but whenever i call setGraphicSize to videosprite or to videosprite.bitmap or to videohandler, video picture just disappears, i tried to graphic size it without updateHitbox(); result is the same.

Sirox0 avatar Sep 11 '22 06:09 Sirox0

IMG_20220911_114834 this appears in logs when i use setGraphicSize (forgot to say, that all of that i'm doing on android)

Sirox0 avatar Sep 11 '22 08:09 Sirox0

IMG_20220911_114834 this appears in logs when i use setGraphicSize (forgot to say, that all of that i'm doing on android)

Is that everything on the logs? And can you still hear the video?

polybiusproxy avatar Sep 11 '22 09:09 polybiusproxy

Is that everything on the logs?

there's like 5 another copies of the same log of File reading failed + Vlc could not open the file ..........system_fonts.xml (is on screenshot), but they're not changing anything, they are there even without setGraphicSize and video is working with them :/

Sirox0 avatar Sep 11 '22 09:09 Sirox0

can you still hear the video?

i just tested, audio is still there and working fine

Sirox0 avatar Sep 11 '22 09:09 Sirox0

can you still hear the video?

i just tested, audio is still there and working fine

You must also resize the video. With the VideoSprite class, use bitmap.set_width and bitmap.set_height.

polybiusproxy avatar Sep 11 '22 09:09 polybiusproxy

can you still hear the video?

i just tested, audio is still there and working fine

You must also resize the video. With the VideoSprite class, use bitmap.set_width and bitmap.set_height.

i'll try it right now

Sirox0 avatar Sep 11 '22 09:09 Sirox0

@polybiusproxy it gives same 3 errors as in setGraphicSize. now, video is not disappearing, but it didn't change it's width nor height at all

Sirox0 avatar Sep 11 '22 09:09 Sirox0

@polybiusproxy it gives same 3 errors as in setGraphicSize. now, video is not disappearing, but it didn't change it's width nor height at all

Can I get a picture of the problem?

polybiusproxy avatar Sep 11 '22 10:09 polybiusproxy

@polybiusproxy it gives same 3 errors as in setGraphicSize. now, video is not disappearing, but it didn't change it's width nor height at all

Can I get a picture of the problem?

focus on "funkin awards" text on blue screen in bg, it's VideoSprite this is how it is now: Screenshot_2022-09-11-13-15-42-346_com coolpeople vshex that is how it should be: Screenshot_2022-09-11-13-13-23-706_com vanced android youtube thats how i call it in code:

var coolingVideo = new VideoSprite(-24, -224);
coolingVideo.bitmap.canSkip = false;
coolingVideo.playVideo(Paths.video('coolingVisualizer'), false, false);
//coolingVideo.setGraphicSize(945, 472);
coolingVideo.antialiasing = true;
coolingVideo.scrollFactor.set(0.9, 0.9);
coolingVideo.bitmap.set_width(150);
coolingVideo.bitmap.set_height(75);
coolingVideo.width = 150;
coolingVideo.height = 75;
//coolingVideo.updateHitbox();
add(coolingVideo);

whenever i call setGraphicSize that is now commented, i have those 3 errors with zoom, source AR and ViewPoint and video disappears. with bitmap.set_width etc. video not disappering, but those 3 errors are still there and video resolution is still the same as it was before i even tried to setGraphicSize it. if i remove graphic sizing and bitmap.set_width etc things, those 3 errors are gone, that means, that those are errors of resizing the video.

Sirox0 avatar Sep 11 '22 10:09 Sirox0

does the issue still occur now?

JonnycatMeow avatar Sep 13 '22 16:09 JonnycatMeow

@ItsyourboyJonnycat @polybiusproxy nothing changed after last commit, i added coolingVideo.bitmap.canUseAutoResize = false; but same log and same no resolution change when calling set_width and set_height (setGraphicSize kills videosprite like usual)

Sirox0 avatar Sep 13 '22 21:09 Sirox0

@ItsyourboyJonnycat @polybiusproxy nothing changed after last commit, i added coolingVideo.bitmap.canUseAutoResize = false; but same log and same no resolution change when calling set_width and set_height (setGraphicSize kills videosprite like usual)

I don't really know how to fix this, so help would be required.

polybiusproxy avatar Sep 14 '22 14:09 polybiusproxy

@polybiusproxy try to remove stage3d rendering and return old one, maybe it would work (in hex for windows, that uses old system, it somehow worked?)

Sirox0 avatar Sep 14 '22 17:09 Sirox0

@polybiusproxy try to remove stage3d rendering and return old one, maybe it would work (in hex for windows, that uses old system, it somehow worked?)

Maybe a switch between Stage3D and BitmapData will do it... Could you try to revert commit 46d5f3e on your local machine?

polybiusproxy avatar Sep 14 '22 17:09 polybiusproxy

i tried a moment ago, result is the same

Sirox0 avatar Sep 14 '22 19:09 Sirox0

is the problem still occurring?

JonnycatMeow avatar Nov 17 '22 17:11 JonnycatMeow

is the problem still occurring?

no changes that can affect this were done, so yes...

Sirox0 avatar Nov 17 '22 17:11 Sirox0

well is fixed now?

JonnycatMeow avatar Jan 14 '23 18:01 JonnycatMeow

This issue got fixed rn

MAJigsaw77 avatar Jan 15 '23 23:01 MAJigsaw77

You can simply use canvas Width or Height before the video to play then you can normally use width or height from FlxSprite.

MAJigsaw77 avatar Jan 15 '23 23:01 MAJigsaw77