Kap: VLC/MPlayerX playback fails

Created on 6 Oct 2016  ยท  5Comments  ยท  Source: wulkano/Kap

Playback of Kap Version 0.1.0 (0.1.0.14) recordings on macOS 10.12 using VLC Version 2.2.4 Weatherwax (Intel 64bit) or MPlayerX Version 1.1.4 (1920) results in a beachball of death.

However, using QuickTime the recordings can be viewed without error.

Help Wanted High Bug

Most helpful comment

Thank you for the detailed feedback @bramkok ๐Ÿ˜Œ We'll be shipping a fix with the release that's coming tomorrow! ๐Ÿ˜„

All 5 comments

Can reproduce. Looking into it.

@bramkok could you see if you can reproduce it with a recording from QuickTime?

Can't reproduce this behavior with QuickTime screen recording.

QuickTime screen recording test
MPlayerX playback test
VLC playback test

^ all recorded with Kap.

Thank you for the detailed feedback @bramkok ๐Ÿ˜Œ We'll be shipping a fix with the release that's coming tomorrow! ๐Ÿ˜„

Well, sadly we could not find a viable solution for this ๐Ÿ˜”

It's a pretty weird _bug_ โ€“ you can play the Kaptures on Chrome and QuickTime, for example, with no problems ๐Ÿ˜•

We spent some time yesterday researching about this and here's what we found:

Info about a Kapture via ffprobe file.mp4

Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1016x1016 [SAR 1:1 DAR 1:1], 50 kb/s, 30 fps, 30 tbr, 6k tbn, 50 tbc (default)

Info about a QuickTime recording via ffprobe file.mp4

Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1216x872 [SAR 1:1 DAR 152:109], 113 kb/s, 60 fps, 60 tbr, 6k tbn, 50 tbc (default)

Notice that they are almost the same โ€“ the only difference is the profile name (High vs Main).

Fixing it

ffmpeg -i Kapture.mp4 -pix_fmt yuv420p -preset ultrafast Kapture-fixed.mp4

This will change the ffprobe output to:

Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1016x1016 [SAR 1:1 DAR 1:1], 25 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)

Notice that the (tv, bt709) is gone.

This is enough to make VLC open the file without trouble.

Fixing it with Swift

We could also fix it low level โ€“ you can choose the pixel format when recording with AVFoundation. There's some _(rare)_ info about that out there, like this article. It's a hard task and I'm afraid we don't have time for it now ๐Ÿ˜” We want to focus on features like GIF support (#14) and kap-server (#23).

Conclusion

We'd like to add it to aperture.js, but the problem is: it can add a lot of post processing time to a Kapture. With small ones (~500x500), it's ok; with bigger ones (3000x1800 for instance) it takes something like 3 seconds for each second of video (tested in a MacBook Pro Retina 13" Mid 2014) ๐Ÿ˜•

For now, I would like to classify this as a _kinda_ upstream issue, since Chrome, Slack, QuickTime etc have no problem to play Kaptures.

Any help with this is more than welcome!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

albinekb picture albinekb  ยท  4Comments

pedromassango picture pedromassango  ยท  3Comments

deadcoder0904 picture deadcoder0904  ยท  3Comments

benlumia007 picture benlumia007  ยท  3Comments

danielbachhuber picture danielbachhuber  ยท  3Comments