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

Feature 3D SBS mode (not found in any existing media players) #127

Closed
wants to merge 3 commits into from

Conversation

rtrded
Copy link

@rtrded rtrded commented Sep 8, 2019

Steroscopic 3D video and images (Specifically, Side by Side) usually need to be edited in some software before they can be presented on a 3D TV as the left and right halves of the image must be "squshed" horisontally in place (so a large black column appears in the middle and two smaller columns on the left and right edge).

Additionally, fine adjustments to the seperation and the left/right eye elevation need to be made to correct for lens calibration issues with the source recording.

Currently there is no playback software which allows the user to make these adjustments to the source video in real time. This feature provides all this functionality allowing raw 3D SBS content to be viewed on a TV without the need of recompression and time consuing video/image editing

The keys for controlling all this are within the hot key screen at the bottom and are currently mapped in a similar form to the WASD movement but using the IJKL keys to avoid conflicing with more critical keys.

I and K shift the left eye up/down and the right eye down/up
J and L shift the eyes apart and closer together.
The top left and right of these keys are the U and O keys which shrink and enlarge the left and right images.
Over to the left, the 'S' key enables and disables the horisontal Squish of each eye. This is default to enabled.
The purpose is in case someone has pre-squished left and right eyes but wants to adjust the seperation/elevation.

To enable/disable all this 3D functionality, simply press the '3' key.

A sample 3D SBS image is included for testing.

Note: It works best with video because images only draw once so changes made to the 3D settings only update on screen if the window is resized.

Note: There was an error when I was trying to compile the latest source before doing this work in MainFrm.cpp so I did a hacky fix (type casting CComQIPtr pBF = (CComQIPtr)(bIsSplitter ? (CComQIPtr) pSS : (CComQIPtr)pObject); )

Note: I made this change on the original MPC-HC source accidentally when I meant to use the latest from the clsid2 fork. I have an identicle pull request to the original source as well if that helps see the exact changes I made clearer.

mpc-hc#207

SBS_3D_Sample_Image
1
2
3
4
5
6
7

Nevcairiel and others added 2 commits February 7, 2018 13:27
…need to be edited in some software before they can be presented on a 3D TV as the left and right halves of the image must be "squshed" horisontally in place (so a large black column appears in the middle and two smaller columns on the left and right edge).

Additionally, fine adjustments to the seperation and the left/right eye elevation need to be made to correct for lens calibration issues with the source recording.
Currently there is no playback software which allows the user to make these adjustments to the source video in real time.
This feature provides all this functionality allowing raw 3D SBS content to be viewed on a TV without the need of recompression and time consuing video/image editing

The keys for controlling all this are within the hot key screen at the bottom and are currently mapped in a similar form to the WASD movement but
using the IJKL keys to avoid conflicing with more critical keys.

I and K shift the left eye up/down and the right eye down/up
J and L shift the eyes apart and closer together.
The top left and right of these keys are the U and O keys which shrink and enlarge the left and right images.
Over to the left, the 'S' key enables and disables the horisontal Squish of each eye. This is default to enabled.
The purpose is in case someone has pre-squished left and right eyes but wants to adjust the seperation/elevation.

To enable/disable all this 3D functionality, simply press the '3' key.

A sample 3D SBS image is included for testing.

Note: There was an error when I was trying to compile the latest source before doing this work in MainFrm.cpp so I did a hacky fix (type casting  CComQIPtr<IBaseFilter> pBF = (CComQIPtr<IBaseFilter>)(bIsSplitter ? (CComQIPtr<IBaseFilter>) pSS : (CComQIPtr<IBaseFilter>)pObject); )
@rtrded rtrded changed the title Feature sbs 3 d mode Feature 3D SBS mode (not found in any existing media players) Sep 8, 2019
@rtrded
Copy link
Author

rtrded commented Sep 8, 2019

MainFrm.h got reverted somehow so that file's changes are missing. Just rewriting that code and will then do a commit.

Improved the shifting code in the renderer so it scales correctly when the window resizes.
Adding the missing MainFrm.h file changes.
Removed the Next Subtitle key binding so it doesn't clash with the Squish key. (yes, controversial, happy to use a different key, just doing this for now to fix the clash)
@rtrded
Copy link
Author

rtrded commented Sep 8, 2019

Removed the sample image from the repo.
Improved the shifting code in the renderer so it scales correctly when the window resizes.
Adding the missing MainFrm.h file changes.
Removed the Next Subtitle key binding so it doesn't clash with the Squish key. (yes, controversial, happy to use a different key, just doing this for now to fix the clash)

@clsid2
Copy link
Owner

clsid2 commented Sep 8, 2019

I am not really interested in adding exotic options for wrongly encoded files. I mean how common are such files?

Replacing existing hotkeys is unacceptable. "3" is already in use (Menu>View>Presets).

@rtrded
Copy link
Author

rtrded commented Sep 8, 2019

Yeh, I mentioned on the ticket here that I'm happy to change the hotkeys to we see fit.
https://trac.mpc-hc.org/ticket/6638#comment:1

Here are three use cases:

My camera has a 3D lens which if the camera is perfectly level then you have to tip your head to see the 3D image. Being able to offset one eye against the other vertically without having to run the raw video through a video editor and mess about rencoding is a god send. (why I spent 4 days doing this).

3D Cameras often produce videos deigned for you to view with a hand held prism lens thing. The actual images are not "squished". To view these on a TV which normally assumes videos are "squished" when given in SBS format, you need to run them through a video editor and splice the video in half, seperate them so they are 25% offset in each direction and then squish them 50% each. This is annoying, time consuming and means you need two copies for your video. Being able to watch 3D videos from a camera nativly on your 3D TV is another god send. (again, why I spent 4 days doing this feature)

Some (but not all) 3D TVs have the ability to adjust the seperation of the images. By having this in the player it means anyone can do this regardless of their TV.

I'm well aware the way the hotkeys have been done has made this seem like this feature is meant to be "front and center" but that is not my goal at all. I discreetly added the feature in the hot keys menu only below everything elese. The only thing I've done wrong which I'm fully aware of and keen to fix, is using hot key buttons that are already assigned to things such as 'O' for opening the options menu and 'S' for advancing the Substitles. I checked '3' and it doesn't appear to be in use for me although I was checking the original MPC-HC and not the forked clsid2 version.

@rtrded
Copy link
Author

rtrded commented Sep 8, 2019

1 second example video clip from a 3D camera.

PANA2040.zip

@rtrded
Copy link
Author

rtrded commented Sep 8, 2019

One other reason, my mum has a lazy eye which means one eye droops a little. She finds if the right eye on a 3D image is raised, it makes watching 3D actually 3D.

@rtrded
Copy link
Author

rtrded commented Sep 8, 2019

Also, we do have stretch/squish a speed and offset ability for 2D content. So it doesn't seem too ureasonable to have that same functionality for 3D content.

@rtrded
Copy link
Author

rtrded commented Sep 8, 2019

Found an issue during testing - only right eye shows if 10bit output is enabled.

@clsid2 clsid2 closed this Nov 15, 2019
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

Successfully merging this pull request may close these issues.

None yet

3 participants