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

Video doesn't open in PC after File.Move / File.Copy / Sending in to the Server #113

Open
WarriorWork opened this issue Jan 16, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@WarriorWork
Copy link

WarriorWork commented Jan 16, 2024

Video doesn't open on PC after File.Move / File.Copy / Send into the Server:
It occurs sometimes and is not persistent, most of the time it doesn't work all right.
I get errors like this one
image

  • Unity version: 2020.3.15f2
  • Platform: Android / iOS
  • Device: Xioami 12, iPad Air
  • How did you download the plugin: through the Asset Store
@WarriorWork WarriorWork added the bug Something isn't working label Jan 16, 2024
@yasirkula
Copy link
Owner

Does the file have an extension?

@WarriorWork
Copy link
Author

WarriorWork commented Jan 17, 2024

Yeah of course .mp4
Ok I think I have some progress
Now on Android, it works on medium Quality (I assume that the Low Quality made the problem)
However, I tried the same on iOS and the video was saved in our server but has the same issue I mentioned in the top...

Does the file have an extension?

@yasirkula
Copy link
Owner

Can you play the video in VideoPlayer or via the example code's Handheld.PlayFullScreenMovie function on Android/iOS? This may be a codec issue. The video may be recorded in HEVC format. I'd try playing it with MPC-HC on PC since it supports lots of codecs.

@WarriorWork
Copy link
Author

Can you play the video in VideoPlayer or via the example code's Handheld.PlayFullScreenMovie function on Android/iOS? This may be a codec issue. The video may be recorded in HEVC format. I'd try playing it with MPC-HC on PC since it supports lots of codecs.

Yeah, it seems codecs issues! because when I run the video on the browser or via VLC and not via Media Player, it works!
So firstly thank you.
Additionally, if you have got any idea of how to solve it, Ill be happy to hear that...
The problem is when I transfer the video to the Server (via UnityWebRequest) it wouldn't open via Media Player :)
Thank you!

@WarriorWork
Copy link
Author

Can you play the video in VideoPlayer or via the example code's Handheld.PlayFullScreenMovie function on Android/iOS? This may be a codec issue. The video may be recorded in HEVC format. I'd try playing it with MPC-HC on PC since it supports lots of codecs.

Do you know if I can controll the codec by the NativeCamera plugin or in another way?
As I see the most popular codec is H.265... can I achieve that?

@yasirkula
Copy link
Owner

I couldn't find a way to explicitly specify the codec to use. As you've said, changing the quality may indirectly affect the codec. I'd expect this to be consistent on iOS devices but not on Android devices. I think you need either a native code on the device that converts the video from the recorded format to the desired format, or a code that does the same on the server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants