149 Commits

Author SHA1 Message Date
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
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
jp9000
a0e8c7a5c1 win-dshow: Fix video playback when default format is MJPEG
Video playback doesn't work if the default format is MJPEG and there are
other formats to use; this is because the useDefaultConfig variable is
still set to true, which overrides the format value that would normally
tell it to convert to RGB.
2017-10-04 15:58:06 -07:00
Gol-D-Ace
8d8c2e5a22 Update translations from Crowdin 2017-08-10 16:07:40 +02:00
Gol-D-Ace
3d2cacd782 Update translations from Crowdin 2017-05-20 10:18:41 +02:00
jp9000
8bd76237d4 win-dshow: Update libdshowcapture to 0.5.12 2017-05-15 02:25:38 -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
mntone
117898477c win-dshow: Fix reallocation issue in ffmpeg-decode 2017-04-09 10:39:39 +09:00
jp9000
c422d84d6e win-dshow: Fix issue with activating when not set to
When the windows video device source source is set to only activate when
showing, it would still activate on first startup of the program even if
it was in another scene and not showing anywhere to the user.  This
fixes that issue.
2017-03-26 05:45:42 -07:00
Gol-D-Ace
dbf95bdc15 Update translations from Crowdin 2017-03-05 23:40:11 +01:00
jp9000
a8d7419732 win-dshow: Actually fix LGP issue
The LGP issue is caused by the device drivers returning two or more
packets in a single segment of audio data.  This fixes it by detecting
that and decoding subsequent packets.

When the FFmpeg audio decoder returns, it returns how many bytes of data
was decoded.  To have it decode multiple packets in a single segment,
just subtract the return value from the expected size, and if that size
is still larger than zero, then there are more packets in the segment to
decode.  Otherwise, stop.
2017-03-03 17:02:06 -08:00
jp9000
084e9daf88 Revert "win-dshow: Add LGP timestamp fix"
This reverts commit 32f60d07a3dc359d97873ca4f24d8400a5fc251f.
2017-03-03 17:02:05 -08:00
Gol-D-Ace
a13c0a3c29 Update translations from Crowdin 2017-02-27 20:54:02 +01:00
jp9000
32f60d07a3 win-dshow: Add LGP timestamp fix
LGP devices are devices that induce anger in any sane developer because
they're prone to bad audio timestamps when using their decoded data
directly.  For that reason, add a hack that smooths the timestamps
within a large threshold to prevent audio skipping.
2017-02-22 01:18:24 -08:00
Gol-D-Ace
6223ed6520 Update translations from Crowdin 2017-01-07 00:23:16 +01:00
Gol-D-Ace
69f0bc244a Update translations from Crowdin 2016-12-23 20:46:47 +01:00
Gol-D-Ace
90e805ad9b Update translations from CrowdIn 2016-11-16 00:32:47 +01:00
jp9000
ed85b22534 Update translations from CrowdIn 2016-11-03 13:32:52 -07:00
Gol-D-Ace
aadc7263c0 Update translations from Crowdin 2016-09-28 01:17:24 +02:00
jp9000
84613cecff win-dshow: Disable plugin and warn if submodule not found 2016-09-20 05:07:30 -07:00
jp9000
001f3c751b win-dshow: Add tooltip to "Use Buffering" option 2016-09-11 04:16:14 -07:00
Gol-D-Ace
cb036b2713 Update translations from Crowdin 2016-08-08 16:21:48 +02:00
Gol-D-Ace
81adb13f59 Update translations from Crowdin 2016-07-06 01:18:27 +02:00
jp9000
42d7bf1237 Revert "win-dshow: Reword "buffering" options to be more specific"
This reverts commit a6d7cbf221faff7590d8a37721d57b90c58ed53b.
2016-07-02 12:05:10 -07:00
jp9000
a6d7cbf221 win-dshow: Reword "buffering" options to be more specific
Due to users inquiring what the "buffering" option does, it would be
best to have a bit more details in its wording as to its function.
2016-07-01 17:03:13 -07:00
Kazuki Oishi
7328c2e2d7 win-dshow: Fix audio output mode not showing up 2016-06-05 00:27:28 +09:00
jp9000
3deae76395 win-dshow: Update libdshowcapture to 0.5.10
Fixes a crash with audio format enumeration
2016-05-26 15:24:16 -07:00
Gol-D-Ace
fe56a12867 Update translations from Crowdin 2016-05-14 00:27:59 +02:00
Gol-D-Ace
5ed7081213 Update translations from Crowdin 2016-04-23 10:29:21 +02:00
jp9000
e460dfeb83 win-dshow: Add 'deactivate when not showing' option
Useful for two purposes:

