Commit Graph

398 Commits (2963b3b8edc1948d04f1e2d6ff12b37bb60b20d6)

Author SHA1 Message Date
cristisilaghi dd9f4fd22c obs-ffmpeg: Add missing translable string for "Profile" 2020-09-10 16:24:10 +03:00
Kurt Kartaltepe 8761fa1a2c obs-ffmpeg: fix crash with rawvideo
Some codecs have no recommended pix_fmts so we must check that pix_fmts
is not null before trying to find a good match. This just prays whatever
OBS is configure for is a valid format when users choose these oddball
codecs. When its not you should get a normal recording fail instead of a
crash now.

fixes #3031
2020-09-08 21:22:24 -07:00
jpark37 b6afaceeae Update VIDEO_CS_DEFAULT to mean 709 instead of 601
Consistent with modified default UI setting.
2020-09-06 20:51:28 -07: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
Jim bfdf5dc947
Merge pull request #2356 from jpark37/sycc-color-space
Color space refinements
2020-08-05 08:58:21 -07: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
jpark37 ffbc3ed923 obs-ffmpeg: Fix race and deprecation warnings
Attempt to simply shutdown sequence to avoid race between vidoe and
write threads. Can no longer join on write thread from write thread.

Also use codecpar instead of deprecated codec member.
2020-07-19 12:49:53 -07:00
jpark37 37f01b35f6 obs-ffmpeg: Improve color space handling
Add support for VIDEO_CS_SRGB.

Use SMPTE 170M for 601 instead of undef/BT470BG. This is the
American/Chromium way of handling 601.

Add color metadata to the container file as well via ffmpeg-mux.
2020-07-18 19:44:13 -07:00
jpark37 be4a859383 obs-ffmpeg: Fix FFmpeg deprecation warnings 2020-07-18 18:47:58 -07:00
Clayton Groeneveld 990a07dc18 UI, obs-ffmpeg, obs-filters: Fix compile warnings 2020-07-16 23:15:13 -05: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
jp9000 002886bbac obs-ffmpeg, UI: Allow slash in recording names
Automatically generate directories if slashes are present in a recording
name format set in advanced settings or in the replay buffer
prefix/suffix settings.

Fixes obsproject/obs-studio#2416
Closes obsproject/obs-studio#2858
2020-06-27 05:21:14 -07:00
Richard Stanway ea7bb7a7cd obs-ffmpeg: Show friendly error for NV_ENC_ERR_INVALID_VERSION 2020-05-24 14:42:14 +02: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
Jim 89ccad8a2b
Merge pull request #2619 from dgcampea/ffmpeg-vaapi
Expose more levels and profiles for FFmpeg VAAPI
2020-05-20 19:49:41 -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 c165798959 obs-ffmpeg: Move file read error to separate function
Moves the code that generates a file read error message to its own
function for the sake of cleaning things up a bit.
2020-05-19 16:10:06 -07:00
pkv c8ff234255 obs-ffmpeg: Enable mpegts network URL for ffmpeg-mux 2020-05-18 22:18:23 -07:00
jp9000 7993179466 cmake: Add cmake folders 2020-05-13 06:52:37 -07:00
Marvin Scholz 9ef263f81a obs-ffmpeg: Fix AVFrame handling in FFmpeg output
Fix an issue in the way AVFrames were handled in the FFmpeg
encoder plugin, which could lead to tearing in the encoded
video due to data races in the AVFrame and AVBuffer.

