Commit Graph

136 Commits

Author SHA1 Message Date
eisneinechse
39bf06b3d3 Now VP8, VP9, h.264, h.265 have working crf 2019-01-27 10:50:23 -08:00
eisneinechse
1a44bd789c Make sure that crf is not set in SetOptions 2019-01-27 10:26:20 -08:00
eisneinechse
46051fbba1 Form follows function
Moved crf back to SetVideoOptions and adjusted parameters
Now h.264 and VP9 have working crf
Some small changes in preparation for Settings
2019-01-27 10:07:40 -08:00
eisneinechse
9aeec7d90f Set the bitrate to 0 if no valid value was given. It is needed for
the crf lossless setting
2019-01-26 12:22:09 -08:00
eisneinechse
29b5fcac60 Merge branch 'develop' into hardware-support 2019-01-25 13:07:26 -08:00
Jonathan Thomas
0587ada6dc Integrate Constant Rate Factor (CRF) for FFmpegWriter (#186)
* First implementation of CRF (Constant Rate Factor)

* Include AV1 in the codecs that can use crf

* First version that uses SetOption to set crf quality

* Clarify comments

* Delete setting the bitrate for crf in SetVideoOption because it
is not needed, it is set later with SetOptions.
2019-01-25 00:15:07 -06:00
eisneinechse
662ed77263 Merge branch 'develop' into hardware-support 2019-01-18 16:42:46 -08:00
Jonathan Thomas
13bd272ead Adding new settings class to be used for changing realtime settings used by libopenshot, such as scaling mode for preview vs final render, or hardware decode, etc... 2019-01-09 16:50:40 -06:00
Jonathan Thomas
e0ec603965 Fixing Scale Mode (None) in previews (#182)
* Handle SCALE_NONE mode when optimized for previews (previews are often smaller than the project size)

* Fixing 2 memory leaks (thanks PeterM)
2019-01-09 00:56:49 -06:00
eisneinechse
e10695f9d4 Fixed two memory leaks 2018-12-20 09:18:26 -08:00
eisneinechse
4dcc72a769 Fixed bug compiling for older ffmpeg versions < 3.2 2018-12-19 09:12:15 -08:00
eisneinechse
325f58f773 Changes to use AV1 if ffmpeg >= 4.0 is used with libaom support 2018-11-15 22:04:20 -08:00
eisneinechse
53eec32d9e In case CRF is not supported like in hardware accelerated codecs
or in mpeg2 a bitrate is calculated that should be close to the
one expected with the given CRF value.
2018-09-25 08:04:48 -07:00
eisneinechse
0227397339 Set the graphics card used to decode or encode by setting the
environment variable HW_EN_DEVICE_SET for enncoding and
HW_DE_DEVICE_SET for decoding. The first card is 0, the second 1
and so on. For now only running on Linux.
2018-09-19 21:37:12 -07:00
eisneinechse
0b260a9087 Code cleanup and move messages regarding hardware acceleration to
Debug Logger
2018-09-18 15:31:34 -07:00
Jonathan Thomas
41f5c07ceb Merge branch 'hardware-support' of github.com:OpenShot/libopenshot into hardware-support 2018-09-18 14:46:18 -05:00
Jonathan Thomas
1f36d12298 Moving delcaration outside of conditional compile logic (so Windows and Mac builds work) 2018-09-18 14:45:56 -05:00
eisneinechse
161acb3d7d Include messages in the compile display to make sure the right
ffmpeg version is used (>= 3.2) to get hardware acceleration
2018-09-18 12:38:53 -07:00
eisneinechse
df9d1a5717 Implement the use of CRF instead od kB/s or MB/s for some formats:
VP8, VP9, h264, h265
0 crf with VP9 is lossless
0 crf with VP8, h264, h265 should be lossless
2018-09-16 18:14:31 -07:00
eisneinechse
4db2217f0d Fallback for hardware accelerated decode to software decode in case
the GPU can noy handle the dimensions of the frame.
Not yet working, va_config not yet set.
2018-09-11 20:18:11 -07:00
Jonathan Thomas
6b37ad7e1d Limiting threads for both FFmpeg and OpenMP (attempting to find a good balance of parallel performance, while not spawning too many threads). Sometimes more is not always better. 2018-09-11 10:48:30 -05:00
Jonathan Thomas
e879188a7d FFmpeg 3 & 4 support, Travis CI support, OpenMP schedule change (#160)
* FFmpeg4 support. Compile warnings fixes. Credit goes to many people, including ferdnyc, peterM, and other awesome folks!

* Adding environment checking to enable/disable omp taskwait after each video/audio frame is processed. This is experimental for some users with crashes.

* Moving `omp taskwait` to after the ProcessVideoPacket() method, since that is the only place it is useful.

* Fixing crashes on missing Clip source file, and changing FFmpeg scaling algorthm from SWS_BILINEAR to  SWS_LANCZOS (for higher quality scaling)

* Update FindFFmpeg.cmake module, and updating build script. Also enabling debug builds.

* Updating experimental travis build script

* Fixed unit test for newer version of FFmpeg (audio resampling)

* Experimental travis multiple jobs

* Adding OMP schedule hint (thanks PeterM), which prevents crashes in some circumstances.
2018-09-11 00:40:31 -05:00
eisneinechse
16c8302f48 Basic support for nvidia encode (decode later) 2018-09-08 16:53:53 -07:00
eisneinechse
f7dd2b18c3 First adjustment to later include NVENC (nvidia encoder) 2018-09-08 16:31:03 -07:00
eisneinechse
be979cd78c Accelerated encode now supported by Windows and Mac.
Only tested on Linux though due to absense of hardware/software.
Tested to compile on Ubuntu 14.04, 16.04, 18.04, and 18.10
Acceleration only available on systems with ffmpeg 3.2 and up
Very early code, work in progress.
Issues to be fixed soon:
 if hardware cannot decode because the size is too big it keeps trying.
 more interfaces supported like vdpau in Linux
 error handling
 user interface
Many commented lines of code are still in the source to help people start
who may want to help.
2018-09-06 08:28:50 -07:00