91 Commits

Author SHA1 Message Date
mvji
16f5fe5ee2 obs-ffmpeg: Add m4v extension to open file dialog 2022-07-09 13:45:29 -04:00
gxalpha
bfa7f1a88e obs-ffmpeg: Remove duplicate "FFmpeg Options" locale 2022-05-21 15:45:17 -07:00
Matt Gajownik
73e6df5d09 obs-ffmpeg: Fix memory leak 2022-05-17 23:13:17 +10:00
stopforumspam
035ac5e3b7 obs-ffmpeg: Allow setting FFmpeg options for media sources 2022-05-16 15:17:13 -04:00
Richard Stanway
8bd4ef61a0
obs-ffmpeg: Change types to avoid unnecessary casts 2022-05-07 16:01:48 +02:00
mvji
19defbcf04 obs-ffmpeg: Add mxf extension to open file dialog 2022-04-12 12:11:44 -04:00
pkv
5b0c09a9f4 obs-ffmpeg: Force mpegts format & disable restart on activate for srt & rist
This fixes crashes in media Source when :
- the user forgets to set the input format for srt or rist URLs;
- disabling / enabling / disabling etc Media source with a rist URL.

Signed-off-by: pkv <pkv@obsproject.com>
2022-02-19 15:17:19 -08:00
jpark37
15e37f96d1 obs-ffmpeg: Add linear alpha setting
Allow proper linear treatment of alpha for authoring sanity.
2021-06-04 19:04:08 -07:00
Eric Lindvall
3c76fc4ddb obs-ffmpeg: Enable macOS hardware decoding for media source
Reverts  c7395b05ece4b9e204aa90984c8e29bd3eb739d9
2021-03-30 03:45:06 -07:00
Christopher P Yarger
fc6d2954fd obs-ffmpeg: Fix bug with obs_source_media_play_pause 2021-03-04 23:43:14 -08:00
Jim
2eca4d80b6
Merge pull request #2233 from VodBox/missing-files-dialog
libobs + UI: Add Missing Files API & Dialog
2021-01-31 08:02:16 -08:00
VodBox
fb95e1d1e9 libobs: Add missing file API to sources 2021-01-17 10:31:58 +13:00
Meng Li
96c7790d80 obs-ffmpeg: Always fully restart remote media sources
When a media source is set to use a URL, always fully shut down the
media when stopped. This ensures that the media will do a full
reconnect after having been stopped.
2021-01-12 19:47:44 -08:00
Clayton Groeneveld
d2d99ac5fc obs-ffmpeg: Fix crash when seeking with no media
This fixes a crash when seeking when there is no valid
media.
2020-08-24 02:43:42 -05:00
jp9000
4b17b82aab obs-ffmpeg: Set async video frame immediately when seeking 2020-07-29 13:59:49 -07:00
Richard Stanway
80803aa2f7 obs-ffmpeg: Clear texture when starting playback
This prevents a stale texture from being visible for a single frame when
there is no preloaded video.
2020-07-23 23:56:30 +02:00
Exeldro
663605f650 obs-ffmpeg: Fix play pause crash 2020-07-12 20:11:47 +02:00
Jeremy Cole
974cd4350b obs-ffmpeg: Allow continuous network streaming
This change breaks the tying of the 'close' option to the media
source being a local file vs. network source. In doing so, it is
possible to keep network sources streaming continuously, which
fixes a few things when using network cameras as sources:

* The preview pane works in studio mode.
* There is no delay in switching scenes before video appears.
* The multiview works properly/normally.

This does introduce one bit of weirdness which could be easily fixed
with sufficient knowledge of OBS to do it quickly: if a networked media
source fails with both 'Restart playback when source becomes active' and
'Close file when inactive' disabled, it is slightly tricky to get it to
restart the video stream. (It can be done by enabling those options and
hiding the scene, though.) It would be nice to have a simple "restart
stream" button somewhere to do this more easily.
2020-07-08 07:05:11 -07:00
yoho
0a4b1d622c obs-ffmpeg: Add auto reconnect to remote media sources
(Note: This commit also modifies deps/media-playback)

