Page 1 of 7

Choppy overlay video Android V18.1

Posted: Tue Jul 01, 2014 1:24 pm
by petik0
Tried running overlay recently and the output is extremely choppy, not sure why.

Here's the source:
https://www.youtube.com/watch?v=nQ-r6zOw5UY

Here's the overlay output:
https://www.youtube.com/watch?v=Ywfg8jpXAhg

Device is a Samsung Galaxy Tab 2 7.0 running KitKat 4.4.2.

Also noticed that Harry's warned me about using software encoding (no hw acceleration). Strange since this seemed to have worked in v18 beta - videos were done in minutes, now they take hours. Am I missing a checkbox somewhere?

Re: Choppy overlay video Android V18.1

Posted: Tue Jul 01, 2014 2:10 pm
by Harry
The Android version always used software encoding, both beta and production. Speed didn't change either, it mainly depends on the CPU processing power and resolution. The warning has been added as longer videos at high resolutions will require up to 20 times the video length... The overlaid video - looks like a problem with the frame timestamps. Which format has the original video and how has it been recorded? I assume there is an issue with the video encoding / format, i.e. some compatibility issue.

- Harry

Re: Choppy overlay video Android V18.1

Posted: Tue Jul 01, 2014 2:36 pm
by petik0
Hmm, must be something with the tablet in terms of performance - will have to see the governor.

The video was recorded with a gopro hero2, but i used ffmpeg to reformat it with the same command line parameters you recommend in your 2GB file size FAQ.

Re: Choppy overlay video Android V18.1

Posted: Tue Jul 01, 2014 2:39 pm
by Harry
The smartphone performance can have an influence when recording video, but not when overlaying. Here it is only a question of time it takes to complete it. I'd assume it is an issue with the HERO2 video LapTimer video library does not handle correctly. In case you have some server space available, please upload the original video (after conversion with ffmpeg - i.e. exactly the input your smartphone gets) and send me a download link. I'll try to reproduce the issue.

- Harry

P.S. youtube does not work as they convert the original video.

Re: Choppy overlay video Android V18.1

Posted: Tue Jul 01, 2014 2:46 pm
by petik0
I'll fish around for some server space and post in a bit.

Also, I noticed the lap timer closes (not force closes - i get no error) when traversing the lap menus and upon completion of overlay process. It doesn't do this while recording though. I wonder if it's just running out of RAM? The tablet only has 1GB...

Re: Choppy overlay video Android V18.1

Posted: Tue Jul 01, 2014 2:55 pm
by Harry
You can turn on LapTimer memory stats be choosing LapTimer -> Settings -> Expert Settings -> Display -> Show System Load. This will show memory stats both in the bottom of the Timer View and in the overlay progress bar ;-) In case the app is closed silently, this typically means Android killed the app.

- Harry

Re: Choppy overlay video Android V18.1

Posted: Wed Jul 02, 2014 3:37 am
by petik0
Uploaded the file to google drive and shared with your email address. Will have to rename the extension back to mp4 since google wanted to put it on youtube again.

Re: Choppy overlay video Android V18.1

Posted: Tue Jul 15, 2014 7:10 pm
by Harry
Hi,

I did a test overlay using your video... Although it did not come out choppy, it showed quite some artefacts (i.e. compression is too strong). I analyzed the video in addition and found it shows a strange (low) number of "I" frames. [These I frames kind of stabilize encoding / decoding as they do not depend on frames behind and ahead. The other types of frames - B and P - always have a relation to their neighbor frames an are more "difficult" to process. The video had 131 I frames, and roughly 14500 B and P frame respectively - just in case someone with an idea of video encoding reads this...]. Anyway, that is video encoding expert stuff (and I'm not) but may be the reason for both the artefacts and the choppiness... So what can you do? Please try a ffmpeg conversion with a different quality setting. Some samples are given in viewtopic.php?f=8&t=2278 in addition, you may try different compression / quality settings in LapTimer / Settings.

Sorry I can't help more.

- Harry

Re: Choppy overlay video Android V18.1

Posted: Tue Jul 15, 2014 7:22 pm
by petik0
Thanks Harry. I've a Galaxy Tab S on order (2.3GHz quad core Snapdragon, 3gb or ram) so it should get easier to experiment with settings a bit. The low number of I frames is interesting. I wonder if this is the way the gopro hero 2 compression works - the manual for it doesn't show any settings with respect to compression.

-pete

Re: Choppy overlay video Android V18.1

Posted: Mon Aug 11, 2014 6:44 pm
by bigmillertime
I am experiencing a similar issue.

I recorded the footage from the GoPro Hero3+. 720p 60fps. I then sliced out my fastest lap and exported the file to a 37gb MP4. Uploaded it to the storage on the Nexus 5. Pointed Harry's laptimer to the footage and performed the overlay function. I am experiencing massive stutter on the video.

Thanks for the help on this.