Commit Graph

261 Commits

Author SHA1 Message Date
Jonathan Thomas
51fe8549e6 Fix regression caused by Codacy tweaks 2020-06-05 17:53:21 -05:00
Jonathan Thomas
86b83abf5d Fixing undefined got_packet int 2020-06-05 15:41:23 -05:00
Jonathan Thomas
62d7fb5459 Changing some libopenshot code based on Codacy feedback. Small refactoring, scope limiing. 2020-06-04 18:52:19 -05:00
eisneinechse
f4b40a4e77 Improvements to handling of new codecs 2020-06-04 08:28:33 -07:00
Jonathan Thomas
2834e7731b Merge pull request #445 from eisneinechse/develop
Newer codecs (svt_av1, rav1e, svt_hevc)
2020-06-02 14:50:01 -05:00
eisneinechse
d9e6af5cda Refert last commit 2020-06-02 11:35:07 -07:00
Jonathan Thomas
7ed26cf022 Replace _Pragma with #pragma
Co-authored-by: Frank Dana <ferdnyc@gmail.com>
2020-06-02 13:30:05 -05:00
eisneinechse
93d12e7f14 Include data for fps in clip created by ffmpeg 4+ 2020-06-02 08:53:39 -07:00
Jonathan Thomas
e4dd72669f Fix FPS setting on FFmpeg 4, which currently is not setting a valid FPS. 2020-06-01 13:24:07 -05:00
Frank Dana
6336f30ee3 Various: Remove unused variables (#467)
Several data members and local variables were flagged by static
analysis tools as never being used anywhere in the code.
2020-04-22 02:02:55 -04:00
SuslikV
aac27d5ff7 Add non-subsampled color format for h264 encoder
Forces the 4:4:4 color format for "0 crf" and "0 cqp" setting of the
H264 encoder. By default, the 4:2:0 is used, that is not lossless
itself.
2020-03-29 12:06:50 +02:00
FeRD (Frank Dana)
999887687c FFmpegWriter: Free any old context before clobbering
valgrind caught that AVFORMAT_NEW_STREAM() could be leaking pointers
when calling avcodec_alloc_context3(), if there's an existing context
already assigned. So we check and free it first, if necessary.
2020-03-22 12:29:36 -04:00
FeRD (Frank Dana)
f9a91a5a92 FFmpegWriter: Replace AVRational casts with av_make_q()
Some compilers balk at the compound initializers in the cast form
2020-03-22 12:29:36 -04:00
FeRD (Frank Dana)
527acfe77a FFmpegWriter: (a/v)_codec => (a/v)_codec_ctx
The audio_codec and video_codec vars have type AVCodecContext.
Renaming them to reflect that makes the code easier to follow.

A couple of places in FFmpegUtilities macros that also used
context variables named _codec got the same fix.
2020-03-22 12:29:36 -04:00
SuslikV
c28a8bf4ed Fix float to int16_t conversion
Float values after mix or gain applied can exceed the (1.0; -1.0)
range. This caused distortion in audio instead of limiting values
at max.
2020-03-16 14:41:49 +02:00
FeRD (Frank Dana)
92ebd15545 FFmpegWriter: Code reformatting 2020-03-05 01:38:25 -05:00
FeRD (Frank Dana)
3a88d21866 FFmpegWriter: Drop ancient FFmpeg code
- Drop any FFmpeg version checks for versions older than 2.6
- Remove code that was only used in FFmpeg 2.4 or lower
- Add human-readable version comments to checks for 
LIBFOO_VERSION_MAJOR. etc.
2020-03-05 01:38:07 -05:00
FeRD (Frank Dana)
5764b03544 FFmpegWriter: Use std::clog for output
- Eliminate fprintf(stderr...) and non-threadsafe std::cerr
- Replace with thread-safe std:clog or ZeroMQ calls
- Clean up some formatting & ZeroMQ logging
2020-03-04 23:53:04 -05:00
eisneinechse
6476f930bb Simplify fix for RAWVIDEO handling for ffmpeg 4+ 2020-03-01 17:10:39 -08:00
eisneinechse
ddd52460e1 Fix handling of RAWIMAGE under ffmpeg 4 2020-03-01 16:59:06 -08:00
Jonathan Thomas
4ddf775cdf Merge pull request #421 from ferdnyc/ffmpegwriter-opts
FFmpegWriter: Overload Set___Options() methods
2020-02-27 15:27:31 -06:00
eisneinechse
e03cd87373 Initial svt-hevc (h.265) encoder support added 2020-02-17 10:56:00 -08:00
eisneinechse
6711c9c788 Minor improvements 2020-02-16 19:16:45 -08:00
eisneinechse
f63c1e0a65 Newer codecs 2020-02-16 10:00:18 -08:00
FeRD (Frank Dana)
7867cf01b8 Reorder arguments in setVideoOptions overload
- The new ordering (with the frame rate AFTER width and height) doesn't
  match the other signature, but it *is* consistent with the Timeline
  constructor, and it just feels more natural
- Added overloaded-function notes to doxygen strings in FFmpegWriter.h
- Also added a warning about the argument order mismatch above
2020-02-14 11:53:28 -05:00