Co-authored-by: Eric Lindvall <eric@5stops.com>
Co-authored-by: Ryan Foster <RytoEX@gmail.com>
Co-authored-by: Jim <obs.jim@gmail.com>
2020-07-05 08:31:05 -07:00
Jim
9607a9f46e
Merge pull request #2384 from LiamCoal/allow-no-buffering
media-playback: Unbuffered Media Source
2020-05-21 17:40:08 -07:00
Clayton Groeneveld
62b1911e33 obs-plugins: Check if sources are showing for media hotkeys 2020-04-26 21:57:01 -05:00
Bennik2000
26810c31b6 obs-ffmpeg: Fix media source not closing file when inactive 2020-04-13 09:13:16 +02:00
jp9000
f60c961ae1 obs-ffmpeg: Make sure hotkeys are actually pressed
Explicitly checks to make sure hotkeys are actually down, rather than
both down and up.  This was causing the restart hotkey to restart the
media twice, once on key down, once on key up.
2020-03-07 08:14:44 -08:00
jpark37
1121f32b40 obs-ffmpeg: Fix type conversion warning 2020-02-29 20:57:17 -08:00
Clayton Groeneveld
0b3a1711d0 obs-ffmpeg: Use callbacks when starting/ending 2020-02-10 23:49:05 -06:00
LiamCoal
2b7f4dfa6b media-playback: Unbuffered Media Source
When using an IP camera on a local network, we wanted to minimize
delay. In order to achieve minimum delay, we allowed Media Source to
set BufferingMB to 0, and when it is 0, also enable AVFMT_FLAG_NOBUFFER
in the AVFormatContext flags.
2020-02-07 20:38:06 -08:00
Clayton Groeneveld
abcff0073c obs-ffmpeg: Add media hotkeys 2020-02-05 08:14:51 -08:00
Clayton Groeneveld
68f8206877 obs-ffmpeg: Add media control support 2020-02-05 08:14:49 -08:00
Clayton Groeneveld
82ffcdc827 UI: Add source icons 2019-11-24 20:50:42 -08:00
jp9000
89586ef441 obs-ffmpeg: Remove unbuffered mode from media source
Unbuffered mode is causing the frames of media sources to potentially
have some slight jitter in playback, so instead of using unbuffered mode
with media sources, just leave buffering on.  There may be a frame or so
of latency, but it shouldn't be noticeable to most users.
2019-10-05 15:40:12 -07:00
jp9000
66967b7a55 obs-ffmpeg: Do not enable hardware decoding by default
If a user has a tremendous amount of media files, this can cause
instability.  Instead, make hardware decoding something the user has to
explicitly enable.

Although hardware decoding was technically enabled by default even
before we fixed it, fixing it was essentially a change to defaults for
users because it was just not even available before version 24.
2019-09-24 03:04:18 -07:00
Clayton Groeneveld
3ea354b4e4 UI, obs-plugins: Add spinbox suffixes where necessary 2019-07-18 04:03:38 -05:00
jp9000
f53df7da64 clang-format: Apply formatting
Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed.  Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.
2019-06-23 23:49:10 -07:00
Ryszard Knop
358194764b obs-ffmpeg: Bind network buffer size in the UI
Input buffer by default is set to 2MB - for some sources, for example streaming
RTSP input over UDP, this is not enough and causes significant playback issues
that are not present while playing back the same source under ffplay/mpv.

It looks like someone actually started working on this feature as there are
translated strings, properties and everything ready - only the control was
missing from the UI. This commit adds that control.

Currently, the range is set to 1-16MB, step 1MB. This is somewhat arbitrary,
so suggestions to tweak this range with more real-world use cases are welcome.
2018-12-10 01:50:28 +01:00
Exeldro
277b664001 obs-ffmpeg: Add speed percentage option
(Note: This commit also modifies the deps/media-playback module.)

Allows modifying the speed of local file playback.

Closes jp9000/obs-studio#1091
2018-02-15 15:18:13 -08:00
jp9000
dc0363d3e8 deps/media-playback: Use a struct for media init data
Instead of using countless parameters for the media initialization data,
use a structure.
2018-02-15 13:32:35 -08:00
jp9000
0497095f97 Fix a number of GCC warnings 2017-12-06 16:42:45 -08: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
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
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
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
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