0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00
Commit Graph

34 Commits

Author SHA1 Message Date
Maya Venkatraman
49d351b537 obs-ffmpeg: Add HLS output
Add and register an obs_output_info struct called
ffmpeg_hls_muxer. It uses ffmpeg's HLS muxer to stream output.

Add threading and buffer to reduce skipped frames.
Also add frame drop logic when there are too many packets in the
buffer for congestion control.
2020-10-13 13:54:42 -07:00
Maya Venkatraman
87a64e6565 obs-ffmpeg: Move muxer structure/funcs to header
(Jim) Allows the ability to use it for more output types.
2020-10-13 13:29:15 -07:00
pkv
91418e901c obs-ffmpeg: Use obs-ffmpeg-mux for mpegts network output
This replaces the ffmpeg-encoded-output which had serious issues
(missing headers, muxing issues with non compliant mpegts streams) with
an output grafted from obs-ffmpeg-mux.
2020-05-19 16:15:41 -07:00
jp9000
7993179466 cmake: Add cmake folders 2020-05-13 06:52:37 -07:00
Colin Edwards
55e2985026
Merge pull request #1944 from WizardCM/windows-rc-definition
CMake: Build Windows modules with file descriptors
2020-04-18 18:27:22 -05:00
Aaron Boxer
b55b1e9bfd obs-ffmpeg: Add new ffmpeg-encoded-output 2019-11-27 14:40:52 -05:00
derrod
5e183ff9a7 obs-ffmpeg: use avcodec_find_best_pix_fmt_of_list
The built-in format selector failed in certain cases like UtVideo now
using a differently packeg RGB format. FFmpeg has a format selection
functionality built-in that does pick the correct format however
(avcodec_find_best_pix_fmt_of_list), so we can simply use that instead.
2019-10-17 08:07:27 +02:00
Matt Gajownik
51be039cf8 CMake: Build Windows modules with file descriptors 2019-10-15 21:34:12 +11:00
jp9000
617086b040 obs-ffmpeg: Separate logging code
Cleans up obs-ffmpeg.c and separates all the logging code to a different
file, which can be enabled with ENABLE_FFMPEG_LOGGING.
2019-07-09 10:07:24 -07:00
jp9000
ed0c7bcd6a obs-ffmpeg: Add texture-based NVENC encoder implementation
Adds a texture-based NVENC implementation which passes OBS NV12 output
textures directly to NVENC without downloading them off of the GPU,
increasing NVENC performance by a significant margin.

If NV12 textures are unavailable or the new encoder fails to initialize
for whatever reason, it will fall back to the FFmpeg NVENC
implementation safely.
2019-02-07 17:00:47 -08:00
Thomas Crider
a64ae11bce obs-ffmpeg: Add linux VAAPI h.264 encoding support
Closes obsproject/obs-studio#1482
Closes obsproject/obs-studio#1256
2018-09-24 23:12:24 -07:00
jp9000
58c4f0ac91 obs-ffmpeg: Rename obs-ffmpeg-aac.c file
Renames obs-ffmpeg-aac.c to obs-ffmpeg-audio-encoders.c due to the fact
that it can be abstracted for multiple audio encoders.
2017-07-31 14:29:50 -07:00
jp9000
45d029b1fb obs-ffmpeg: Change from libff to media-playback 2017-03-31 12:10:32 -07:00
jp9000
8e1943065c obs-ffmpeg: Add FFmpeg NVENC encoder 2016-04-19 09:20:26 -07:00
jp9000
c87d3b1f12 cmake: Rename FindFFMpeg to FindFFmpeg
This was sort of driving me crazy: The 'm' in FFmpeg isn't supposed to
be capitalized.
2015-07-18 16:32:26 -07:00
jp9000
9048743ebe obs-ffmpeg: Add ffmpeg muxer
In addition to the flv file format, this allows the ability to save to
container formats such as mp4, ts, mkv, and any other containers that
support the current codecs being used.

It pipes the encoded data to the ffmpeg-mux process, which then safely
muxes the file from the encoded data.  If the main program unexpectedly
terminates, the ffmpeg-mux piped program will safely close the file and
write trailer data, preventing file corruption.
2015-06-21 22:34:49 -07:00
jp9000
33a040b025 obs-ffmpeg: Add ffmpeg muxer pipe program 2015-06-21 22:34:49 -07:00
John Bradley
2fc6c4d725 obs-ffmpeg: Add FFMpeg input source 2015-03-09 21:22:32 -05:00
martell
b8055ed944 obs-ffmpeg: avoid w32-pthreads for mingw-w64
mingw-w64 provides its own pthreads library
2015-02-09 03:41:51 -08:00
jp9000
d3f92ca5d6 obs-ffmpeg: Make FFmpeg a usable output
This makes FFmpeg usable as an output, and removes or changes most of
the code that was originally intended for testing purposes.

