Commit Graph

56 Commits

Author SHA1 Message Date
Jonathan Thomas
a42e257521 Many small improvements, bug fixes, and build system fixes for newer systems that have both qt4 and qt5. 2013-09-08 16:08:56 -05:00
Jonathan Thomas
6cac382773 Fixed most build warnings on Mac OS X 2013-06-09 01:08:23 -05:00
Jonathan Thomas
6171abfe1a Added a Sleep.h header, which defines an OS specific sleep metho. 2013-06-06 12:12:08 -05:00
Jonathan Thomas
a8fa5a91d2 libavcodec version 54 requires a different formula for nb_samples, used in audio encoding. So, I've added in conditional code, so audio works on the newest version of FFmpeg. 2012-12-03 13:03:04 -06:00
Jonathan Thomas
e264d4fcab Fixed a really huge audio issue, related to audio timestamps, gaps, and also mono vs stereo issues. This is the best audio support I've accomplished thus far. =) 2012-12-03 04:51:17 -06:00
Jonathan Thomas
d3ef1fac13 Refactored the audio waveform generation into the Timeline class. Added the ability to set the volume, and the ability to mix layers of audio samples together. Also, made the waveform's have a transparent background, so they can be layered on top of other layers. 2012-11-29 16:32:48 -06:00
Jonathan Thomas
547a0dbc63 Improved the flush_encoders method to not raise errors if it encounters errors encoding NULL AVFrames. 2012-11-18 10:45:16 -06:00
Jonathan Thomas
4a96a3b745 Fixed an invalid audio alignment settings on avcodec_fill_audio_frame, which was crashing everything on newer versions of ffmpeg. 2012-11-17 16:10:01 -06:00
Jonathan Thomas
bf05afbfa7 Fixed the flush_encoders method to support older versions of FFmpeg 2012-11-17 03:13:00 -06:00
Jonathan Thomas
dbeb8d1c14 Only use avcodec_encode_video2 if FFmpeg major version is 54 2012-11-17 02:47:48 -06:00
Jonathan Thomas
d6d885982c Better detection of av_err2str, by using it's macro name 2012-11-17 02:17:38 -06:00
Jonathan Thomas
729e6fd14c Added in more conditional checks for older versions of FFmpeg, so libopenshot will compile on more platforms. 2012-11-17 01:57:57 -06:00
Jonathan Thomas
51ef59a8a4 Removed some unneeded code 2012-11-16 17:17:55 -06:00
Jonathan Thomas
8fb94cc123 Updated the FFmpegWriter to use compiler #IF commands to be compatible with older and newer versions of FFmpeg. This is still a work in progress, but many of the newer commands are now being protected. 2012-11-16 17:15:44 -06:00
Jonathan Thomas
bff37d0072 Added in openMP code to improve performance on the timeline layer merging, which is very CPU intensive. 2012-11-12 17:21:21 -06:00
Jonathan Thomas
5b77abdf27 The timeline classes are finally working correctly, and have the following features:
1) Layers (unlimited # of layers)
2) IN, OUT, and Position (time)
3) X, Y offset
4) Alpha
5) Rotation
6) Transparency + compositing + overlays
2012-11-08 04:35:21 -06:00
Jonathan Thomas
6e9f2a6a9b Changed audio and video PTS to start at 0, and it fixed the final issues I have had with generating valid videos in multiple codecs. 2012-10-28 23:38:24 -05:00
Jonathan Thomas
7dd94a02e4 Added code to flush the encoders, and also write the final frame's audio samples 2012-10-28 03:35:50 -05:00
Jonathan Thomas
60ffebe1fe Replaced avcodec_encode_audio with avcodec_encode_audio2, and completely redid the way PTS values are calculated and set. Another nice improvement! 2012-10-27 21:36:08 -05:00
Jonathan Thomas
bf93f6941e Fixed some major issues with the FFmpegWriter, which was not setting the correct PTS values 2012-10-26 17:15:17 -05:00
Jonathan Thomas
5fcead37f2 Added frame counter to writer class, to help generate a valid PTS 2012-10-26 02:11:39 -05:00
Jonathan Thomas
a34902f0f5 Removed some unneeded code in the FFMpegWriter 2012-10-24 11:10:35 -05:00
Jonathan Thomas
617088cebf Yet another huge refactor, to use shared_ptr objects instead of actual pointers, due to the difficulties in managing the lifecycle of pointers between the timeline, clip, and readers. Seems to work great, and solves all sorts of bugs. =) 2012-10-14 03:43:52 -05:00
Jonathan Thomas
a601bcef2d Another huge refactor and lots of big fixes! Time mapping now works... mostly. The jumpy / glitchy images have been solved by copying the AVFrame into an AVPicture, which does not get clobbered on the next decode.
Also, added a new frame number overaly (in the top, left part of the image), and a new AddColor() method, to change the size and color of the frame's image...

Padded the end of the FFmpegWriter / WriteTrailer() method, to avoid having a codec ignore the last many frames.
2012-10-12 00:54:53 -05:00
Jonathan Thomas
a23e32874e Tweaked the number of FFmpeg threads, to optimize codec performance. 2012-08-31 15:19:17 -05:00