videokit-ai / videokit

Low-code, cross-platform media SDK for Unity Engine. Register at https://videokit.ai
https://videokit.ai
Apache License 2.0
107 stars 14 forks source link

VideoKit Android corrupt video #153

Open Apidcloud opened 2 weeks ago

Apidcloud commented 2 weeks ago

I wrote the same issue on discord channel (https://discord.com/channels/1268271520321376316/1303752149297270925), but I guess here it's better in case other people search for it on the web.

VideoKit 0.0.21 + ai fnx 0.0.26

Last year around this time (29th of November 2023) I asked the same question, but I can't find the older discord channel (did all the messages get deleted?). Basically we were using natcorder but found out the android recordings are corrupted (as described in https://discussions.unity.com/t/natcorder-video-recording-api/683160). At the time (~ 1 year ago), you sent me a test apk with the sharing option which seemed to solve this issue (using video kit 0.0.15 or 0.0.16 I believe). But today we are trying videokit (0.0.21) + ai fnx (0.0.26) (do we even need ai fnx if we only use video kit?), and I think the same issue is there (i.e., the video cannot be played on chrome). If I do a ffprobe on the recording I can see the following error:

Input buffer exhausted before END element found
[aist#0:0/aac @ 0x7fa739f1e780] [dec:aac @ 0x7fa739f0c740] Error submitting packet to decoder: Invalid data found when processing input

Are we missing something? We are using the free plan to test it out, as we want to make sure the issue is gone, but setting audio mode to None or changing the format doesn't seem to do anything. The video always comes as mp4 and with audio. We actually want the audio, but wanted to try out if removing it solves the issue as it did with natcorder.

The issue at the time was this, as far as I can remember (from the unity thread):

image

Edit: found a screenshot with your reply from last year:

image
olokobayusuf commented 2 weeks ago

@Apidcloud can you share an example video that doesn't play back in Chrome?

Apidcloud commented 2 weeks ago

Yeah, this one (zipped to avoid some compression from uploading to github) android-failed.mp4.zip

Apidcloud commented 2 weeks ago

I can also confirm that it works fine on iOS, so it really seems to be the same as that original issue we had 1 year ago (but that wasn't present in the build you sent us at the time -- so, a regression?).

Apidcloud commented 1 week ago

Any update on this?