Commit Graph

231 Commits (ffdecc34f4148d6ef1dce937776c4fe899494778)

Author SHA1 Message Date
Michel 94b5982216 obs-ffmpeg: Improve NVENC detection
Certain NVIDIA GPUs don't support NVENC, but ship with the NVENC
library, causing OBS to mistakenly think that NVENC is available when it
actually isn't.

Closes jp9000/obs-studio#1087
2017-12-02 08:08:52 -08:00
pkviet bbac3280c1 libobs: Add surround sound audio support
(This commit also modifies the following modules: UI,
deps/media-playback, coreaudio-encoder, decklink, linux-alsa,
linux-pulseaudio, mac-capture, obs-ffmpeg, obs-filters, obs-libfdk,
obs-outputs, win-dshow, and win-wasapi)

Adds surround sound audio support to the core, core plugins, and user
interface.

Compatible streaming services: Twitch, FB 360 live
Compatible protocols: rtmp / mpeg-ts tcp udp
Compatible file formats: mkv mp4 ts  (others untested)
Compatible codecs: ffmpeg aac, fdk_aac, CoreAudio aac,
		   opus, vorbis, pcm (others untested).
Tested streaming servers: wowza, nginx
	 HLS, mpeg-dash : surround passthrough
Html5 players tested with live surround:
	 videojs, mediaelement, viblast (hls+dash), hls.js
Decklink: on win32, swap channels order for 5.1 7.1
         (due to different channel mapping on wav, mpeg, ffmpeg)
Audio filters: surround working.
Monitoring: surround working (win macOs linux (pulse-audio)).
VST:	 stereo plugins keep in general only the first two channels.
	 surround plugins should work (e.g. mcfx does).
OS: win, macOs, linux (alsa, pulse-audio).
Misc: larger audio bitrates unlocked to accommodate more channels
NB: mf-aac only supports mono and stereo + 5.1 on win 10
         (not implemented due to lack of usefulness)

Closes jp9000/obs-studio#968
2017-11-26 03:41:53 -08:00
jp9000 edf34fdf25 obs-ffmpeg: Log bad muxer settings with FFmpeg output 2017-11-24 21:18:57 -08:00
jp9000 ee63fc69ac obs-ffmpeg: Use muxer settings with AVIOContext
In the FFmpeg output, it was not passing the muxer settings to the
AVIOContext, so some settings would not be properly passed to protocols.
2017-11-24 21:18:52 -08:00
pkviet d670d7badb libobs: Fix FFmpeg constants
(This commit also modifies the deps/media-playback, obs-ffmpeg, and
win-dshow modules)

More fixes due to ffmpeg renaming some constants and deprecating
AVFMT_RAWPICTURE and AV_PIX_FMT_VDA_VLD.
Latter replaced by AV_PIX_FMT_VIDEOTOOLBOX per ffmpeg dev advice.

Closes jp9000/obs-studio#1061
2017-11-16 21:38:37 -08:00
Richard Stanway 95f20c84ba obs-ffmpeg: Use new ffmpeg constants 2017-10-26 19:17:53 +02:00
jp9000 7bd06e7f26 Update translations from Crowdin 2017-10-17 05:39:22 -07:00
jp9000 c9182a9878 obs-ffmpeg: Fix potential seek issues with media source
(This commit also modifies deps/media-playback)

Before, the media-playback library would detect whether something was
seekable by checking the filename for "://", which is unideal because
there are other cases where targets may not be seekable.  So instead, an
explicit "seekable" property (off by default) is now in place in the
media source when not in "local file" mode.  Seeking will only be
enabled if local file mode is on, or if "seekable" is explicitly checked
by the user.

