Hi All,
I’ve experiencing some weird anomalies on video capturing, my code is below (calling the video capture routine is pretty much straight from the docs) however the videos being captured on an iPhone 7 Plus are sub 480p in quality and blurry - certainly nowhere near the 1080 or even 4k I’d expect and prefer. Any thoughts?
Is my content width and height governing anything to do with the video capture? or the fps? or Antialiasing?
My config.lua
-- -- For more information on config.lua see the Project Configuration Guide at: -- https://docs.coronalabs.com/guide/basics/configSettings -- application = { content = { width = 357, height = 667, scale = "letterbox", fps = 25, antialias = true, --[[imageSuffix = { ["@2x"] = 2, ["@4x"] = 4, }, --]] }, notification = { iphone = { types = { "badge", "sound", "alert" }, }, }, }
Application code:
local function videoListener(event) if (event.completed and event.url ~= nil) then if system.getInfo("platform") == "ios" then -- read the file in local fullpath = tostring(event.url); local \_starts, \_ends = fullpath:find("/tmp/"); local tempPath = fullpath:sub(\_ends) local videofile, errorString = io.open(system.pathForFile(tempPath, system.TemporaryDirectory), "rb"); local videoData; local videoWritePath = system.pathForFile("video1.mov", system.TemporaryDirectory); local videoWrite; if not videofile then print("Video failed to be read: " .. errorString); else videoData = videofile:read("\*a"); videoWrite = io.open(videoWritePath, "wb"); videoWrite:write(videoData); io.close(videoWrite); end if videofile then io.close(videofile); end -- write the file out --share the file videoShare.save(videoWritePath, function(l) print("EVENT STATUS: " ..l.status) end); --print(event.url); else end end end local function takeVideo(e) media.captureVideo({listener=videoListener,preferredQuality="high"}); end
Any help would be greatly appreciated.