This is fixed by calling av_frame_make_writable which ensures
the frame and its associated buffer are writable. If its not,
it will copy the AVFrame, create a new AVBuffer for it and
decrease the refcount of the old AVFrame and AVBuffer.
This way OBS always ends up with a usable buffer to write into
which is not still used by the encoder while avoiding a copy
when unnecessary.
2020-05-06 02:55:52 +02:00
Jim f6dc71089a
Merge pull request #2814 from cg2121/media-hotkeys
obs-plugins: Check if sources are showing for media hotkeys
2020-05-03 06:49:31 -07:00
Ryan Foster 7fdfb847f8 obs-ffmpeg: Update error message in process_packet
The error message in the process_packet function was prefixed with
"receive_audio" because it was previously from code in the encode_audio
function which was called from the receive_audio function. This is just
a string change to avoid being misled to believe that the error is
always audio related.
2020-04-29 19:04:54 -04:00
Clayton Groeneveld 62b1911e33 obs-plugins: Check if sources are showing for media hotkeys 2020-04-26 21:57:01 -05:00
Richard Stanway 6fac77b69f obs-ffmpeg: Add error message for non-zero GPU 2020-04-27 01:22:34 +02:00
Richard Stanway 35e218e05b obs-ffmpeg: Add localization for NVENC error messages 2020-04-27 01:22:05 +02:00
Richard Stanway 6b441a180c obs-ffmpeg: Preserve error message from new NVENC
If we fallback to ffmpeg NVENC, the error from new NVENC might still be
present in the encoder structure. Given that this provides a lot more
actionable information to the user, let's use it if possible.
2020-04-26 23:35:28 +02:00
Richard Stanway aa97534057 obs-ffmpeg: Log why new NVENC might not be used 2020-04-26 23:32:51 +02: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
Richard Stanway 4fda6cf846
Merge pull request #2700 from Bennik2000/mantis_0001603
obs-ffmpeg: Fix media source not closing file when inactive
2020-04-18 21:24:25 +02:00
Bennik2000 26810c31b6 obs-ffmpeg: Fix media source not closing file when inactive 2020-04-13 09:13:16 +02:00
Richard Stanway 15781073dc obs-ffmpeg: Add error text for NVENC AVERROR_EXTERNAL
Since new NVENC still falls back, try to make the error from ffmpeg
NVENC more actionable for users.
2020-04-12 17:35:27 +02:00
Richard Stanway 5e3e9c1f13 obs-ffmpeg: Use new encoder error handling functions 2020-04-12 17:05:19 +02:00
Douglas Rhine b216b90a5c
obs-ffmpeg: Rename and add more VAAPI levels
The Auto level lets the encoder decide which level to use.
Furthermore, some devices allow levels beyond 4.2. Therefore,
we add all levels allowed by H.264. This is of importance,
since using a resolution not supported by the specified level
can trigger undefined behavior on the hardware/kernel.
2020-04-03 07:12:05 +01:00
Douglas Rhine 04d7ff5854
obs-ffmpeg: Expose VAAPI profile choices
Allow choosing Constrained Baseline, Main and High.
2020-04-02 18:10:03 +01:00
Richard Stanway 75d1f74838 obs-ffmpeg: Expose old NVENC on Windows 7
New NVENC isn't available on Windows 7 and the old encoder was marked as
internal, giving users no option to use NVENC at all.
2020-03-27 00:17:49 +01:00
jp9000 113af5344c obs-ffmpeg: Make sure to show FFmpeg NVENC on non-windows 2020-03-18 17:02:56 -07:00
Gol-D-Ace d74fc65047 Update translations from Crowdin 2020-03-16 20:14:50 +01: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
pkv 759aa079e7 obs-ffmpeg: Fix some incorrect settings for srt output
This fixes some configuration parameters which were incorrect (for audio).
2020-03-05 00:03:13 +01:00
jpark37 1121f32b40 obs-ffmpeg: Fix type conversion warning 2020-02-29 20:57:17 -08:00
jp9000 11eafbda35 obs-ffmpeg: Mark FFmpeg NVENC as internal
Because we implemented the fallback for rescaling, there's no need to
show FFmpeg NVENC anymore.
2020-02-18 21:37:51 -08:00
jp9000 55d80e82e1 obs-ffmpeg: Fall back to FFmpeg nvenc if recale active 2020-02-18 21:00:30 -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
jpark37 55d47bed0d obs-ffmpeg: Fix VC++ warnings 2020-01-03 09:32:07 -08:00