aws-samples / amazon-ivs-broadcast-android-sample

MIT No Attribution
9 stars 8 forks source link

Published video is mirrored when played using ivs player sdk #3

Open 3embed007 opened 2 years ago

3embed007 commented 2 years ago

Have tried adding below lines,to make behaviour similar to ivs sdk,but is there any other way to prevent mirroring(movement of head towards left in broadcast device,shows as movement towards right in player sdk)?

ImagePreviewView preview = ((ImageDevice) device).getPreviewView(BroadcastConfiguration.AspectMode.FILL); preview.setMirrored(false);

bclymer commented 2 years ago

Hi @3embed007 . The setMirrored API on ImagePreviewView only impacts the preview's mirroring, but it will not impact the final video stream. Could you try holding up words to the camera to see if they get rendered backwards in the player SDK?

3embed007 commented 2 years ago

Hi, i totally agree with what you said,the video in player sdk is rendered mirrored,thats why to make it similar to broadcast sdk tried with adding preview.setMirrored(false);.It was just the observation,but numbers are rendered backwards and even movement of head towards left is rendered as towards rights in player sdk.Not sure,if iam missing something,any suggestions shall be highly appreciated.

bclymer commented 2 years ago

What device are you testing on, and what Android version does it have? We have not been able to reproduce that behavior with any of our test devices.

Do you have any other steps that might help us reproduce the issue?

qwaskhaled commented 2 years ago

@bclymer I have the same issue. If I broadcast a video using the front camera then the recorded video will appear flipped on the player SDK. For example, If I turn my head to the right it will appear like I am turning my head to the left when I play it using the player SDK.

I used two devices and both have the same issue - Samsung Galaxy S21 and Xiaomi Note 8 Pro

caleighm commented 2 years ago

Hi, thanks for reaching out!

Can you try the following using the sample app without any code modifications:

  1. Write down the number "7" on a piece of paper
  2. Start broadcasting using the front camera, and hold up the number to the camera

Then, check the following:

In the camera preview on the broadcasting device, does the number appear the right way or is it mirrored? (Expected behavior: mirrored.)

In the playback device, does the number appear the right way or is it mirrored? (Expected behavior: right way.)


If you're seeing the expected behavior, here is the explanation: By default, the broadcast SDK will mirror the front camera preview, but the playback device will show the original, unmirrored video. To change this, you will have to alter the camera preview's mirroring by using the setMirrorred API on the ImagePreviewView. You will want to setMirrored(false) to turn off the default preview mirroring on the broadcast device.

If you're seeing some other behavior, please give us the following information so we can continue to debug:

  1. What behavior are you seeing? Is the "7" mirrored on the broadcast or playback device, or something else entirely?
  2. Are you using the sample app without any code modifications?
  3. If you have made code changes, can you please share what changes you have made?
  4. What version of the broadcast SDK are you using? What is the Android version on your devices?
  5. If possible, can you please share debug logs? (You will need to update the sample app's BroadcastConfiguration.logLevel to DEBUG). Please attach the logs as a file to this ticket, rather than copy/pasting.
  6. If possible, can you also share a video of the behavior on both the broadcast and playback device?

If you're unable to provide some or all of the above information due to confidentiality concerns, please reach out to your business contact at IVS so you can provide the information to us directly.

Thank you so much!