giftvideoplayer icon indicating copy to clipboard operation
giftvideoplayer copied to clipboard

Black Line Issue

Open VineshChauhan24 opened this issue 4 years ago • 9 comments

i have set This giftVideoplayer view in center of screen ad try to set Video from Directory but right side of video i got Black vertical line i have tried with fixed View higeht/ fix aspect ration in device no success

VineshChauhan24 avatar Sep 09 '21 07:09 VineshChauhan24

@VineshChauhan24 I guess it may be your Video source has something rong. For example, It does not comply with the specifications of Alpha video. Alpha video requires a half width on the left side,Same for the right half. Can you upload your video file? Then provide a link to the video file, such as uploading to your github repository.

meikaiss avatar Sep 10 '21 02:09 meikaiss

i have tried in Device with resoution of 1080x1920 it works fine but when i play video in 1080x2340 it get Black line like below ss IMG-20210911-WA0000

VineshChauhan24 avatar Sep 10 '21 07:09 VineshChauhan24

@VineshChauhan24 Can you provide these two video files? One is 1080x1920, the other is 1080x2340. You can upload these two video files into your github repository, then i can download them.

Now, I’m not sure wether it’s the problem of the program or the video resource.

If you can provide video resources, and it turns out to be a program problem, I think I can fix the bug this weekend.

meikaiss avatar Sep 10 '21 07:09 meikaiss

Actually the resolution is of Android Devices not for Video. video's resolution is 1080x960

Video Resolution = 1080x960 Android Device 1 = 1080x1920 (working good) Android Device 2 = 1080 x 2340 (black line issue)

VineshChauhan24 avatar Sep 10 '21 17:09 VineshChauhan24

Hello meikaiss

Same issue of layout video in giftvideoplayer, video source is ok, but some layout or ratio calculation of screen resolution issue , i try so many time solve this but i am failed, please help me out from this issue

Note 10 lite Samsung : 2340 x 1080 Pixels Oppo F15 : 2400 x 1080 Pixels

I checked with so many real device but video overlay not perfect issue of black line, video not perfect overlay position, please sir help out from this issue, i checked in emulator but its working , in real device issue,

===>>> Also please share detail of how can we export video , after overlay video preview how can i export video as mp4 and save file , Or Any option to video with aac audio file and image file add in video background and save it.

Attached video file link here :

https://drive.google.com/drive/folders/18ENxf_Jjsh3DYSEy7Z4eZUq5FnLWx4bS?usp=sharing

Thank You Sir Chirag

chirag9333 avatar Sep 12 '21 11:09 chirag9333

@VineshChauhan24 @chirag9333

Hello two friends, I have proved that it is the problem with the video file. You can look at the code in Module app2 and libgiftplayer2. Please pull the latest code first.

//when set 0.5f, then got Black vertical line giftPlayerView.init(this, "test2.mp4"); //when set 0.4956f, then it is ok. So the alpha video file is bad. giftPlayerView.init(this, "test2.mp4", 0.4956f);

This proves that the left and right are not absolutely equal width. The left width is 0.4956, and right width is 1-0.4956.

meikaiss avatar Sep 13 '21 13:09 meikaiss

Hello meikaiss sir, Thank you for replay,,,

i tried with new code and set 0.4956 but this video work perfect,,, but when i try different video not working show black line,

Alpha Video Perfect working width and height its perfect, because i tested to ffmpeg with overlay command , i am 100% sure no any problem in alpha video, you also check with ffmpeg command i put ffmpeg command and video file in drive please check ,,

https://drive.google.com/drive/folders/18ENxf_Jjsh3DYSEy7Z4eZUq5FnLWx4bS?usp=sharing

i don't know where is miss match size, i think if you fix size in opengl es code , so we can found same solution Also if you need Alpha video part left side separate , this both video also upload in drive

can you please share your contact detail Regarding For Business Work related to Android Opengl ES Devlopment Work, My email : [email protected]

chirag9333 avatar Sep 14 '21 10:09 chirag9333

@chirag9333 0.4956 is only for the specific video file. When you change to anthor video file, I mean you should change to another intermediate position parameter. This is just my conclusion based on the performance of opengs,I am not sure whether It has something wrong about my conclusion.

I have checked your ffmpeg command and video file in drive. It seems that the alpha video is really ok with ffmpeg. I also don't know why. There maybe something wrong in MediaPlayer and OpenGLES.

I provide an idea, You can try to use FFMPEG and OpenGLES to play video, use OpenGLES to solve the synthesis of transparent channel.

I am not sure whether I have enough time for your business work. I'll try my best to help you with small problems.

My email: [email protected]

meikaiss avatar Sep 15 '21 02:09 meikaiss

#6 Try this solution

meikaiss avatar Dec 01 '22 07:12 meikaiss