MyrikLD / LinusTrinus

TrinusVR streaming server for Linux
127 stars 16 forks source link

Solved! Phone/head too big/small (lens renders both eyes squeezed on the bottom half of the screen) #41

Open SaintAnd opened 1 year ago

SaintAnd commented 1 year ago

Why is a small window broadcast, as if one lens is felt, and the second seems to be felt as being located outside the borders. How to fix it? Two problems, a small lens, the second lens seems to be gone.

Screenshot: https://ibb.co/4s1Tf7d

Changed different data in ffmpeg_fg.py and frame_generator.py fork

SaintAnd commented 1 year ago

How decide it error.

  1. Install wine
  2. Install Trinus for windows on wine (version for Google Cardboard)
  3. Start Trinus (cd $PATH_TO_TRINUS && wine TGServer.exe
  4. Press "Start" in program and press start "trinus" on android, then activate this
  5. When will be connect program and device you can change "Head mount" in top "Main".
  6. Exit Trinus on wine
  7. Start LinusTrinus and enjoy P.S. If you want change your own size. Edit TGServer.exe.config in $PATH_TO_TRINUS. In Line 29 change "[{"name":"Default_Any"," and other parametrs P.S.S. Sorry form my bad English
izzijaz commented 1 year ago

How decide it error.

  1. Install wine
  2. Install Trinus for windows on wine (version for Google Cardboard)
  3. Start Trinus (cd $PATH_TO_TRINUS && wine TGServer.exe
  4. Press "Start" in program and press start "trinus" on android, then activate this
  5. When will be connect program and device you can change "Head mount" in top "Main".
  6. Exit Trinus on wine
  7. Start LinusTrinus and enjoy P.S. If you want change your own size. Edit TGServer.exe.config in $PATH_TO_TRINUS. In Line 29 change "[{"name":"Default_Any"," and other parametrs P.S.S. Sorry form my bad English

Does this work?

izzijaz commented 1 year ago

Screenshot_2023-04-06-15-57-17-097_com.loxai.trinus.full.jpg

After doing so i got this very weird video output.

SaintAnd commented 1 year ago

Yes, it's working for me. In app you need turn off any function. Now I install it's app and will write here

SaintAnd commented 1 year ago

Screenshot_2023-04-06-15-57-17-097_com.loxai.trinus.full.jpg

After doing so i got this very weird video output.

You need turn off lens in android app. "Lens Off" https://ibb.co/jMKFW2B IMG_20230406_141754

izzijaz commented 1 year ago

Screenshot_2023-04-06-15-57-17-097_com.loxai.trinus.full.jpg

After doing so i got this very weird video output.

This is after enabling lens in the app. How to properly configure this

SaintAnd commented 1 year ago

Disable lens. After disabling the lens function, ffmpeg will work and additionally make a picture from instead of this disabled function.

izzijaz commented 1 year ago

Disable lens. After disabling the lens function, ffmpeg will work and additionally make a picture from instead of this disabled function.

Without the lens option enabled the picture is just a flat image and not suitable for vr. Very difficult to see

SaintAnd commented 1 year ago

@izzijaz I remembered. I made a possible use of lens warp with ffmpeg but didn't add how to do it here. I'll try to add it soon

SaintAnd commented 1 year ago

@izzijaz https://github.com/SaintAnd/LinusTrinus Try this repository. Maybe I add here

Yes, I edited this repositories. You can edit frame_generator/ffmpeg_double_fg.py next string: 73 ("filter_complex", f'split[lenl][lenr];[lenl]crop=iw/2:ih:iw/2:0,lenscorrection=k1=0.58101:k2=0[a];[lenr]crop=iw/2:ih:0:0,lenscorrection=k1=0.58101:k2=0[b];[b][a]hstack'),

And edit lenscorrection.

Maybe you need update ffmpeg to new version with support lenscorrection plugin

izzijaz commented 1 year ago

@izzijaz https://github.com/SaintAnd/LinusTrinus Try this repository. Maybe I add here

Yes, I edited this repositories. You can edit frame_generator/ffmpeg_double_fg.py next string: 73 ("filter_complex", f'split[lenl][lenr];[lenl]crop=iw/2:ih:iw/2:0,lenscorrection=k1=0.58101:k2=0[a];[lenr]crop=iw/2:ih:0:0,lenscorrection=k1=0.58101:k2=0[b];[b][a]hstack'),

And edit lenscorrection.

Maybe you need update ffmpeg to new version with support lenscorrection plugin

Is there a setting for Vr Box lens?

SaintAnd commented 1 year ago

@izzijaz Yes you are right. This line is responsible for displaying the image and where you can distort the image for a specific helmet as you like.

izzijaz commented 1 year ago

@izzijaz Yes you are right. This line is responsible for displaying the image and where you can distort the image for a specific helmet as you like.

Is there a reference list i can refer to for the values for different headsets. For example thr k1 value for vr box

SaintAnd commented 1 year ago

Is there a reference list i can refer to for the values for different headsets. For example thr k1 value for vr box

Did you manage to use my repository to customize the image output on a smartphone?

Answering your question, I will say that this is an experimental setting and you can only manually select the screen distortion by changing the values ​​in that seventy-third line.

You can install Trinus Cardboard VR for windows via windows, wine, playonlinux, lutris and so on. Then use the configuration file TGServer.exe.config . There is line 29 with this beginning:

{"profiles":[{"name":"Default Simulator" ... [{"name":"Default_Any","scaleX":"146928","scaleY":"230000" ... {"name":"Cardboard_4.7'","scaleX":"151928","scaleY":"250000" ... where you can try to take values from here and convert somehow for changes in ffmpeg_double_fg.py and line 73 from ffmpeg with lenscorrection.
izzijaz commented 1 year ago

Is there a reference list i can refer to for the values for different headsets. For example thr k1 value for vr box

Did you manage to use my repository to customize the image output on a smartphone?

Answering your question, I will say that this is an experimental setting and you can only manually select the screen distortion by changing the values ​​in that seventy-third line.

You can install Trinus Cardboard VR for windows via windows, wine, playonlinux, lutris and so on. Then use the configuration file TGServer.exe.config . There is line 29 with this beginning: {"profiles":[{"name":"Default Simulator" ... [{"name":"Default_Any","scaleX":"146928","scaleY":"230000" ... {"name":"Cardboard_4.7'","scaleX":"151928","scaleY":"250000" ... where you can try to take values from here and convert somehow for changes in ffmpeg_double_fg.py and line 73 from ffmpeg with lenscorrection.

Lens distortion effect is acheived. Now have to configure the distortion parameters to adjust to my VR Box (https://computerplus.com.mv/wp-content/uploads/2022/03/51EULAnjaXL._AC_SL1128_web-600x600.png)

SaintAnd commented 1 year ago

Is there a reference list i can refer to for the values for different headsets. For example thr k1 value for vr box

Did you manage to use my repository to customize the image output on a smartphone? Answering your question, I will say that this is an experimental setting and you can only manually select the screen distortion by changing the values ​​in that seventy-third line. You can install Trinus Cardboard VR for windows via windows, wine, playonlinux, lutris and so on. Then use the configuration file TGServer.exe.config . There is line 29 with this beginning: {"profiles":[{"name":"Default Simulator" ... [{"name":"Default_Any","scaleX":"146928","scaleY":"230000" ... {"name":"Cardboard_4.7'","scaleX":"151928","scaleY":"250000" ... where you can try to take values from here and convert somehow for changes in ffmpeg_double_fg.py and line 73 from ffmpeg with lenscorrection.

Lens distortion effect is acheived. Now have to configure the distortion parameters to adjust to my VR Box (https://computerplus.com.mv/wp-content/uploads/2022/03/51EULAnjaXL._AC_SL1128_web-600x600.png)

I'm glad that you managed to achieve lens distortion. I don't have a helmet like you have in the picture right now, so I hope you can do it the best you can, but take care of your eyes, because these things are not safe in my opinion. ────────────────────── █──██████────██████──█ █─██────██──██────██─█ ─███─██─██████─██─███─ ──██────██──██────██── ───██████────██████───

izzijaz commented 1 year ago

Is there a reference list i can refer to for the values for different headsets. For example thr k1 value for vr box

Did you manage to use my repository to customize the image output on a smartphone? Answering your question, I will say that this is an experimental setting and you can only manually select the screen distortion by changing the values ​​in that seventy-third line. You can install Trinus Cardboard VR for windows via windows, wine, playonlinux, lutris and so on. Then use the configuration file TGServer.exe.config . There is line 29 with this beginning: {"profiles":[{"name":"Default Simulator" ... [{"name":"Default_Any","scaleX":"146928","scaleY":"230000" ... {"name":"Cardboard_4.7'","scaleX":"151928","scaleY":"250000" ... where you can try to take values from here and convert somehow for changes in ffmpeg_double_fg.py and line 73 from ffmpeg with lenscorrection.

Lens distortion effect is acheived. Now have to configure the distortion parameters to adjust to my VR Box (https://computerplus.com.mv/wp-content/uploads/2022/03/51EULAnjaXL._AC_SL1128_web-600x600.png)

I'm glad that you managed to achieve lens distortion. I don't have a helmet like you have in the picture right now, so I hope you can do it the best you can, but take care of your eyes, because these things are not safe in my opinion. ────────────────────── █──██████────██████──█ █─██────██──██────██─█ ─███─██─██████─██─███─ ──██────██──██────██── ───██████────██████───

I have tried this after a while today, When steam vr starts, using ur rep, the steamvr windows shows in my phone and also my desktop also shows. Its not just taking SteamVR Compositor but the whole screen is still being mirrored

SaintAnd commented 1 year ago

Is there a reference list i can refer to for the values for different headsets. For example thr k1 value for vr box

Did you manage to use my repository to customize the image output on a smartphone? Answering your question, I will say that this is an experimental setting and you can only manually select the screen distortion by changing the values ​​in that seventy-third line. You can install Trinus Cardboard VR for windows via windows, wine, playonlinux, lutris and so on. Then use the configuration file TGServer.exe.config . There is line 29 with this beginning: {"profiles":[{"name":"Default Simulator" ... [{"name":"Default_Any","scaleX":"146928","scaleY":"230000" ... {"name":"Cardboard_4.7'","scaleX":"151928","scaleY":"250000" ... where you can try to take values from here and convert somehow for changes in ffmpeg_double_fg.py and line 73 from ffmpeg with lenscorrection.

Lens distortion effect is acheived. Now have to configure the distortion parameters to adjust to my VR Box (https://computerplus.com.mv/wp-content/uploads/2022/03/51EULAnjaXL._AC_SL1128_web-600x600.png)

I'm glad that you managed to achieve lens distortion. I don't have a helmet like you have in the picture right now, so I hope you can do it the best you can, but take care of your eyes, because these things are not safe in my opinion. ────────────────────── █──██████────██████──█ █─██────██──██────██─█ ─███─██─██████─██─███─ ──██────██──██────██── ───██████────██████───

I have tried this after a while today, When steam vr starts, using ur rep, the steamvr windows shows in my phone and also my desktop also shows. Its not just taking SteamVR Compositor but the whole screen is still being mirrored

Yes, I kind of removed the steam capture function. But it can be returned, you just need to find it in the code.

SaintAnd commented 1 year ago

This setting is in xwd_fg.py on line 54 of this text: window_id = self.find_window_id("SteamVR Compositor") You need to look at the name of your process in the task manager

izzijaz commented 1 year ago

This setting is in xwd_fg.py on line 54 of this text: window_id = self.find_window_id("SteamVR Compositor") You need to look at the name of your process in the task manager

It is set to steamvr compositor

SaintAnd commented 1 year ago

You need install xwininfo and xwd if it didn't install before After then edit main.py string 25: Replace FRAMEGEN_FFMPEG to FRAMEGEN_XWD

But I don't know now how to edit this windows with lenscorrections

izzijaz commented 1 year ago

You need install xwininfo and xwd if it didn't install before After then edit main.py string 25: Replace FRAMEGEN_FFMPEG to FRAMEGEN_XWD

But I don't know now how to edit this windows with lenscorrections

I will try this, didn't read this part yesterday. Will let you know if i run into any problems.

izzijaz commented 1 year ago

Extremely nausiating this mode FRAMEGEN_XWD. THE image is doubled also. not one singular image when viewing through Gear. Is the distance between the images adjustable?

izzijaz commented 1 year ago

My game LFS could not initialise SteamVR. I think i should switch to windows for gaming. Linux is currently a pain in the a** when it comes to VR and these related. Not much ease of use or compatibility yet.