Skip to content
This repository has been archived by the owner on Jul 21, 2020. It is now read-only.

Commit

Permalink
Merge pull request #34 from WatchBeam/h264
Browse files Browse the repository at this point in the history
H264
  • Loading branch information
sslivins authored Jul 21, 2016
2 parents 3f0bdcb + 442dcd0 commit 745246c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 15 deletions.
Binary file added .vscode/.browse.VC.db-wal
Binary file not shown.
6 changes: 3 additions & 3 deletions build_scripts/build_tachyon_windows_vs.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
REM check for cef binary
REM check for dependencies (ffmpeg, etc)
SET build_config=Release
SET obs_version=1.2.8
SET obs_version=1.3.1-alpha-h264
SET cef_binary_dir=C:\beam\cef_binary
SET cef_release_dir=C:\beam\obs-browser-1.22
SET coredeps=C:\beam\tachyon_deps
Expand Down Expand Up @@ -34,13 +34,13 @@ cd ftl-sdk
mkdir build
cd build
cmake -G "Visual Studio 14 2015 Win64" ..
call msbuild /t:Rebuild /p:Configuration=%build_config%,Platform=x64 ftl.vcxproj || exit /b
call msbuild /t:Rebuild /p:Configuration=%build_config%,Platform=x64 ALL_BUILD.vcxproj || exit /b
SET ftl_lib_dir=%cd%\%build_config%\ftl.lib
SET ftl_inc_dir=%cd%\..\libftl
popd
REM cmake -G "Visual Studio 14 2015 Win64" -DOBS_VERSION_OVERRIDE=%obs_version% -DFTLSDK_LIB=%ftl_lib_dir% -DFTLSDK_INCLUDE_DIR=%ftl_inc_dir% -DCEF_ROOT_DIR=%cef_binary_dir% -DCOPY_DEPENDENCIES=true ..
cmake -G "Visual Studio 14 2015 Win64" -DOBS_VERSION_OVERRIDE=%obs_version% -DFTLSDK_LIB=%ftl_lib_dir% -DFTLSDK_INCLUDE_DIR=%ftl_inc_dir% -DCOPY_DEPENDENCIES=true ..
call msbuild /p:Configuration=%build_config%,Platform=x64 ALL_BUILD.vcxproj || exit /b
call msbuild /t:Rebuild /p:Configuration=%build_config%,Platform=x64 ALL_BUILD.vcxproj || exit /b
echo "Building FTL-Express"
pushd .
cd ..\..
Expand Down
2 changes: 1 addition & 1 deletion build_scripts/tachyon_windows_installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "Tachyon"
!define DEFAULT_INST_DIR "$PROGRAMFILES\${PRODUCT_NAME}"
!define PRODUCT_VERSION "1.2.8"
!define PRODUCT_VERSION "1.3.1 alpha-h264"
!define PRODUCT_PUBLISHER "Beam Interactive"
!define PRODUCT_WEB_SITE "http://beam.pro"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\tachyon64.exe"
Expand Down
18 changes: 7 additions & 11 deletions plugins/obs-ffmpeg/obs-ffmpeg-output.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,8 @@
#include <libavformat/avformat.h>
#include <libswscale/swscale.h>

#ifdef OS_WINDOWS
#include <ftl.h>
#else
#include <ftl/ftl.h>
#endif

#ifdef _WIN32
#include <ftl.h>
#include <windows.h>
#include <process.h>
#include <Shellapi.h>
Expand Down Expand Up @@ -206,7 +201,7 @@ ftl_status_t attempt_ftl_connection(struct ffmpeg_output *output, struct ffmpeg_
ftl_set_ingest_location(output->stream_config, config.ingest_location);
ftl_set_authetication_key(output->stream_config, config.channel_id, config.stream_key);

output->video_component = ftl_create_video_component(FTL_VIDEO_VP8, 96, config.video_ssrc, config.scale_width, config.scale_height);
output->video_component = ftl_create_video_component(FTL_VIDEO_H264, 96, config.video_ssrc, config.scale_width, config.scale_height);
ftl_attach_video_component_to_stream(output->stream_config, output->video_component);

output->audio_component = ftl_create_audio_component(FTL_AUDIO_OPUS, 97, config.audio_ssrc);
Expand Down Expand Up @@ -272,6 +267,7 @@ static void parse_params(AVCodecContext *context, char **opts)
*assign = 0;
value = assign+1;

blog(LOG_WARNING, "Setting options %s = %s\n", name, value);
av_opt_set(context->priv_data, name, value, 0);
}

Expand All @@ -285,7 +281,7 @@ static bool open_video_codec(struct ffmpeg_data *data)

/* Hardcode in quality=realtime */
//char **opts = strlist_split(data->config.video_settings, ' ', false);
char **opts = strlist_split("quality=realtime", ' ', false);
char **opts = strlist_split("quality=realtime profile=baseline bframes=0 preset=superfast tune=zerolatency", ' ', false);
int ret;

if (opts) {
Expand Down Expand Up @@ -677,9 +673,9 @@ static enum AVCodecID get_codec_id(const char *name, int id)
static void set_encoder_ids(struct ffmpeg_data *data)
{
data->output_video->oformat->audio_codec = AV_CODEC_ID_OPUS;
data->output_video->oformat->video_codec = AV_CODEC_ID_VP8;
data->output_video->oformat->video_codec = AV_CODEC_ID_H264;
data->output_audio->oformat->audio_codec = AV_CODEC_ID_OPUS;
data->output_audio->oformat->video_codec = AV_CODEC_ID_VP8;
data->output_audio->oformat->video_codec = AV_CODEC_ID_H264;

/* data->output_video->oformat->video_codec = get_codec_id(
data->config.video_encoder,
Expand Down Expand Up @@ -1193,7 +1189,7 @@ static int try_connect(struct ffmpeg_output *output)

int size = 0;
//size = snprintf(config.url, 2048, "rtp://%s:8082?pkt_size=1350", config.ingest_location);
size = snprintf(config.url, 2048, "rtp://%s:8082?pkt_size=1350", "127.0.0.1");
size = snprintf(config.url, 2048, "rtp://%s:8082?pkt_size=1350&buffer_size=200000", "127.0.0.1");
if (size == 2048) {
blog(LOG_WARNING, "snprintf failed on URL");
return OBS_OUTPUT_ERROR;
Expand Down

0 comments on commit 745246c

Please sign in to comment.