FeRD (Frank Dana) 93debab7c4 FFmpegWriter: Macro & member cleanup
- The `fmt` class member, which was of type AVFormat*, was really
  just an unnecessary copy of `(AVFormatContext*)oc->oformat`.
  But we were ASSIGNING into its members, which we were definitely
  not supposed to be doing. (And in recent FFmpegs, now that
  `AVFormat` has been `const`d, we can't.) It's gone; now we just
  use `oc->oformat` anywhere we used to access `fmt`.

- The preprocessor macro to allocate a new _stream_ was a mess of
  cross purposes: It did allocate a stream, but then it also
  allocated a new AvCodecCtx on newer FFmpeg releases. Worse (and
  always galling to me), it proceeded to assign to a variable
  that WASN'T passed in to the macro, just taking it on faith that
  it would only be used where that variable was defined. That's
  just... ugh. So I broke it apart into two steps (stream creation
  and context allocation), realized the stream creation code was
  the same for all ffmpeg versions and didn't need to be a macro
  at all, and now a 4-parameter, 6-line magical macro has been
  replaced with a simple, zero-side-effect one-liner.

- I also cleaned up the add_video_stream() code to be more like
  the add_audio_stream() code, since they were bad-different for
  no discernible reason.
2022-02-24 07:29:08 -05:00
2022-02-24 07:29:08 -05:00

OpenShot Video Library (libopenshot) is a free, open-source C++ library dedicated to delivering high quality video editing, animation, and playback solutions to the world.

Build Status

libopenshot CI Build libopenshot-audio CI Build

Features

  • Cross-Platform (Linux, Mac, and Windows)
  • Multi-Layer Compositing
  • Video and Audio Effects (Chroma Key, Color Adjustment, Grayscale, etc…)
  • Animation Curves (Bézier, Linear, Constant)
  • Time Mapping (Curve-based Slow Down, Speed Up, Reverse)
  • Audio Mixing & Resampling (Curve-based)
  • Audio Plug-ins (VST & AU)
  • Audio Drivers (ASIO, WASAPI, DirectSound, CoreAudio, iPhone Audio, ALSA, JACK, and Android)
  • Telecine and Inverse Telecine (Film to TV, TV to Film)
  • Frame Rate Conversions
  • Multi-Processor Support (Performance)
  • Python and Ruby Bindings (All Features Supported)
  • Qt Video Player Included (Ability to display video on any QWidget)
  • Unit Tests (Stability)
  • All FFmpeg Formats and Codecs Supported (Images, Videos, and Audio files)
  • Full Documentation with Examples (Doxygen Generated)

Install

Detailed instructions for building libopenshot and libopenshot-audio for each OS. These instructions are also available in the /docs/ source folder.

Hardware Acceleration

OpenShot now supports experimental hardware acceleration, both for encoding and decoding videos. When enabled, this can either speed up those operations or slow them down, depending on the power and features supported by your graphics card.

Please see doc/HW-ACCEL.md for more information.

Documentation

Beautiful HTML documentation can be generated using Doxygen.

make doc

(Also available online: http://openshot.org/files/libopenshot/)

Developers

Are you interested in becoming more involved in the development of OpenShot? Build exciting new features, fix bugs, make friends, and become a hero! Please read the step-by-step instructions for getting source code, configuring dependencies, and building OpenShot.

Report a bug

You can report a new libopenshot issue directly on GitHub:

https://github.com/OpenShot/libopenshot/issues

Websites

License

Copyright (c) 2008-2021 OpenShot Studios, LLC.

OpenShot Library (libopenshot) is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

OpenShot Library (libopenshot) is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with OpenShot Library. If not, see http://www.gnu.org/licenses/.

To release a closed-source product which uses libopenshot (i.e. video editing and playback), commercial licenses are also available: contact sales@openshot.org for more information.

Languages
C++ 94.1%
CMake 4.7%
SWIG 1.1%
C 0.1%