Commit Graph

191 Commits

Author SHA1 Message Date
Chris Kirmse
650d3ec820 fix grammar error with possessive its and update sample for audio parameter 2019-03-14 09:26:56 -07:00
Jonathan Thomas
728e0022a2 MP3 Special Handling & Missing Frame Refactor (#196)
* Handle MP3 files with special logic, since they typically only have 1 frame of video

* Better support for missing frames (handling of missing audio and missing video data separated), and fixed a missing audio regression.
2019-02-27 23:25:54 -06:00
Jonathan Thomas
f009b0f46c Fix default sizes on readers without MAX_WIDTH and MAX_HEIGHT settings (#188) 2019-01-22 22:14:30 -06:00
Jonathan Thomas
7b6eb9c21b Integration of resvg SVG library (optional during build) (#185)
* Integration of libresvg SVG library (optional during build)

* Major refactor of max_width and max_height for preview optimization

* Fixed many bugs related to preview resizing, with regards to cached frames

* Updating gitlab CI to find RESVGDIR correctly for windows, and adding svgz support

* Updating cmake findresvg module to search for windows locations first, to prevent an issue on our windows builders and updating some CMake output.

* Removing folder path from resvg header, since it could be installed in different named folders. This is an attempt to fix Windows include issues.

* Making call to AV_FREE_FRAME conditional for non windows systems (because it crashes on Windows for seemingly no reason). Needs more investigation.
2019-01-19 02:18:52 -06: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
Jonathan Thomas
b63a63ceb2 Fix many bugs around FPS and video length calculation (especially for MP3 and streaming WEBM formats). Also protecting samples_per_frame calculation to keep from crashing on undetected FPS. 2018-09-17 00:27:30 -05: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
Jonathan Thomas
435932f415 Fixing another issue where larger FPS files are incorrectly changed to a different FPS 2018-08-02 00:40:44 -05:00
Jonathan Thomas
93c1e2eb49 Fixing bitrate calculation (to be in bytes instead of bits), and adding in FPS detection for files which don't have valid FPS. In those cases (streaming files for example), we iterate through all packets, and average the # of frames, duration, bit rate, etc... Not idealy, but a better fallback. 2018-07-25 02:24:01 -05:00
Jonathan Thomas
cc17315fa7 Merge branch 'develop' into release 2018-06-29 23:48:47 -05: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
694ee7c24e New experimental protections for FFmpegReader::GetFrame, and better frame ordering. Thanks @PeterM! (#125) 2018-06-21 02:44:08 -05:00
Jonathan Thomas
bc5607910d Fixing audio pops due to resampling (this fixes a bunch of audio popping-related bugs). Now Frame objects track their own max_audio_sample_count, as we add audio data... so we have an accurate bounds on each frame. 2018-05-30 03:20:31 -05:00
Jonathan Thomas
a4c1b818ba Don't remove nearby working frames (trying to catch less things in our too old logic). This prevents lots of invalid cache situations during preview. 2018-05-27 00:12:50 -05:00
Rich Alloway
f6eb6ff96b Increase valid frame rates to 240 fps since many cameras now support this higher frame rate 2018-05-15 15:49:11 -04:00
Jonathan Thomas
54d6cf5995 Removing old frames from WorkingCache (when no longer needed). This helps prevent freezing looking for old frame data on certain videos. 2018-04-14 18:01:27 -05:00
Jonathan Thomas
2233496066 Changing some Seek values to be more accurate, and fixes a race condition with Timeline_Tests.cpp. Also increasing the default amount of cache in FFmpeg, based on the # of processors, to better support high framerate videos. 2018-04-14 16:25:13 -05:00
Jonathan Thomas
774eb365b3 FFMPEG 3.2 support for FFmpegReader (writer support coming soon) 2018-03-21 02:10:46 -05:00
Jonathan Thomas
f2b0f3a0f4 Adding metadata from format, audio stream, and video streams to ReaderBase.info, which in some cases includes the 'rotate' metadata added by certain cameras, and audio metadata like title, album, artist, copyright, dates, etc... Auto-Rotates any Clip with Reader metadata 'rotate' attribute. 2018-02-03 01:57:18 -06:00
Jonathan Thomas
b81696affd Fixing black frames at end of video clips, if audio stream longer than video stream, and end-of-stream is reached. 2018-01-06 16:44:54 -06:00
Jonathan Thomas
2fcb35ddcc Removing throw statements from header files (thanks Peter) 2017-10-26 18:44:35 -05:00
Jonathan Thomas
0ca3f2d663 Fixing 16 thread limit on FFmpegReader 2017-10-01 17:54:21 -05:00
Jonathan Thomas
d3225a80b5 Fixing a cast from long to int64_t 2017-09-28 16:31:13 -05:00