Commit Graph

121 Commits

Author SHA1 Message Date
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
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
eisneinechse
314177bceb Let the user choose which installed graphics card to use for
decoding HW_DE_DEVICE_SET and/or encoding HW_EN_DEVICE_SET
Possible options are /dev/dri/renderD128 for the first,
/dev/dri/renderD129 for the second, and so on.
2018-09-02 18:46:04 -07:00
eisneinechse
384b6e0bc3 Set limit of threads for OpenMP and ffmpeg by setting the environment
variables LIMIT_OMP_THREADS and LIMIT_FF_THREADS
If they are not set the normal values are used
2018-08-31 21:50:23 -07:00
eisneinechse
340803e31e Initial rudimentary support for hardware acceleration (encode and decode)
Only Linux vaapi for now
2018-08-31 21:36:23 -07:00
Jonathan Thomas
95abdcf66b FFmpeg4 support. Compile warnings fixes. Credit goes to many people, including ferdnyc, peterM, and other awesome folks! 2018-08-11 18:22:18 -05:00
Jeff Shillitto
a92ed9fb03 Fix bug with FFmpeg > 3.2 flushing frames
Final frames stored in buffer need to be flushed/drained so that they
can be written to the video file. Credit to Peter for the update.
2018-07-16 21:18:35 +10:00
Jonathan Thomas
9972600931 Default to AAC audio codec (#135)
* Adding strict experimental to FFmpegReader and Writer (hopefully allowing all the encoders to be used)

(cherry picked from commit 1bcd1e5)

* init all formats and codecs before checking if valid

(cherry picked from commit 7250226)
2018-06-29 15:06:34 -05:00
Jonathan Thomas
ef1fb6320b Add new static function to determine if video/audio codecs names are valid (#134) 2018-06-28 21:57:56 -05:00
Jonathan Thomas
851ad86634 Changing some sleep() calls to usleep(), for more accuracy. This is a bit experimental, and hopefully will work on all OSes. 2018-04-14 16:25:58 -05:00
Jonathan Thomas
0db54c8a2c Fixing FFmpeg version breakage in FFmpegWriter 2018-03-29 01:29:10 -05:00
Jonathan Thomas
22384c7705 FFMPEG 3.2 support for FFmpegWriter (Thanks Peter!) 2018-03-28 15:09:55 -05:00
Jonathan Thomas
26e96e009b Added in metadata encoding capabilities (writer.info.metadata["title"] = "My Title"). Only certain tag names are accepted (see FFmpeg for more on which tags are supported by which codecs). 2018-03-04 03:10:59 -06:00
Jonathan Thomas
2ea724373d Experimental codec lookup by name in FFmpegWriter, which should solve a few issues (such as xvid support). Thanks Peter! 2017-11-10 01:02:01 -06:00
Jonathan Thomas
153279fbac Setting timebase on video stream in FFmpegWriter... a bit experimental 2017-11-08 00:01:42 -06:00
Jonathan Thomas
2fcb35ddcc Removing throw statements from header files (thanks Peter) 2017-10-26 18:44:35 -05:00
Jonathan Thomas
f0f1b92777 Reducing # of scale operations to 1 per layer on the timeline. 2017-10-26 18:15:16 -05:00