Changes the settings for the FFmpeg output to the following:
* url:             Sets the output URL or file path
* video_bitrate:   Sets the video bitrate
* audio_bitrate:   Sets the audio bitrate
* video_encoder:   Sets the video encoder (by name, blank for default)
* audio_encoder:   Sets the audio encoder (by name, blank for default)
* video_settings:  Sets custom video encoder FFmpeg settings
* audio_settings:  Sets custom audio encoder FFmpeg settings
* scale_width:     Image scale width (0 if none)
* scale_height:    Image scale height (0 if none)

The reason why scale_width and scale_height are provided is because it
may internally convert formats, and it may be a bit more optimal to use
that scaler instead of the pre-output scaler just in case it already has
to convert formats internally anyway (though you can do it either way
you wish).

Video format handling has also changed; it will now attempt to use the
closest format to the current format if available for a given video
codec.
2015-02-04 16:51:54 -08:00
BtbN
599febcb54 cmake: Replace FFMpeg modules with single module
Now using components instead of one find_package call per module
2014-09-27 09:41:13 -07:00
BtbN
02725acdd4 Fix double invocation of install_obs_plugin in every single plugin 2014-08-19 14:24:59 +02:00
BtbN
38c2fc87aa Move all data into the subdir it belongs to
Completely removes the build dir in favor of cmake based build layouting
2014-07-19 01:38:41 +02:00
jp9000
482791c5b6 Add locale for modules 2014-07-11 17:29:00 -07:00
BtbN
8b14aa8f4a Add missing header to CMakeLists.txt 2014-06-28 20:54:14 +02:00
BtbN
e2c2e50f4c Fix ffmpeg/x264 find modules according to cmake find module naming conventions 2014-05-22 13:03:47 +02:00
BtbN
ce542525fc Fix dependency on win32-pthreads 2014-05-08 14:43:16 +02:00
BtbN
075820028f Improve bundle fixup 2014-04-13 11:05:46 -07:00
jp9000
cabe98cb4e Add FFmpeg's AAC enoder
This just adds FFmpeg's default AAC encoder as an audio encoder.  Going
to try to start getting things going with the RTMP output library next.
2014-04-05 01:13:11 -07:00
Palana
1044fa0e86 Add Libavutil dependency for obs-ffmpeg plugin
av_frame_alloc, av_frame_free, among others, live in libavutil
2014-02-18 15:06:32 +01:00
jp9000
8e81d8be56 Revamp API and start using doxygen
The API used to be designed in such a way to where it would expect
exports for each individual source/output/encoder/etc.  You would export
functions for each and it would automatically load those functions based
on a specific naming scheme from the module.

The idea behind this was that I wanted to limit the usage of structures
in the API so only functions could be used.  It was an interesting idea
in theory, but this idea turned out to be flawed in a number of ways:

 1.) Requiring exports to create sources/outputs/encoders/etc meant that
     you could not create them by any other means, which meant that
     things like faruton's .net plugin would become difficult.

 2.) Export function declarations could not be checked, therefore if you
     created a function with the wrong parameters and parameter types,
     the compiler wouldn't know how to check for that.

 3.) Required overly complex load functions in libobs just to handle it.
     It makes much more sense to just have a load function that you call
     manually.  Complexity is the bane of all good programs.

 4.) It required that you have functions of specific names, which looked
     and felt somewhat unsightly.

So, to fix these issues, I replaced it with a more commonly used API
scheme, seen commonly in places like kernels and typical C libraries
with abstraction.  You simply create a structure that contains the
callback definitions, and you pass it to a function to register that
definition (such as obs_register_source), which you call in the
obs_module_load of the module.

It will also automatically check the structure size and ensure that it
only loads the required values if the structure happened to add new
values in an API change.

The "main" source file for each module must include obs-module.h, and
must use OBS_DECLARE_MODULE() within that source file.

Also, started writing some doxygen documentation in to the main library
headers.  Will add more detailed documentation as I go.
2014-02-12 08:04:50 -07:00
jp9000
590a486343 Updated cmake files for ffmpeg plugin
Also, fixed an enum name issue.  No clue why visual
studio actually compiled that without warnings/errors
2014-02-10 07:14:51 -08:00
BtbN
074f9627b7 Fixup OSX Rpath for imported external libraries on install 2014-01-28 23:07:49 +01:00
BtbN
45ec80fb7d Full rewrite of all CMakeLists
CMake now works on all platforms
2014-01-24 18:56:32 +01:00