Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Scrubbing duration of a paused video- varied result in windows and android- possible bug in android

Author
Message
blurymind
6
Years of Service
User Offline
Joined: 25th Jun 2017
Location:
Posted: 12th Mar 2018 23:07 Edited at: 12th Mar 2018 23:11
I want to achieve scrubbing of a paused video. Click and drag to scrub.

The result is mixed. It seems to work almost alright on WIndows- with the attached video. Windows fails to load longer webm videos as I noted in another thread.
https://forum.thegamecreators.com/thread/221818
I used an ugly hack to get it to seek and stop at a frame ,noticing that the video cannot seek while paused.

So scrubbing with this example and the bird works on windows.
The problem comes when broadcasting it to an android device. The scrubbing does not work whatsoever there. I was wondering is its a problem with my code, or a problem with appgamekit's current video player.

Here is the source code(I am also attaching the video):


Btw how do we get printing to work with the video player? When I load any video, printing is allcovered by it and its hard to debug. Can AppGameKit print to console?

Attachments

Login to view attachments
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 13th Mar 2018 14:04
Isn't this a video issue rather than AppGameKit ? Videos have progressive coding, you can't just jump to any time without knowing some of what comes first unless it's a key frame, which is essential a picture embedded in the video?

Most video these days, especially streaming style, are "chunks" of video. So Netflix for example come sin at 10 second chunks.....scrubbing ahead, or seeking, is actually just jumping between chunks. Try downloading one......you'll get hundreds of files that need muxed back together.
blurymind
6
Years of Service
User Offline
Joined: 25th Jun 2017
Location:
Posted: 13th Mar 2018 15:50 Edited at: 13th Mar 2018 15:55
@santman i dont think its a video technology issue. What you are talking about is buffering. In my case the video is already loaded into memory and seek works just fine on windows. My question is why does it not also work on android?

I think appgamekit first streams the entire app and loads it into the device memory - so in theory it should function just the same.

So this leads me to believe that it is indeed a bug in either the android player or appgamekit itself. As noted agk seems to have trouble in general in loading webm files in windows with some of them failing to even load. It seems that its video player is unstable on both platforms unfortunately

Hopefuly this post will be noticed by a dev and fixed in next version? I noticed that there is no official bug tracker either. Where do people report bugs?
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 14th Mar 2018 16:58
Is webm a video format? Maybe try it with mp4 or an AVI?
blurymind
6
Years of Service
User Offline
Joined: 25th Jun 2017
Location:
Posted: 14th Mar 2018 21:40 Edited at: 14th Mar 2018 21:50
@santman webm is a great video format by google, that is compatible with most web browsers and has great encoding and popularity.
The webm codec also has a great license that unlike the other two you mentioned- is royalty free.

Webm files are great because they are tiny and have good compression quality and performance.

I am set on using webm, sorry

Btw the avi is a container file- so it can have a different codec - very unpredictable and not very good for portability.
From all video formats webm is the one that should be working across different platforms the best- because it is made by google and is designed to be working on any device. Youtube videos are mostly webm files btw - its the default encoding that they get when you upload them.
If you open the youtube app on your phone and wait for the video to fully buffer- you may notice that scrubbing works effortlessly with zero lag. Same applies if you open it in chrome, firefox or any other web browser.

A lot of people have been using webm instead of gif for short animation clips

My hope is that appgamekit will catch up with other engines and improve their video player- I really like the scripting language. Brings me back to the good old days
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 14th Mar 2018 22:28
Ah ok - yet on YouTube it says:

Recommended upload encoding settings
Below are recommended upload encoding settings for your videos on YouTube.
Container: MP4

No Edit Lists (or the video might not get processed correctly)
moov atom at the front of the file (Fast Start)

Audio codec: AAC-LC
Channels: Stereo or Stereo + 5.1
Sample rate 96khz or 48khz
Video codec: H.264

Which holds true to the H.26x codec being the video codec of choice for almost all modern phones I've seen. Was just asking because if you download a YouTube video using one of the many firefox extensions they come in lots of little chucnks that get put back together by a downloaded app Unless you specifically choose for a lower quality version of course. But that may be the difference, I don't think AppGameKit buffers particulry, I think it handles videos like music and plays them straight off of the disk, which may be why it struggles on a mobile device actually.

Either way, there is a post here about someone who added extra video functionality through an addin and I think they are giving it away free now. Maybe check that out?
blurymind
6
Years of Service
User Offline
Joined: 25th Jun 2017
Location:
Posted: 15th Mar 2018 09:20 Edited at: 15th Mar 2018 09:29
@santman that sounds good. Can you link us to it
Could be worth investigating.

My current problem is not as much with functionality as it is with stability. Appgamekit fails to load some webm files on windows and doesnt setposition on them properly on android.

Two bugs

I reported with code example and test files. Lets see now if they get fixed.

I am set on webm for my app so it is a key feature for me. It needs to be able to handle most webm files you throw at it. Be it youtube, tumblr or somewhere else. I dont care about any other video format
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 15th Mar 2018 10:02
Here's the link here, but I notice it's only pc only.

Might still be worth bouncing off the author though?

https://forum.thegamecreators.com/thread/220786
blurymind
6
Years of Service
User Offline
Joined: 25th Jun 2017
Location:
Posted: 15th Mar 2018 12:00
@santman thank you for the link. It wont do for me because i need it to work on windows and android. It would be good if agk could set volume on videos. The loop function i can implement with two lines of code in agk

Login to post a reply

Server time is: 2024-04-25 15:05:55
Your offset time is: 2024-04-25 15:05:55