Closes jp9000/obs-studio#1022
2017-09-17 05:55:56 -07:00
chinasarft 1ef4de7ce3 obs-ffmpeg: Don't mark to destroy media unless valid
Closes jp9000/obs-studio#1021
2017-09-15 05:51:52 -07:00
Gol-D-Ace 8d8c2e5a22 Update translations from Crowdin 2017-08-10 16:07:40 +02:00
derrod 8b3921ffbf obs-ffmpeg: Add proc handler for getting number of frames in video
Allows getting (approximate) number of frames in a media file.
2017-08-08 10:06:56 +02:00
Richard Stanway ca5f123030
obs-ffmpeg: Improved output error handling
Checks the output path is writable and checks for failure to start the
ffmpeg-mux subprocess.
2017-08-07 00:32:49 +02:00
jp9000 fa611dcd76 obs-ffmpeg: Add Opus audio encoder 2017-08-01 02:14:58 -07:00
jp9000 d2ffd0fdd2 obs-ffmpeg: Ensure sample rate is supported in audio encoder
Ensures that the sample rate is supported in the audio encoders, and if
not, then make it automatically resample to the closest sample rate.
2017-07-31 14:51:21 -07:00
jp9000 0089d379b0 obs-ffmpeg: Make FFmpeg audio encoder abstractable
Abstracts the FFmpeg audio encoder to allow other codecs to use the same
code, and makes the AAC encoder derived from it.
2017-07-31 14:48:20 -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 cffbdd6408 obs-ffmpeg: Add proc handler function to get media duration
Allows getting the duration of a video via the proc handler of the
source.
2017-07-19 16:23:06 -07:00
Jim cfe77fdaae Merge pull request #938 from admshao/incompatible-pointer-types
plugins: Clear warnings about -Wincompatible-pointer-types
2017-07-01 10:37:32 -07:00
Shaolin e5756a922a libobs/plugins/UI: Suppress unused variables warnings
Closes jp9000/obs-studio#937
2017-06-27 21:55:37 -07:00
jp9000 d295ad3ed3 obs-ffmpeg: Remove "Buffering (MS)" property
There's no need to display this property at the moment, the default
amount is more than sufficient for most cases.  That and most people
wouldn't know what to do with it anyway.
2017-06-22 00:58:45 -07:00
Richard Stanway cef0689a36
ffmpeg-mux: Set error mode to SEM_FAILCRITICALERRORS
This prevents spurious dialog boxes appearing, such as "No disk is in the
drive" if the application attempts to access an invalid drive.
2017-06-21 17:41:08 +02:00
jp9000 b787c796cd obs-ffmpeg: Do not precache if set to close when inactive
In the media source, do not pre-cache frames if the source is set to
close the file when inactive because that setting is designed to allow
the file to be replaced by the user.  If it's replaced, it can
unintentionally keep the old precache frame, playing the frame from the
older video when it starts up.
2017-06-19 22:58:01 -07:00
jp9000 054148a0af obs-ffmpeg: Don't preload media frames if set to pause on end
Preloading is designed to overwrite the current internal render texture
of the source so it'll be ready to play the first frame right when the
source is first displayed.

However, When the media source is set to pause on the last frame, it
keeps that current render texture visible, so preloading it with the
first frame will essentially overwrite the current render, causing it to
inadvertently show and pause on the first frame rather than the last
frame.  So instead, just disable preloading when the user has it set to
pause on the last frame.
2017-06-14 08:30:44 -07:00
Shaolin cfcb2f4f39 plugins: Clear warnings about -Wincompatible-pointer-types
Signed-off-by: Shaolin <admshao@gmail.com>
2017-06-01 05:25:55 -03:00
jp9000 892a6548e7 obs-ffmpeg: Add network buffering property
(Note: This commit also modifies deps/media-playback)

Allows buffering network-based media sources where supported.  Default
is two megabytes of buffering.
2017-05-29 19:30:13 -07:00
jp9000 1738adf021 Revert "obs-ffmpeg/nvenc: Remove "default" preset"
This reverts commit d1343dc064.

Apparently people are having issues caused by this specific commit.
Going to temporarily revert for the time being.
2017-05-21 02:54:41 -07:00
Gol-D-Ace 5d25d800ad Fix German locale inconsistencies 2017-05-20 20:24:46 +02:00
Gol-D-Ace 3d2cacd782 Update translations from Crowdin 2017-05-20 10:18:41 +02:00
jp9000 c7395b05ec obs-ffmpeg: Disable media source HW accel. for now
Due to a noticeable frequency of crashes inside of FFmpeg when using
hardware encoding on mac, this feature is going to be disabled for now
pending more investigation at a later time.
2017-05-18 23:42:01 -07:00
jp9000 514387f7cd obs-ffmpeg: Always close network sources when inactive 2017-05-16 01:58:18 -07:00
jp9000 65c344d75d obs-ffmpeg: Only preload frames for local files 2017-05-16 01:58:01 -07:00
jp9000 d13fa96851 libobs: Don't use source flags for async buffering
(This commit also modifies the decklink, linux-v4l2, mac-avcapture,
obs-ffmpeg, and win-dshow modules)

