Skip to content
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

Broken result video in any width more than 80 #8

Open
normaliok opened this issue Mar 22, 2022 · 9 comments
Open

Broken result video in any width more than 80 #8

normaliok opened this issue Mar 22, 2022 · 9 comments

Comments

@normaliok
Copy link

When I change width value in convert.py to any value not equal 80 the result video looks broken

@CatKasha
Copy link

Did you use convert.py in Windows? Maybe width of command prompt / terminal is lower or not equal to width of video

@normaliok
Copy link
Author

Did you use convert.py in Windows? Maybe width of command prompt / terminal is lower or not equal to width of video

No, I'm using Ubuntu and make an exe file for windows. I didn't mean video looks like a noise of characters in console window - of course I have to adjust window size to get a correct image. But when I try to use a different width (not 80) generated video is really short and has no any correct frames

@CatKasha
Copy link

CatKasha commented Mar 22, 2022

Ah, i saw this issue. Did you match fps and width parameters in both convert.py and playback.c?
To calculate HEIGHT in playback.c you need calculate it via this (width / (2 * (16 / 9))) and round down result number

@normaliok
Copy link
Author

Ah, i saw this issue. Did you match fps and width parameters in both convert.py and playback.c? To calculate HEIGHT in playback.c you need calculate it via this (width / (2 * (16 / 9))) and round result number down

But HEIGHT is commented in playback.c Should I uncomment it first?

@CatKasha
Copy link

#define in C lang is not a comment, compiler will replace all HEIGHT with that number in the code when you compile your program

@normaliok
Copy link
Author

#define in C lang is not a comment, compiler will replace all HEIGHT with that number in the code when you compile your program

Just have tested - no success. What is correct height for width=120? 34?

@CatKasha
Copy link

CatKasha commented Mar 22, 2022

(120 / (2 * (16 / 9))) = 33.75, round down, 33

@normaliok
Copy link
Author

(120 / (2 * (16 / 9))) = 33.75, round down, 33

Nice! It works now!

@AverseABFun
Copy link

(120 / (2 * (16 / 9))) = 33.75, round down, 33

Nice! It works now!

close the issue then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants