cbm80amiga / ST7735_SDVideoPlayback

Smooth video playback from SD on STM32 and ST7735
GNU Lesser General Public License v3.0
34 stars 16 forks source link

video not working as espected #3

Open mrbbp opened 3 years ago

mrbbp commented 3 years ago

Hello i'm trying to use your videoplayback with an stm32

but after many try i've got a stable video but all pixel are not in place. it seems there is a 20 or 30px shift rigth to left (up/down) in the picture top part is the bottom part of the picture and there is no 3 black line (in the top/bottom part)

20210219_150345

Is it a screen pb? or a video encoding pb or can it be shift by code?

have you a video test somewere to test if it's my video or the screen? i used this line to encode my video with ffmpeg (i've tried with other video and there is the same banding problem) ffmpeg -i video_160120_30.mov -vf "scale=160:120" -vcodec rawvideo -f rawvideo -pix_fmt rgb565 video.raw

regards

mrbbp commented 3 years ago

Have to shift video in the screen with a larger video 200px... therfore i modified your code a beat.

for(int j=0;j<nl;j++) lcd.drawImage(x,y+(i*nl+j+(statMode>0?0:4)),wd,1,buf+20+j*wd);

mrbbp commented 3 years ago

for(int j=0;j<nl;j++) lcd.drawImage(x,y+(i*nl+j+(statMode>0?0:4)),wd,1,buf+20+j*wd); why do you add this part buf+20+j*wd to your buffer? i do not understand this line. On your other project SDMediaPlayer, showVideo function only have lcd.drawImage(0,i*nl,lcd.width(),nl,buf);

jhonnyx161 commented 3 years ago

for(int j=0;j<nl;j++) lcd.drawImage(x,y+(i*nl+j+(statMode>0?0:4)),wd,1,buf+20+j*wd); ¿Por qué agrega esta parte buf+20+j*wda su búfer? No entiendo esta línea. En su otro proyecto SDMediaPlayer, la función showVideo solo tiene lcd.drawImage(0,i*nl,lcd.width(),nl,buf);

hola que formato de video usas