1.) When many devices are hooked up to the system and used in separate
scenes, but only one device active at once is desired

2.) Allows users who are dependent on outputting audio to desktop to
disable that audio (via disabling that device) when the device isn't
being displayed
2016-04-03 15:55:15 -07:00
jpk
dd75f1a661 win-dshow: Add support for Y800 video format (grayscale)
Add support for devices that can output in grayscale (Y800).
2016-03-24 03:34:05 -07:00
jp9000
69da1151e0 Update translations from Crowdin 2016-03-19 12:08:48 -07:00
jp9000
80fffeb144 win-dshow: Update libdshowcapture ver. to 0.5.8 2016-02-23 14:08:18 -08:00
dodgepong
ea9db8249b Add latest translations from CrowdIn 2016-01-31 18:28:35 -05:00
jp9000
959b6610c4 win-dshow: Update libdshowcapture to 0.5.7 2016-01-27 15:19:37 -08:00
jp9000
c431e0434c win-dshow: Pass proper range value to frame
The "full_range" member variable of the video frame was being passed
"false" each time even though it may not necessarily be set to partial
range
2016-01-27 15:07:15 -08:00
jp9000
cd97ce2a17 libobs: Add source output flag OBS_SOURCE_DO_NOT_DUPLICATE
Certain types of sources (display captures, game captures, audio
device captures, video device captures) should not be duplicated.  This
capability flag hints that the source prefers references over full
duplication.
2016-01-26 11:49:50 -08:00
Gol-D-Ace
2ee1d82860 Add latest translations from Crowdin 2015-11-16 21:04:55 +01:00
jp9000
ef4b826e97 win-dshow: Update to libdshowcapture 0.5.6
Adds LGP Lite capture support
2015-09-22 20:49:03 -07:00
dodgepong
76c18b079b Latest translations from CrowdIn 2015-09-22 23:33:29 -04:00
jp9000
6285a47726 (API Change) libobs: Pass type data to get_name callbacks
API changed from:
obs_source_info::get_name(void)
obs_output_info::get_name(void)
obs_encoder_info::get_name(void)
obs_service_info::get_name(void)

API changed to:
obs_source_info::get_name(void *type_data)
obs_output_info::get_name(void *type_data)
obs_encoder_info::get_name(void *type_data)
obs_service_info::get_name(void *type_data)

This allows the type data to be used when getting the name of the
object (useful for plugin wrappers primarily).

NOTE: Though a parameter was added, this is backward-compatible with
older plugins due to calling convention.  The new parameter will simply
be ignored by older plugins, and the stack (if used) will be cleaned up
by the caller.
2015-09-16 09:21:12 -07:00
jp9000
657619e642 win-dshow: Update libdshowcapture to 0.5.5 2015-08-23 20:27: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
0833651adc win-dshow: Update libdshowcapture to 0.5.4 2015-07-11 15:33:57 -07:00
jp9000
bdc1a052fe win-dshow: Fix mingw compiler errors/warnings 2015-07-11 14:26:52 -07:00
dodgepong
fb679bdd02 Add latest translations from CrowdIn 2015-07-08 14:56:07 -04:00
jp9000
e30255fbee win-dshow: Log device info on update
Logs all device settings on update
2015-07-06 17:03:41 -07:00
jp9000
5492c02e0b win-dshow: Add audio output mode options
This allows the ability to output the audio of the device as desktop
audio (via the WaveOut or DirectSound audio renderers) instead of
capturing the audio only.

In the future, we'll implement audio monitoring which will make this
feature obsolete, but for the time being I decided to add this option as
a temporary measure to allow users to play the audio from their devices
via the DirectShow output.
2015-06-05 10:49:50 -07:00
jp9000
c237638fb5 win-dshow: Update libdshowcapture to 0.5.3 2015-06-05 10:49:08 -07:00
jp9000
08e288c1ae win-dshow: Update libdshowcapture to 0.5.2 2015-05-18 12:33:33 -07:00