keijiro / KlakHap

HAP video player plugin for Unity
Other
341 stars 27 forks source link

play hap video is ok but cannot hear the sound #8

Closed fingerx closed 5 years ago

fingerx commented 5 years ago

Hello,using klakhap play hap video is ok but cant hear the sound.I use vlc and everything works fine. Is what I missed? thanks

keijiro commented 5 years ago

KlakHap doesn't support audio. There is no plan for adding audio support at the moment. I thought that it doesn't need audio playback in most use case of the HAP codec.

Just out of curiosity, what do you think about it? What are you going to use it for?

fingerx commented 5 years ago

Play large resolution videos. Because video and audio are the final output for a file. Is there any way to make the audio drive video play?

keijiro commented 5 years ago

I thought that people would use the default VideoPlayer component just for playing videos, even if it's large resolution. HAP is only useful when precise frame control is needed (for example, VJing, SFX/VFX, etc.), and audio playback is not so important in these cases.

fingerx commented 5 years ago

thank you very much. You write precise frame control. If I calculate the playback frame index of the audio, I play it by setting the frame index of the video. Is this ok? Audio is very important to me, I hope you can give me some advice. Thanks again.

fingerx commented 5 years ago

@keijiro Can you tell me the unit of streamDuration? I am very confused. I have a video showing 8 minutes and 14 seconds in vlc, but the stream duration in the plugin shows 51.3

fingerx commented 5 years ago

image image

keijiro commented 5 years ago

It's shown in seconds. So, it seems to fail to analyze the video file. Could you provide this file or another file that can reproduce the issue? I'd like to look into it.

fingerx commented 5 years ago

@keijiro thanks.I found the reason. If one frame is missing from the video synthesized by the sequence frame, the plugin will only read the file before the missing frame, so this time will be wrong. My file is very large(134GB).

keijiro commented 5 years ago

Okay. I'll try to reproduce the issue with missing frames on my side. At the moment, I'd recommend working around the issue by filling missing frames with neighbor frames.

keijiro commented 5 years ago

I couldn't reproduce the issue because ffmpeg stops reading an image sequence when it founds a missing frame. How do you create the file with missing frames? Or could you provide another small file that can reproduce the issue?

fingerx commented 5 years ago

this test frames and mov file: https://drive.google.com/open?id=1OkyJU8IA1o1-RcLA2iT43LPcTpjpn7hm

I don't know why I can't reproduce this problem, because there is a new problem, the plugin can't recognize the format, but vlc can recognize it as hap

image

image

fingerx commented 5 years ago

extra information: You can try to change the video file suffix, and then change the file name. The plugin will have time normal and sometimes it is not normal. The reading of the file should be independent of the suffix, just like other regular players, such as vlc

fingerx commented 5 years ago

info2:

using streamingassets path mode all is ok but using local file path mode sometimes not normal

keijiro commented 5 years ago

I couldn't reproduce the issue. The plugin doesn't use any information with the file suffix, so I hardly think it causes any issue by changing the file suffix.

Could you please re-check if it actually reproduces?

fingerx commented 5 years ago

@keijiro please see images and test project,thanks(this project using your github code and video)

image image image

KlakHapTest.zip

fingerx commented 5 years ago

add test video(please using vlc play),please note that after watching, the problem at the end. Thanks again: record.zip

fingerx commented 5 years ago

@keijiro add test2 can easy see this error. Video_test2.zip

keijiro commented 5 years ago

It seems to be another bug: The inspector shows "Failed to open file" error when clicking a path mode item without changing the selection. It just shows a wrong error message, so you can safely ignore it. I'll try fixing it later. Please ignore this error message until it gets fixed.

keijiro commented 5 years ago

Fixed: https://github.com/keijiro/KlakHap/releases/tag/v0.1.8

keijiro commented 5 years ago

I'm closing this issue now. Please feel free to reopen again for further questions.