Log in or register to post comments

Video Playback Mirrored

February 25, 2016 - 6:10am #1

Hello All,

When build and run my app (which is using the Video Playback), the video is displaying as mirrored (as shown below). Any idea why it is doing that?

Image result for mirrored text

 

Thanks.

 

 

Video Playback Mirrored

October 9, 2016 - 6:27am #5

Hi, i also have the same problem, i followed the steps here: https://developer.vuforia.com/forum/faq/android-how-do-i-add-another-target-video-playback-sample and added my own video.

 

However the video is displayed mirrored and and upside down. I tried to find where to put the code 

Hi, i also have the same problem, i followed the steps here: https://developer.vuforia.com/forum/faq/android-how-do-i-add-another-target-video-playback-sample and added my own video.</p>
<p>However the video is displayed mirrored and and upside down. I tried to find where to put the code [quote
wrote:

if (isPlayableOnTexture)

   {

    // Pass the video texture id to the video player

    mVideoPlayer.SetVideoTexturePtr(mVideoTexture.GetNativeTexturePtr());

    // Get the video width and height

    int videoWidth = mVideoPlayer.GetVideoWidth();

    int videoHeight = mVideoPlayer.GetVideoHeight();

    if (videoWidth > 3 && videoHeight > 3)

    {

     // Scale the video plane to match the video aspect ratio

     float aspect = videoHeight / (float)videoWidth;

     // Flip the plane as the video texture is mirrored on the horizontal <---This flips it

     transform.localScale = new Vector3(-0.3f, 0.1f, 0.3f * aspect);

    }

 

But i can't figure out where.. I use the lastest version of Vuforia. My guess is it needs to be in the setVideoDimensions() class? Eitherway it says it cannot resolve this line: transform.localScale = new Vector3(-0.3f, 0.1f, 0.3f * aspect); 

 

Video Playback Mirrored

September 26, 2016 - 4:02am #4

I believe that the videos plays default as mirrored. Which version of Vuforia are you using?

 

In the videoPlaybackBehaviour script you need this bit (same as where you scale the videos)

 

if (isPlayableOnTexture)

   {

    // Pass the video texture id to the video player

    mVideoPlayer.SetVideoTexturePtr(mVideoTexture.GetNativeTexturePtr());

    // Get the video width and height

    int videoWidth = mVideoPlayer.GetVideoWidth();

    int videoHeight = mVideoPlayer.GetVideoHeight();

    if (videoWidth > 3 && videoHeight > 3)

    {

     // Scale the video plane to match the video aspect ratio

     float aspect = videoHeight / (float)videoWidth;

     // Flip the plane as the video texture is mirrored on the horizontal <---This flips it

     transform.localScale = new Vector3(-0.3f, 0.1f, 0.3f * aspect);

    }

Video Playback Mirrored

September 24, 2016 - 2:12pm #3

Hey did you ever figure this one out?  I am having the same problem.

 

Video Playback Mirrored

March 5, 2016 - 4:30am #2

Any ideas and thoughts anyone?

Log in or register to post comments