ws-video: merge ws/video-vp8 (final); F.open wraps images as videos only for category video (F.video.open); F.video.fromFrames for image sequences
This commit is contained in:
commit
5161fb3371
5 files changed
+92
-10
No files matched your search
@@ -368,7 +368,7 @@ function F.open(src: any, opts: Options?): (any, Err.Err?)
|
||||
if not m then
|
||||
return nil, merr
|
||||
end
|
||||
if not m.open and entry.category == "image" and (o.category == nil or o.category == "video") then
|
||||
if not m.open and entry.category == "image" and o.category == "video" then
|
||||
local io = table.clone(o)
|
||||
io.category = "image"
|
||||
io.format = entry.name
|
||||
@@ -614,6 +614,11 @@ F.video.fromImage = function(img: any, opts: Options?): (any, Err.Err?)
|
||||
local src = type(img.meta) == "table" and img.meta.source
|
||||
return Video.fromFrames(frames, delays, { format = type(src) == "table" and src.format or "image", loops = img.loops, meta = img.meta })
|
||||
end
|
||||
-- F.video.fromFrames(images, delays?, opts?) -> a VideoDecoder over a list of same-size images (an image sequence:
|
||||
-- F.save(F.video.fromFrames(list, 1 / 25), "out.avi")); delays in seconds (a number = every frame, default 0.1)
|
||||
F.video.fromFrames = function(images: any, delays: any?, opts: Options?): (any, Err.Err?)
|
||||
return Video.fromFrames(images, delays, opts)
|
||||
end
|
||||
-- F.video.codecs: the video codec registry (codecs/Video: register / entry / fromFourcc / fromMatroska / decoder)
|
||||
F.video.codecs = Video
|
||||
|
||||
|
||||
Reference in new issue
Block a user