Commit Graph

116 Commits

Author SHA1 Message Date
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
Jonathan Thomas
c95db460d6 Big update! Updating all "long int" frame number types to int64_t, so all 3 OSes will produce the same depth and precision on frame numbers. Also removing variable bitrate support temporarily, since it causes more problems than it solves. 2017-09-28 16:03:01 -05:00
Jonathan Thomas
8b8d91a687 Take 2 - Prevent crashes related to too many threads (on 24+ thread systems) 2017-08-21 16:36:22 -05:00
Jonathan Thomas
f12ffe692b Migrating tr1 to std, adding C++11 support to build scripts, fixing crash in FFmpegReader (caused by shared_ptr, buffer, and last_video_frame corruption). Much improved stability with this change. Thanks to Craig and Peter for the help! 2017-08-20 17:37:39 -05:00
Jonathan Thomas
564664737a Fixing crash on Ubuntu build server 2017-08-01 03:24:01 -05:00
Jonathan Thomas
f46611cd7d Fixed a strange bug related to exporting image sequences. The filename property was not being set on the AVFormatContext. Also fixed a bug when exporting to JPEG image sequences related to max_b_frames and certain codecs. 2017-08-01 01:19:07 -05:00