Originally, async buffering for sources was supposed to be a
user-controllable flag.  However, that turned out to be less than ideal
because sources (such as the win-dshow plugin) were programmed with
automatic control over their buffering (such as automatically detecting
USB 2.0 capture devices and then enabling in those cases).

The fact that it was a flag caused a design flaw to where buffering
values would be overwritten when a source is loaded from save data.

Because of that, this flag is being deprecated and replaced with a
specific function to enable unbuffered mode instead.
2017-05-13 23:32:40 -07:00
jp9000 d6872af0a2 obs-ffmpeg: Implement get_total_bytes in recording outputs
Allows seeing statistics such as bitrate and total bytes saved for
recording outputs.
2017-05-13 01:21:20 -07:00
jp9000 8962899b77 obs-ffmpeg: Add signal/proc to restart media playback
A convenient feature if the user wants to trigger the media to play back
on the fly for whatever reason.
2017-05-10 19:54:03 -07:00
jp9000 8f4f38c30e obs-ffmpeg: Fix bug on non-MSVC compilers
This happens because the enum had the incorrect name, and microsoft
automatically treats all enums as integers in C, regardless of whether
they actually exist or not.  Microsoft makes terrible compilers and
whoever decided this was a good idea should be fired.
2017-03-31 12:45:47 -07:00
jp9000 1d69e359ec obs-ffmpeg: Always open on update unless set otherwise 2017-03-31 12:30:10 -07:00
jp9000 9174ba8403 obs-ffmpeg: Remove unnecessary open call 2017-03-31 12:28:10 -07:00
jp9000 45d029b1fb obs-ffmpeg: Change from libff to media-playback 2017-03-31 12:10:32 -07:00
BtbN d1343dc064 obs-ffmpeg/nvenc: Remove "default" preset
The "default" preset is not an actual default, but something Nvidia
decided to just call that way.  It yields the worst quality per bitrate
out of all the presets, for no actual benefits.  The actual FFmpeg
default is the hq one, which yields the best quality, especially when
twopass mode is enabled.

I can't think of a way to keep the "default" preset in a non-confusing
way, and as it gives no known benefits, might as well just remove it
entirely.

(Jim edit: Also made it so that if the settings have it set to
"default", it automatically treats it as "hq")

Closes jp9000/obs-studio#865
2017-03-25 02:08:06 -07:00
Gol-D-Ace dbf95bdc15 Update translations from Crowdin 2017-03-05 23:40:11 +01:00
Gol-D-Ace de1bbf4342 Update translations from Crowdin 2017-03-04 07:04:03 +01:00
Gol-D-Ace a13c0a3c29 Update translations from Crowdin 2017-02-27 20:54:02 +01:00
derrod bb51d3d2f8 obs-ffmpeg: Make gop size configurable
Closes jp9000/obs-studio#804
2017-02-25 09:07:55 -08:00
Michael Fabian Dirks ed6507ffcf obs-ffmpeg: Allow saving with different video codecs
Closes jp9000/obs-studio#794
2017-02-25 08:02:59 -08:00
Lionheart Zhang 5ade7f74f2 obs-ffmpeg/ffmpeg-mux: Fix failing when no video
(Jim: Technically this should never be used without video)

Closes jp9000/obs-studio#795
2017-02-25 06:50:55 -08:00
Jim da1fddbd84 Merge pull request #793 from juvester/unused-params
obs-ffmpeg, UI: Fix compiler warnings
2017-02-25 02:35:46 -08:00
jp9000 d9786a7d0a obs-ffmpeg: Add 'save' to replay buffer proc handler
Allows saving replays programmatically without having to use hotkeys.
2017-02-20 23:39:52 -08:00
Richard Stanway f86c538a5f
obs-ffmpeg: Fix custom audio codec parameters 2017-02-16 21:44:08 +01:00
Richard Stanway 4303253920
obs-ffmpeg: Be more verbose when custom params fail 2017-02-16 21:42:25 +01:00
juvester 133f8c311e obs-ffmpeg: Fix compiler warnings 2017-02-08 16:25:54 +02:00