Giter Site home page Giter Site logo

rmesch / bitmaps2video Goto Github PK

View Code? Open in Web Editor NEW
23.0 6.0 9.0 71.97 MB

A Delphi-class to support encoding of a series of bitmaps and video clips to a video file. It requires the ffmpeg-library and is intended as an easy to use interface to this library.

License: Apache License 2.0

Batchfile 0.16% Pascal 99.84%
delphi cross-platform ffmpeg-library bitmaps video

bitmaps2video's People

Contributors

rmesch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bitmaps2video's Issues

Unable to compile on Android32 and Android64 platforms

Unable to compile on Android32 and Android64 platforms. I am using this code on Delphi 11.3 Patch 1 (Alexandria). Here's the errors for Android64:
`[DCC Error] UMultiDemo.pas(586): E2250 There is no overloaded version of 'RequestPermissions' that can be called with these arguments

[DCC Error] UMultiDemo.pas(669): E2250 There is no overloaded version of 'Create' that can be called with these arguments

[DCC Error] UMultiDemo.pas(733): E2250 There is no overloaded version of 'Create' that can be called with these arguments

[DCC Error] UMultiDemo.pas(743): E2250 There is no overloaded version of 'Queue' that can be called with these arguments

[DCC Fatal Error] MultiDemo.dpr(6): F2063 Could not compile used unit 'UMultiDemo.pas'`

Zip is BAD

Zip is BAD cannot downLoad OR with FDM download is broken
Reinstall ZIP

How about "TBitmapEncoderM.BitmapToFrameSlow(const bm: TBitmap);"

Thank you.

How about this to avoid slow rendering.

procedure TBitmapEncoderM.BitmapToFrameSlow(const bm: TBitmap);
var
convertCtx: PSwsContext;
w, h: integer;
stride: Integer; // Add new var
ret: integer;
BitData: TBitmapData;
begin
if bm.Map(TMapAccess.Read, BitData) then
begin
w := bm.Width;
h := bm.Height;
stride := BitData.BytesPerLine;

convertCtx := sws_getContext(w, h,
                             AV_PIX_FMT_BGRA, //replace of AV_PIX_FMT_BGR24
                             fWidth, fHeight,
                             CodecSetup.OutputPixelFormat,
                             ScaleFunction[fVideoScaling],
                             nil, nil, nil);
assert(convertCtx <> nil);

try
  ret := av_frame_make_writable(yuvpic);
  assert(ret >= 0);
  ret := sws_scale(convertCtx, @BitData.data, @stride, 0, h, @yuvpic.data, @yuvpic.linesize);
  assert(ret >= 0);
finally
  sws_freeContext(convertCtx);
  bm.Unmap(BitData);
end;

end;
end;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.